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 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

peterhoeg commented Apr 30, 2020

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 ajs124 force-pushed the helsinki-systems:syslinux_efi branch from 6f1c71f to 580cf67 Apr 30, 2020
@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.

@ajs124 ajs124 force-pushed the helsinki-systems:syslinux_efi branch from 580cf67 to 31d1afd May 1, 2020
@peterhoeg
Copy link
Member

peterhoeg commented May 2, 2020

@ajs124 ajs124 force-pushed the helsinki-systems:syslinux_efi branch from 31d1afd to a09878c May 3, 2020
@peterhoeg peterhoeg merged commit 4310c1a into NixOS:master May 3, 2020
16 checks passed
16 checks passed
syslinux, syslinux.passthru.tests on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="a09878c"; rev="a09878c2056867fea2fa74914d6af8570cdfd870"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
syslinux, syslinux.passthru.tests on x86_64-linux Success
Details
@peterhoeg
Copy link
Member

peterhoeg commented May 3, 2020

Thanks for all your hard work @ajs124

@ajs124 ajs124 deleted the helsinki-systems:syslinux_efi branch May 3, 2020
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";

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 5, 2020

Contributor

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

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 5, 2020

Contributor

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

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

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.