Skip to content

Comments

linux: handle case where ZBOOT EFI stub is the target#277975

Merged
JohnRTitor merged 1 commit intoNixOS:stagingfrom
jmbaur:linux-kernel-efi-zboot
Jun 23, 2024
Merged

linux: handle case where ZBOOT EFI stub is the target#277975
JohnRTitor merged 1 commit intoNixOS:stagingfrom
jmbaur:linux-kernel-efi-zboot

Conversation

@jmbaur
Copy link
Contributor

@jmbaur jmbaur commented Dec 31, 2023

Description of changes

When CONFIG_EFI_ZBOOT is enabled in the linux kernel's config, vmlinuz.efi becomes the file you want to install through the zinstall make target. This also needs the hexdump tool during the build of the EFI image.

Things done

  • Built on platform(s)
    • x86_64-linux (cross to aarch64)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@jmbaur jmbaur requested a review from a user December 31, 2023 21:55
@github-actions github-actions bot added the 6.topic: kernel The Linux kernel label Dec 31, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels Dec 31, 2023
@jmbaur jmbaur changed the base branch from master to staging January 1, 2024 22:31
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3216

@jmbaur jmbaur force-pushed the linux-kernel-efi-zboot branch 2 times, most recently from bbd576e to 410418f Compare January 14, 2024 06:29
@ghost ghost removed their request for review January 18, 2024 07:34
@jmbaur jmbaur requested review from alyssais and yu-re-ka February 9, 2024 05:30
Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

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

Diff LGTM

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Mar 8, 2024
@jmbaur jmbaur force-pushed the linux-kernel-efi-zboot branch from 410418f to 0c7f4a6 Compare June 6, 2024 01:08
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jun 6, 2024
@jmbaur jmbaur force-pushed the linux-kernel-efi-zboot branch 2 times, most recently from a192982 to 0bb71f2 Compare June 6, 2024 01:28
@github-actions github-actions bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Jun 6, 2024
@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 6, 2024

Sorry for the churn, forgot this was targeting staging and had rebased on master, should be fixed now.

@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 16, 2024

@alyssais any chance you'd be able to merge this one? I'm pretty sure amjoseph used to maintain the linux derivations, so there's no maintainer here to merge this anymore.

@JohnRTitor
Copy link
Member

Hello, could you rebase this?

When CONFIG_EFI_ZBOOT is enabled in the linux kernel's config,
`vmlinuz.efi` becomes the file you want to install through the
`zinstall` make target. This also needs the hexdump tool during the
build of the EFI image.
@jmbaur jmbaur force-pushed the linux-kernel-efi-zboot branch from 0bb71f2 to 16e8400 Compare June 22, 2024 20:36
Copy link
Member

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

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

Ok lets merge this one after CI passes green

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Jun 22, 2024
@JohnRTitor JohnRTitor merged commit 1b77bc2 into NixOS:staging Jun 23, 2024
@jmbaur jmbaur deleted the linux-kernel-efi-zboot branch June 23, 2024 05:05
@Ma27
Copy link
Member

Ma27 commented Jun 23, 2024

@jmbaur

I'm pretty sure amjoseph used to maintain the linux derivations, so there's no maintainer here to merge this anymore.

What makes you think that? There were even people pinged by ofborg because there's a maintainer team for the kernel.

The sole problem - in my case - is that I just didn't have the time so far to take a look.

@jmbaur
Copy link
Contributor Author

jmbaur commented Jun 23, 2024

@Ma27 sorry the history looks kinda weird! I accidentally rebased this PR on master, when it was targeted at staging, so it pulled in a few unrelated files which then pulled in the maintainers for those files. IIRC, the only original reviewer that got pulled in was amjoseph.

pahole
perl
elfutils
hexdump
Copy link
Member

Choose a reason for hiding this comment

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

I tried building vmlinuz.efi on aarch64. This is actually wrong here since it needs to be put in nativeBuildInputs.

fpletz added a commit to fpletz/nixpkgs that referenced this pull request Jul 3, 2024
Trying to build vmlinuz.efi natively on aarch64 fails to find hexdump.
This was introduced in NixOS#277975. Moving hexdump to nativeBuildInputs
fixes the build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: kernel The Linux kernel 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants