From 424e13951b41a855719131a42cac0cfcfe46b9c6 Mon Sep 17 00:00:00 2001 From: Hilmar Lapp Date: Sun, 27 Dec 2015 00:22:06 -0500 Subject: [PATCH 1/3] Makes /boot/uboot being mounted optional. /boot/uboot is not a mounted filesystem for all images and combinations. umount will fail if it's not, resulting in premature interruption of the flasher script. --- tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh index 6264226d..2db12675 100755 --- a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh +++ b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh @@ -325,7 +325,7 @@ copy_boot () { flush_cache umount /tmp/boot/ || umount -l /tmp/boot/ || write_failure flush_cache - umount /boot/uboot || umount -l /boot/uboot + umount /boot/uboot || umount -l /boot/uboot || true } copy_rootfs () { From e52a0fe6c6f371679ba5be79447cf61bff7b5dc5 Mon Sep 17 00:00:00 2001 From: Hilmar Lapp Date: Sun, 27 Dec 2015 00:26:57 -0500 Subject: [PATCH 2/3] Comments out unmounting /tmp. Filesystems mount on subdirectories of /tmp are already unmounted earlier in the script. /tmp itself is not a mount point in all systems, and if it isn't, umount will fail when called to unmount it, resulting in premature termination of the flasher script. Also, it doesn't seem necessary to unmount /tmp in this script (which doesn't run as init) even if it is a mounted filesystem. --- tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh index 2db12675..da3190b7 100755 --- a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh +++ b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh @@ -406,7 +406,7 @@ copy_rootfs () { message="debug: enabled" ; broadcast inf_loop else - umount /tmp || umount -l /tmp + #umount /tmp || umount -l /tmp if [ -e /sys/class/leds/beaglebone\:green\:usr0/trigger ] ; then echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger echo default-on > /sys/class/leds/beaglebone\:green\:usr1/trigger From ccd16cb1707f5bc5fded572926456c42ba502366 Mon Sep 17 00:00:00 2001 From: Hilmar Lapp Date: Sun, 27 Dec 2015 00:31:55 -0500 Subject: [PATCH 3/3] Deletes -f flag from halt. The -f flag causes the orderly shutdown (via shutdown -h) to be circumvented, which arguably isn't better for the board than doing an orderly shutdown, and can also easily result in the LEDs being in some odd state rather than signaling power off. --- tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh index da3190b7..e6113e50 100755 --- a/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh +++ b/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh @@ -419,7 +419,7 @@ copy_rootfs () { message="-----------------------------" ; broadcast flush_cache - halt -f + halt fi }