diff --git a/tools/bb_sd_prep.sh b/tools/bb_sd_prep.sh index f2f7018..41d9fdb 100755 --- a/tools/bb_sd_prep.sh +++ b/tools/bb_sd_prep.sh @@ -1,4 +1,7 @@ #!/bin/bash +# +# based on instructions at: +# https://www.yoctoproject.org/downloads/bsps/daisy16/beaglebone # cleanup # trap ctrl-c and call ctrl_c() @@ -8,6 +11,8 @@ function cleanup() { umount -f /tmp/sdcard.boot.$$ >/dev/null 2>&1 umount -f /tmp/sdcard.root.$$ >/dev/null 2>&1 echo "Aborted." + rmdir /tmp/sdcard.boot.$$ + rmdir /tmp/sdcard.root.$$ exit 1 } @@ -68,8 +73,8 @@ mount -t ext4 "${DEV}2" /tmp/sdcard.root.$$ echo "...done" echo "Copying bootloader..." -cp MLO-beaglebone /mnt/sdcard.boot.$$/MLO -cp u-boot-beaglebone.img /mnt/sdcard.boot.$$/u-boot.img +cp MLO-beaglebone /tmp/sdcard.boot.$$/MLO +cp u-boot-beaglebone.img /tmp/sdcard.boot.$$/u-boot.img echo "...done" echo "Creating root filesystem..."