From 3034dd3989b045d2a58840e1926a83c882074331 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 2 Jun 2022 14:54:40 -0700 Subject: [PATCH] nixos/modules/system/boot/loader/raspberrypi: enable u-boot support for rpi 4 it's not clear to me why support was disabled at this level: i think it's just an artifact of history. the nixos SD image gained support for rpi4 in cc5baf2d8671d2f2dd9e00fc8bbc96d769ec27e0 (2019/08/17). that commit added the branch which throws "U-Boot is not yet supported on the raspberry pi 4" (which my patch removes). nixpkgs u-boot gained rpi4 support in 95cd8c8d7be15606a0ec418dc313726ff170d9ee (2020/09/12). i think at that point we could have enabled rpi support here but it was overlooked. i've been using this for about a month on the raspberry pi 400 -- which uses the same SOC as the rpi4. i haven't tested the 32-bit code path. tagging @tkerber for his earlier involvement in this file. --- .../modules/system/boot/loader/raspberrypi/uboot-builder.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix b/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix index a4352ab9a24042f..8a191e0f69486a3 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix @@ -16,7 +16,10 @@ let else pkgs.ubootRaspberryPi3_32bit else - throw "U-Boot is not yet supported on the raspberry pi 4."; + if isAarch64 then + pkgs.ubootRaspberryPi4_64bit + else + pkgs.ubootRaspberryPi4_32bit; extlinuxConfBuilder = import ../generic-extlinux-compatible/extlinux-conf-builder.nix {