-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Description
Describe the bug
The U-Boot bootloader NixOS ships with on aarch64 SD card images limits kernel size to 71827456 bytes (68.5 MiB) as per this patch. This limit is very easy to hit.
Steps To Reproduce
Steps to reproduce the behavior:
- Grab a Raspberry Pi (3B+ in my case)
- Add this configuration:
boot.kernelPackages = (import nixpkgs {
system = "x86_64-linux";
crossSystem = "aarch64-linux";
}).linuxPackages_latest;
boot.kernelPatches = [{
name = "enable-gpio-poweroff";
patch = null;
extraStructuredConfig.POWER_RESET_GPIO = lib.kernel.yes;
}];
Note: the kernel patch may not be required to hit the limit, this additional kernel module is not directly related to the issue.
My kernel image (version 6.8.1
) ended up being just over the limit at 68.83 MiB.
Nixpkgs commit this was reproduced on: 57e6b3a
3. Build the system. The bootloader will fall back to the last generation where the kernel was within the size limit.
Expected behavior
The bootloader would either be able to dynamically allocate the address space in order to allow any size of kernel image (not sure if this is possible with U-Boot) or the maximum should be adjusted to give some more room.
Additional context
Add any other context about the problem here.
Notify maintainers
@bartsch
@dezgeg
@samueldr
@lopsided98
Metadata
- system: `"aarch64-linux"`
- host os: `Linux 6.6.22, NixOS, 24.05 (Uakari), 24.05.20240325.57e6b3a`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.2`
- channels(root): `"nixos-24.05pre603596.2726f127c15a"`
- nixpkgs: `/nix/store/161i7cxz0w0raqmrj88z86cj66babp9z-source`