Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syslinux: add uefi support #85094

Merged
merged 1 commit into from May 3, 2020
Merged

Conversation

ajs124
Copy link
Member

@ajs124 ajs124 commented Apr 12, 2020

Motivation for this change

Fixes #41403

The main changes are fetching submodules, using a patch with the same name, but a wider scope, from Arch Linux instead of Debian, dropping some make flags that break the build (yeah…) and a stubs-32.h hack I stole from... somewhere. Xen maybe?

The second commit adds an unofficial and not particularly polished patchset that adds support for EFI binary "chainloading". This successfully executes an UEFI Shell, but fails to run some other things like rEFInd.

It's a separate commit because, while I'd like to see the general UEFI support merged, I'm definitely willing to drop this patcheset, if that's what the maintainers/community prefers.

cc @samueldr @peterhoeg

Things done

Tested booting on UEFI and BIOS on real hardware and in qemu.

@peterhoeg
Copy link
Member

The uefi support bit is great, thanks!

I'd be very hesitant to support merging an out of band patch for something as integral as syslinux unless "blessed" by other distributions.

@ajs124
Copy link
Member Author

ajs124 commented Apr 30, 2020

Understandable. I dropped that commit, so now this only adds UEFI support, as it works on upstream syslinux.

This means you can boot into syslinux from UEFI and start a Linux kernel with it, but cannot execute any other UEFI binaries (like an EFI Shell) from it.

@peterhoeg
Copy link
Member

peterhoeg commented May 2, 2020 via email

@peterhoeg peterhoeg merged commit 4310c1a into NixOS:master May 3, 2020
@peterhoeg
Copy link
Member

Thanks for all your hard work @ajs124

@ajs124 ajs124 deleted the syslinux_efi branch May 3, 2020 15:51
url = mkURL "477e56d2" "0005-gnu-efi-version-compatibility.patch";
sha256 = "041568b4abb79wynyps1n04lg4fr26rc3sbjncz99pp0mbz0ajlm";
(fetchpatch {
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/0005-gnu-efi-version-compatibility.patch?h=packages/syslinux";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a static URL, you need to pin it to Arch git commit.

@@ -48,6 +50,10 @@ stdenv.mkDerivation {
# fix tests
substituteInPlace tests/unittest/include/unittest/unittest.h \
--replace /usr/include/ ""

# Hack to get `gcc -m32' to work without having 32-bit Glibc headers.
mkdir gnu-efi/inc/ia32/gnu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use gnu-efi from the nixpkgs package instead of a submodule?

@ajs124 ajs124 mentioned this pull request Jun 27, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pxelinux doesn't support UEFI
3 participants