I am updating my images ((3.8.13-bone68) and looking to make new images for cloning from SD card to eMMC
My process is to setup beaglebone as required and then run /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh after first changing directory to /opt/scripts/tools and issuing a git pull to get the lastest scripts.
Creating SD image works as expected.
However when cloning from SD to eMMC (in powered off board, insert SD card, hold boot button and power up board and wait for power down) the destination board is not closing down. I then hooked up serial to usb cable and monitored output. I see the script is getting called and message “eMMC has been flashed: please wait for device to power down” is being displayed. However the device is not shutting down and appears to be restarting.
Looking at init-eMMC-flasher-v3.sh script function copy_rootfs () I see:
`
message=“eMMC has been flashed: please wait for device to power down.” ; broadcast
message="-----------------------------" ; broadcast
flush_cache #To properly shudown, /opt/scripts/boot/am335x_evm.sh is going to call halt:
exec /sbin/init #halt -f
`
The last line is calling /sbin/init and halt is commented out - is this correct? I’d assume if you wanted to shutdown using init you’d need to calling init 0 and not just init.
I was just going to add to my post that I found difference in my am335x_evm.sh files. Prior working version included
#eMMC flasher just exited single user mode via: [exec /sbin/init] #as we can't shudown properly in single user mode.. unset are_we_flasher are_we_flasher=$(grep init-eMMC-flasher /proc/cmdline || true) if [ ! "x${are_we_flasher}" = "x" ] ; then halt exit fi
while current am335x_evm.sh doesn’t. I do see the code you mention in generic-startup.sh but don’t see where this file is called/referenced.
About a week ago i moved that into the generic (all) startup script
that calls the board options. Mostly to shutdown before ssh key
re-generation on flashing microsd and to share it with the x15
flasher..