git.iko.soy/typeable/nixpkgs
on master help sign in
raspberrypi-bootloader: uboot: allow specification of target directory
commite2fbada6f8d24660f68ad2b48f8a5cc900f095fc authorBen Wolsieffer <benwolsieffer@gmail.com> dateWed 12 Sep 2018, 17:18 (8 years ago) parent1afff7c
1 file changed+20−11
nixos/modules/system/boot/loader/raspberrypi/uboot-builder.sh+20−11
nixos/modules/system/boot/loader/raspberrypi/uboot-builder.sh+20−11
@@ -1,5 +1,14 @@
11#! @bash@/bin/sh -e
22
3+target=/boot # Target directory
4+
5+while getopts "t:c:d:g:" opt; do
6+ case "$opt" in
7+ d) target="$OPTARG" ;;
8+ *) ;;
9+ esac
10+done
11+
312copyForced() {
413 local src="$1"
514 local dst="$2"
@@ -12,18 +21,18 @@ copyForced() {
1221
1322# Add the firmware files
1423fwdir=@firmware@/share/raspberrypi/boot/
15−copyForced $fwdir/bootcode.bin /boot/bootcode.bin
16−copyForced $fwdir/fixup.dat /boot/fixup.dat
17−copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
18−copyForced $fwdir/fixup_db.dat /boot/fixup_db.dat
19−copyForced $fwdir/fixup_x.dat /boot/fixup_x.dat
20−copyForced $fwdir/start.elf /boot/start.elf
21−copyForced $fwdir/start_cd.elf /boot/start_cd.elf
22−copyForced $fwdir/start_db.elf /boot/start_db.elf
23−copyForced $fwdir/start_x.elf /boot/start_x.elf
24+copyForced $fwdir/bootcode.bin $target/bootcode.bin
25+copyForced $fwdir/fixup.dat $target/fixup.dat
26+copyForced $fwdir/fixup_cd.dat $target/fixup_cd.dat
27+copyForced $fwdir/fixup_db.dat $target/fixup_db.dat
28+copyForced $fwdir/fixup_x.dat $target/fixup_x.dat
29+copyForced $fwdir/start.elf $target/start.elf
30+copyForced $fwdir/start_cd.elf $target/start_cd.elf
31+copyForced $fwdir/start_db.elf $target/start_db.elf
32+copyForced $fwdir/start_x.elf $target/start_x.elf
2433
2534# Add the uboot file
26−copyForced @uboot@/u-boot.bin /boot/u-boot-rpi.bin
35+copyForced @uboot@/u-boot.bin $target/u-boot-rpi.bin
2736
2837# Add the config.txt
29−copyForced @configTxt@ /boot/config.txt
38+copyForced @configTxt@ $target/config.txt