@@ -1,13 +1,14 @@
1−{ config, pkgs, configTxt }:
1+{ pkgs, version, configTxt }:
22
33let
4− cfg = config.boot.loader.raspberryPi;
54 isAarch64 = pkgs.stdenv.isAarch64;
65
76 uboot =
8− if cfg.version == 1 then
7+ if version == 0 then
8+ pkgs.ubootRaspberryPiZero
9+ else if version == 1 then
910 pkgs.ubootRaspberryPi
10− else if cfg.version == 2 then
11+ else if version == 2 then
1112 pkgs.ubootRaspberryPi2
1213 else
1314 if isAarch64 then
@@ -21,7 +22,7 @@ let
2122 };
2223in
2324pkgs.substituteAll {
24− src = ./builder_uboot.sh;
25+ src = ./uboot-builder.sh;
2526 isExecutable = true;
2627 inherit (pkgs) bash;
2728 path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
@@ -29,6 +30,6 @@ pkgs.substituteAll {
2930 inherit uboot;
3031 inherit configTxt;
3132 inherit extlinuxConfBuilder;
32− version = cfg.version;
33+ inherit version;
3334}
3435