Change:
Raspberry Pi 3 is not completing boot from nixos-sd-image-24.11pre664135.-aarch64- It shows the rainbow boot screen. Steps to reproduce the behavior: and extract the aarch64 image to sdcard using Raspberry Pi Pi should boot My pi is booting fine with Raspbian OS. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
As an additional datapoint, the latest stable NixOS image (24.05.3787) works fine. I'll try and bisect down to when it broke.
Broken with . Stepping through U-Boot release candidates to track down the issue further.
Broken between U-Boot 2024.07-rc2 and U-Boot 2024.07-rc3. Checking range of commits next, as well as the latest release candidate.
Bisected down to u-boot/u-boot A fix for NixOS is proposed in , testing would be much appreciated (especially on other hardware).
As further data point, I believe the recent u-boot changes also bricked my rpi4 nix install - did you ever see an issue about a flattened device tree? Interestingly the dtbs are present for an rpi4 already though...
Please elaborate.
A Raspberry Pi 4B booted just fine for me without issue, at least prior to my proposed change. I strongly doubt that the fix would affect other hardware, but I'm building a disk image just as I'm writing this to make sure.
Ah yes - I wasn't very clear, I'm curious about if you saw any other error than the rainbow screen I see the boot process making it to u-boot, which then bails out with: after having loaded the kernel and initrd. This error happens for each kernel I have installed, then u-boot falls back to a network boot (which I don't have setup). Unfortunately I didn't see this before as I boot the pi headlessly, so it kept falling back to an old, good kernel, until that kernel got dropped by an update
This probably means our kernel is too big, again, and we need to do again, again.
Gotya, thanks for the issue link. I think in that case I'll go with the UEFI boot option if this could be problematic in the future for u-boot
As a note - I flashed a fresh nixos-sdcard image () and it boots fine. Could it be the firmware on my old install was never updated by nix? I'd attempted to copy across uboot and co with the same result/error
NixOS does not update the firmware by default. However, that should mean that both U-Boot and the DTBs remained untouched.
That matches up with what I found, I guess it must've been the kernel changing, and needing a more recent DTB About this - is there a way to find out if the latest image failed to boot and that u-boot fell back to a backup?

Discussion:
# Add pi3 specific files cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin <ins> cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-2-b.dtb firmware/ cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-3-b.dtb firmware/ cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-3-b-plus.dtb firmware/ cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-cm3.dtb firmware/ cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-zero-2.dtb firmware/ cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-zero-2-w.dtb firmware/ </ins> # Add pi4 specific files cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin firmware/u-boot-rpi4.bin