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
syslinux: add uefi support #85094
Conversation
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. |
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. |
Should I maybe put these changes in a separate commit?
We normally do these minor cleanups when the package is being touched anyway.
|
Thanks for all your hard work @ajs124 |
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"; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
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.