linux: enable EFI_ZBOOT for generic compression support#239721
linux: enable EFI_ZBOOT for generic compression support#239721flokli merged 2 commits intoNixOS:stagingfrom
Conversation
|
I am testing this by cross compiling a RISCV64 kernel first. |
And loongarch! |
|
Needs unixtools.hexdump in |
|
@alyssais Were you able to measure the reduced size? I don't know if I'm holding this wrong but I cannot see anything else than |
|
I think we also need to change the nixpkgs/lib/systems/platforms.nix Line 379 in df70846 |
Yeah, actually, I am planning for a bigger refactor of that. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/pi4-broken-on-23-11-uefi-zfs-root/36375/4 |
For reference, some numbers for my Aarch64 cross compiled kernel:
This would be really useful for undersized |
|
Commenting because this is important and shouldn't be marked stale. |
|
I'm also interested in this, as |
I was just dumb, and used the wrong kernel output (from the |
Starting 6.1, it is possible to have generic compression for aarch64 and riscv64 via CONFIG_EFI_ZBOOT which implements apparently its own decompression. https://lwn.net/Articles/907679/
|
I've been successfully EFI booting my Pinebook Pro with Tow-Boot, systemd-boot and zboot. 🚀 These were the changes needed if somebody wants to test on another aarch64 machine: master...fpletz:nixpkgs:arm64-zboot To get this PR through the the door, I have fixed the formatting issue, rebased and added a commit restricting EFI_ZBOOT to aarch64 for now since I have tested the kernel builds correctly both the Image and the vmlinuz.efi. This is needed since otherwise the x86 build breaks. We should add new systems when they have been tested and thus not inadvertently break kernel builds of non-release architectures. Current file sizes for aarch64: The extra |
Enabling EFI_ZBOOT fails at least the x86 builds. More compatible platforms can be added after testing.
|
Thanks for carrying this over the finish line! 🎉 |
|
But this PR as is doesn't do anything as we still #287122 fixes that iirc |
|
Ah #324419 is the follow-up. I missed that |
Description of changes
Starting 6.1, it is possible to have generic compression for aarch64 and riscv64 via CONFIG_EFI_ZBOOT which implements apparently its own decompression.
https://lwn.net/Articles/907679/
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)