@@ -1,5 +1,14 @@
1#! @bash@/bin/sh -e
1#! @bash@/bin/sh -e
3+target=/boot # Target directory
5+while getopts "t:c:d:g:" opt; do
7+ d) target="$OPTARG" ;;
3copyForced() {
12copyForced() {
4 local src="$1"
13 local src="$1"
5 local dst="$2"
14 local dst="$2"
@@ -12,18 +21,18 @@ copyForced() {
13# Add the firmware files
22# Add the firmware files
14fwdir=@firmware@/share/raspberrypi/boot/
23fwdir=@firmware@/share/raspberrypi/boot/
15−copyForced $fwdir/bootcode.bin /boot/bootcode.bin
24+copyForced $fwdir/bootcode.bin $target/bootcode.bin
16−copyForced $fwdir/fixup.dat /boot/fixup.dat
25+copyForced $fwdir/fixup.dat $target/fixup.dat
17−copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
26+copyForced $fwdir/fixup_cd.dat $target/fixup_cd.dat
18−copyForced $fwdir/fixup_db.dat /boot/fixup_db.dat
27+copyForced $fwdir/fixup_db.dat $target/fixup_db.dat
19−copyForced $fwdir/fixup_x.dat /boot/fixup_x.dat
28+copyForced $fwdir/fixup_x.dat $target/fixup_x.dat
20−copyForced $fwdir/start.elf /boot/start.elf
29+copyForced $fwdir/start.elf $target/start.elf
21−copyForced $fwdir/start_cd.elf /boot/start_cd.elf
30+copyForced $fwdir/start_cd.elf $target/start_cd.elf
22−copyForced $fwdir/start_db.elf /boot/start_db.elf
31+copyForced $fwdir/start_db.elf $target/start_db.elf
23−copyForced $fwdir/start_x.elf /boot/start_x.elf
32+copyForced $fwdir/start_x.elf $target/start_x.elf
25# Add the uboot file
34# 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
28# Add the config.txt
37# Add the config.txt
29−copyForced @configTxt@ /boot/config.txt
38+copyForced @configTxt@ $target/config.txt