raspberrypi-bootloader: support Raspberry Pi 3 w/o U-Boot and explicitly support

Raspberry Pi Zero
This commit is contained in:
Ben Wolsieffer
2018-10-21 17:44:11 +03:00
committed by Tuomas Tynkkynen
parent bcb9e17bba
commit 1afff7c10b
5 changed files with 18 additions and 19 deletions
@@ -0,0 +1,35 @@
{ pkgs, version, configTxt }:
let
isAarch64 = pkgs.stdenv.isAarch64;
uboot =
if version == 0 then
pkgs.ubootRaspberryPiZero
else if version == 1 then
pkgs.ubootRaspberryPi
else if version == 2 then
pkgs.ubootRaspberryPi2
else
if isAarch64 then
pkgs.ubootRaspberryPi3_64bit
else
pkgs.ubootRaspberryPi3_32bit;
extlinuxConfBuilder =
import ../generic-extlinux-compatible/extlinux-conf-builder.nix {
inherit pkgs;
};
in
pkgs.substituteAll {
src = ./uboot-builder.sh;
isExecutable = true;
inherit (pkgs) bash;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
firmware = pkgs.raspberrypifw;
inherit uboot;
inherit configTxt;
inherit extlinuxConfBuilder;
inherit version;
}