raspberry-pi/5: add U-Boot packages and an installer#1773
raspberry-pi/5: add U-Boot packages and an installer#1773fkokosinski wants to merge 2 commits intoNixOS:masterfrom
Conversation
This patch adds an overlay for U-Boot packages. A patch is provided for rev 1.1 boards, which seem to have the d0 stepping of the BCM2712 SoC. As of date, U-Boot does not set the correct `fdtfile` environment variable for them; the patch rectifies that. Additionally, this patch sets GRUB as disabled by default, and selects extlinux instead. Signed-off-by: Filip Kokosiński <filip.kokosinski@gmail.com>
This patch provides an installer for Raspberry Pi 5 boards. An option is provided to choose between rev 1.0 and rev 1.1 boards. The installer selects the U-Boot package based on that option. Signed-off-by: Filip Kokosiński <filip.kokosinski@gmail.com>
|
@Cryolitia @Mic92 @concatime - pinging you since you seem to be active w/r to RPi support. I'd appreciate if you could take a look at this PR and review the changes. Thanks! |
| defconfig = "rpi_arm64_defconfig"; | ||
| # Mote: this patch can be removed once U-Boot starts setting | ||
| # `fdtfile=bcm2712d0-rpi-5.dtb` automatically for rev1.1 boards | ||
| patches = [ ./uboot-rpi5-bcm2712d0.patch ]; |
There was a problem hiding this comment.
It's something that I'm actually trying to fix with this series: https://lore.kernel.org/u-boot/20260216184452.18732-1-filip.kokosinski@gmail.com/.
But they are still under review & testing, so I didn't want to straight up include them here.
concatime
left a comment
There was a problem hiding this comment.
It's been quite some time since I used the sd-image installer, but can't we instead upstream the changes to nixpkgs's nixos/modules/installer/sd-card/sd-image-aarch64.nix?
| ubootRaspberryPi5_rev1_0 = final.buildUBoot { | ||
| defconfig = "rpi_arm64_defconfig"; | ||
| extraMeta.platforms = [ "aarch64-linux" ]; | ||
| filesToInstall = [ "u-boot.bin" ]; | ||
| }; |
There was a problem hiding this comment.
This should probably be upstreamed to nixpkgs after this block. It should probably be renamed to ubootRaspberryPiAarch64 like ubootQemuAarch64. WDYT?
There was a problem hiding this comment.
Good idea - it looks like doing that in nixpkgs is fine as long as we use upstream sources, which we do.
Upstreaming this in NixOS/nixpkgs#493816.
|
My Raspberry Pi 5 is destroyed and fixing, I can test it later when I get it. |
That would be much appreciated. Thanks! |
Description of changes
This PR provides an overlay for Raspberry Pi 5 U-Boot packages. Two U-Boot packages are provided: rev 1.0 and rev 1.1 compatible ones. Additionally, extlinux is made default in the Raspberry Pi 5 profile.
This PR provides an installer as well for the board. The
options.hardware.rpiRevisionoption is provided to choose between Raspberry Pi 5 board revisions. This in turn chooses the correct U-Boot package from the overlay.Things done
nixos-hardwareandimporting it via
<nixos-hardware>or Flake input