From 607be4d88e9f9287a16e0b3c7836c4618320ebc5 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sat, 11 Feb 2017 12:23:16 +0200 Subject: [PATCH] sd-image-*: Copy all RPi firmware files Turns out all variants of start.elf and fixup.dat are needed (depending on what's in config.txt). I was under the mistaken impression that you were supposed to rename one of the variants to switch using them, but nope. --- nixos/modules/installer/cd-dvd/sd-image-aarch64.nix | 4 +--- .../installer/cd-dvd/sd-image-armv7l-multiplatform.nix | 4 +--- nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index 8cf349fbd078..c769bc80a481 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -52,9 +52,7 @@ in enable_uart=1 ''; in '' - for f in bootcode.bin fixup.dat start.elf; do - cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/$f boot/ - done + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) cp ${patchedUboot}/u-boot.bin boot/u-boot-rpi3.bin cp ${configTxt} boot/config.txt ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 76f5d4bf6472..0b858746ff0a 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -44,9 +44,7 @@ in enable_uart=1 ''; in '' - for f in bootcode.bin fixup.dat start.elf; do - cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/$f boot/ - done + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) cp ${pkgs.ubootRaspberryPi2}/u-boot.bin boot/u-boot-rpi2.bin cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin boot/u-boot-rpi3.bin cp ${configTxt} boot/config.txt diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index c7915b578d8a..886ffd9a0923 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -34,9 +34,7 @@ in sdImage = { populateBootCommands = '' - for f in bootcode.bin fixup.dat start.elf; do - cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/$f boot/ - done + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) cp ${pkgs.ubootRaspberryPi}/u-boot.bin boot/u-boot-rpi.bin echo 'kernel u-boot-rpi.bin' > boot/config.txt ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot