0
\$\begingroup\$

So generally I have no problem flashing my BBB with the SD I have. I do it all the time, and it works on most board. However occionally it gets stuck in this "loop".

It will flash the device successfully, do it's cleanup, then shutdown. However, instead of staying down like all the other times, it will reboot instantly, see the SD, and start flashing again? I know it flashes successfully because if I watch it, and pull the power before it gets to the re-flashing stage on the next cycle.. I can pop the SD and boot it up and everything's golden.

Here's my console output during/after:

================================================================================
Starting eMMC Flasher from microSD media
Version: [1.20161019: Major refactor of library]
================================================================================

================================================================================
Prepare environment for flashing
Starting at Fri Dec 31 19:00:11 EST 1999
----------------------------------------
==> Preparing /tmp
==> Determining root drive
====> Root drive identified at /dev/mmcblk0p1
==> Determining boot drive
==> Figuring out Source and Destination devices
====> Source identified: [/dev/mmcblk0]
====> Destination identified: [/dev/mmcblk1]
==> Figuring out machine
====> Machine is TI_AM335x_BeagleBone_Black
====> Machine is compatible with BeagleBone Black
================================================================================
5 4 3 2 1 

========================================
Checking for Valid bbb-eeprom header
==> Valid bbb-eeprom header found [335]
========================================

================================================================================
Checking running system
==> Copying: [/dev/mmcblk0] -> [/dev/mmcblk1]
==> lsblk:
----------------------------------------
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1boot0 179:16   0    2M  1 disk 
mmcblk1boot1 179:24   0    2M  1 disk 
mmcblk0      179:0    0  7.5G  0 disk 
`-mmcblk0p1  179:1    0  3.3G  0 part /
mmcblk1      179:8    0  3.6G  0 disk 
`-mmcblk1p1  179:9    0  3.6G  0 part 
----------------------------------------
==> df -h | grep rootfs:
----------------------------------------
==> Giving you time to check...
10 9 8 7 6 5 4 3 2 1 
================================================================================

================================================================================
Preparing drives

----------------------------------------
==> Erasing: /dev/mmcblk1
----------------------------------------
108+0 records in
108+0 records out
113246208 bytes (113 MB) copied, 4.48849 s, 25.2 MB/s
----------------------------------------
[   34.926748] random: nonblocking pool is initialized
108+0 records in
108+0 records out
113246208 bytes (113 MB) copied, 2.92456 s, 38.7 MB/s
----------------------------------------
==> Erasing: /dev/mmcblk1 complete
----------------------------------------

----------------------------------------
==> Loading /boot/SOC.sh
************************************************************
#!/bin/sh
format=1.0

board=am335x_evm

bootloader_location=dd_spl_uboot_boot
bootrom_gpt=

dd_spl_uboot_count=1
dd_spl_uboot_seek=1
dd_spl_uboot_conf=notrunc
dd_spl_uboot_bs=128k
dd_spl_uboot_backup=/opt/backup/uboot/MLO

dd_uboot_count=2
dd_uboot_seek=1
dd_uboot_conf=notrunc
dd_uboot_bs=384k
dd_uboot_backup=/opt/backup/uboot/u-boot.img

boot_fstype=ext4
conf_boot_startmb=4
conf_boot_endmb=
sfdisk_fstype=L

boot_label=BOOT
rootfs_label=rootfs

#Kernel
dtb=
serial_tty=ttyO0
usbnet_mem=

************************************************************
==> Loaded

----------------------------------------

================================================================================
Writing bootloader to [/dev/mmcblk1]
----------------------------------------
==> Figuring out options for SPL U-Boot copy ...
===> Will use : count=1 seek=1 conv=notrunc bs=128k
==> Figuring out options for U-Boot copy ...
===> Will use : count=2 seek=1 conv=notrunc bs=384k
==> Copying SPL U-Boot with dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k
------------------------------------------------------------
0+1 records in
0+1 records out
68344 bytes (68 kB) copied, 0.0130402 s, 5.2 MB/s
------------------------------------------------------------
==> Copying U-Boot with dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384k
------------------------------------------------------------
0+1 records in
0+1 records out
376504 bytes (377 kB) copied, 0.0526325 s, 7.2 MB/s
------------------------------------------------------------
Writing bootloader completed
================================================================================

================================================================================
Partitionning /dev/mmcblk1
----------------------------------------
==> sfdisk parameters:
sfdisk: [sfdisk from util-linux 2.25.2]
sfdisk: [sfdisk --force --Linux --in-order --unit M /dev/mmcblk1]
sfdisk: [4,,L,*]
==> Partitionning
------------------------------------------------------------
sfdisk: Checking that no-one is using this disk right now ...
[   38.092540]  mmcblk1: p1
sfdisk: OK

Disk /dev/mmcblk1: 116736 cylinders, 4 heads, 16 sectors/track
sfdisk:  /dev/mmcblk1: unrecognized partition table type
Old situation:
sfdisk: No partitions found
New situation:
Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/mmcblk1p1   *     4   3647   3644    3731456   83  Linux
/dev/mmcblk1p2         0      -      0          0    0  Empty
/dev/mmcblk1p3         0      -      0          0    0  Empty
/dev/mmcblk1p4         0      -      0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
------------------------------------------------------------

==> Partitionning Completed
==> Generated Partitions:
------------------------------------------------------------

Disk /dev/mmcblk1: 116736 cylinders, 4 heads, 16 sectors/track
Units: cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk1p1   *    128  116735  116608    3731456   83  Linux
/dev/mmcblk1p2          0       -       0          0    0  Empty
/dev/mmcblk1p3          0       -       0          0    0  Empty
/dev/mmcblk1p4          0       -       0          0    0  Empty
------------------------------------------------------------
================================================================================

================================================================================
Preparing future rootfs to receive files
----------------------------------------

==> Formatting rootfs with mkfs.ext4 -c -O ^metadata_csum,^64bit /dev/mmcblk1p1 -L rootfs
--------------------------------------------------------------------------------

mke2fs 1.43 (17-May-2016)
Discarding device blocks: done                            
Creating filesystem with 932864 4k blocks and 233392 inodes
Filesystem UUID: c307bc0c-2a35-4265-92d3-374c33d442a5
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Checking for bad blocks (read-only test): done                                                 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

--------------------------------------------------------------------------------
==> Formatting rootfs: /dev/mmcblk1p1 complete
==> Creating temporary rootfs directory (/tmp/rootfs)
==> Mounting /dev/mmcblk1p1 to /tmp/rootfs
[  150.128665] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)

================================================================================

================================================================================
Copying: Current rootfs to /dev/mmcblk1p1
----------------------------------------
==> rsync: / -> /tmp/rootfs
----------------------------------------
          2.48G  99%    3.19MB/s    0:12:23 (xfr#73793, to-chk=0/89390)   
----------------------------------------
==> Copying: Kernel modules
===> Creating directory for modules
===> rsync: /lib/modules/4.4.30-ti-r64/ -> /tmp/rootfs/lib/modules/4.4.30-ti-r64/
----------------------------------------
         91.72M 100%    3.98MB/s    0:00:21 (xfr#2454, to-chk=0/2861)   
----------------------------------------
Copying: Current rootfs to /dev/mmcblk1p1 complete
================================================================================

================================================================================
Final System Tweaks:
----------------------------------------
==> Applying SSH Key Regeneration trick

==> Found pre-existing uEnv file at /tmp/rootfs/boot/uEnv.txt. Using it.
********************************************************************************
DATA-REMOVED-TO-REDUCE-OVERALL-TEXT-SIZE

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

********************************************************************************

Device UUID should be: c307bc0c-2a35-4265-92d3-374c33d442a5
==> Put root uuid in uEnv.txt

==> Generating: /etc/fstab
Device UUID should be: c307bc0c-2a35-4265-92d3-374c33d442a5
===> /etc/fstab generated
****************************************
# /etc/fstab: static file system information.
#
UUID=c307bc0c-2a35-4265-92d3-374c33d442a5  /  ext4  noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  defaults  0  0
****************************************

==> /boot/uEnv.txt: disabling eMMC flasher script
****************************************
DATA-REMOVED-TO-REDUCE-OVERALL-TEXT-SIZE

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

uuid=c307bc0c-2a35-4265-92d3-374c33d442a5
****************************************

================================================================================
Tearing down future rootfs
----------------------------------------

==> Unmounting /tmp/rootfs
================================================================================
================================================================================
Tearing Down script environment
==> Unmounting /tmp
==> Stopping Cylon LEDs ...
==> Setting LEDs to none
==> Force writeback of eMMC buffers by Syncing: /dev/mmcblk1
/opt/scripts/tools/eMMC/functions.sh: line 150:   619 Terminated              cylon_leds
----------------------------------------
100000+0 records in
100000+0 records out
51200000 bytes (51 MB) copied, 1.24579 s, 41.1 MB/s
----------------------------------------
===> Syncing: /dev/mmcblk1 complete
==> This script took 908 seconds to run
================================================================================

==> Setting LEDs to default-on
==> Displaying mount points
--------------------------------------------------------------------------------
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=55602,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=99952k,mode=755)
/dev/mmcblk0p1 on / type ext4 (ro,relatime,data=ordered)
--------------------------------------------------------------------------------

================================================================================
eMMC has been flashed: please wait for device to power down.
================================================================================
We are init
[  922.572957] systemd[1]: System time before build time, advancing clock.
[  922.594021] systemd[1]: Failed to insert module 'kdbus': Function not implemented
[  922.626422] systemd[1]: systemd 230 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYP)
[  922.645550] systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 8 (jessie)!

[  922.660940] systemd[1]: Set hostname to <beaglebone>.
[  923.331922] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[  923.344817] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[  OK  ] Set up automount Arbitrary Executab...ats File System Automount Point.
[  923.368079] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[  923.379614] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  923.399556] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[  923.412180] systemd[1]: Created slice system-getty.slice.
[  OK  ] Created slice system-getty.slice.
[  923.427397] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  923.448092] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  923.463206] systemd[1]: Reached target Encrypted Volumes.
[  OK  ] Reached target Encrypted Volumes.
[  923.475919] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[  923.491868] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[  923.511129] systemd[1]: Reached target Slices.
[  OK  ] Reached target Slices.
[  923.523531] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[  923.535527] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[  923.555418] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[  923.567546] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  923.587121] systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
[  923.599201] systemd[1]: Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems (Pre).
[  923.619125] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[  923.631478] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  923.651544] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[  923.667761] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[  923.694418] systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
[  923.779282] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[  923.899028] systemd[1]: Starting LSB: Set console font and keymap...
         Starting LSB: Set console font and keymap...
[  923.963534] systemd[1]: Mounting /sys/kernel/debug...
         Mounting /sys/kernel/debug...
[  924.056108] systemd[1]: Starting Create list of required static device nodes for the current kernel...
         Starting Create list of required st... nodes for the current kernel...
[  924.131558] systemd[1]: Starting File System Check on Root Device...
         Starting File System Check on Root Device...
[  924.254989] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  924.295213] systemd[1]: Mounted /sys/kernel/debug.
[  OK  ] Mounted /sys/kernel/debug.
[  924.311890] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started LSB: Set console font and keymap.
[  OK  ] Started Create list of required sta...ce nodes for the current kernel.
[  OK  ] Started File System Check Daemon to report status.
         Starting Create Static Device Nodes in /dev...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Configuration File System.
[  OK  ] Started File System Check on Root Device.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Apply Kernel Variables.
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
         Starting LSB: Tune IDE hard disks...
         Starting LSB: Set preliminary keymap...
[  OK  ] Started LSB: Set preliminary keymap.
         Starting Remount Root and Kernel File Systems...
[  925.296572] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Flush Journal to Persistent Storage...
         Starting udev Coldplug all Devices...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Load/Save Random Seed...
[  OK  ] Started LSB: Tune IDE hard disks.
[  OK  ] Started Load/Save Random Seed.
[  925.648431] systemd-journald[8627]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target System Initialization.
         Starting Restore Sound Card State...
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
[  OK  ] Started Regular background program processing daemon.
         Starting LSB: Start daemon at boot time...
         Starting System Logging Service...
[  OK  ] Started BB WL18xx wlan0 Service.
         Starting Generic Board Startup...
         Starting Restore /etc/resolv.conf i...e the ppp link was shut down....
         Starting Cape Manager Service...
[  OK  ] Started D-Bus System Message Bus.
         Starting Connection service...
         Starting LSB: Start busybox udhcpd at boot time...
[  OK  ] Started System Logging Service.
[  OK  ] Started Restore Sound Card State.
[  OK  ] Started Restore /etc/resolv.conf if...ore the ppp link was shut down..
[  OK  ] Started Cape Manager Service.
[  OK  ] Started LSB: Start daemon at boot time.
[  OK  ] Started LSB: Start busybox udhcpd at boot time.
[  OK  ] Started Connection service.
[  OK  ] Started Login Service.
         Stopping Entropy daemon using the HAVEGE algorithm...
         Starting Store Sound Card State...
         Stopping Login Service...
[  929.993775] net eth0: initializing cpsw version 1.12 (0)
[  929.999222] net eth0: initialized cpsw ale version 1.4
[  930.004452] net eth0: ALE Table size 1024
         Stopping LSB: Start daemon at boot time...
[  OK  ] Removed slice system-getty.slice.
         Stopping Regular background program processing daemon...
         Stopping System Logging Service...
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Removed slice system-serial\x2dgetty.slice.
[  OK  ] Stopped target System Time Synchronized.
[  930.249495] net eth0: phy found : id is : 0x7c0f1
         Stopping LSB: Start busybox udhcpd at boot time...
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  930.388687] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
         Stopping Connection service...
[  OK  ] Stopped Login Service.
[  OK  ] Stopped LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Stopped Entropy daemon using the HAVEGE algorithm.
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Generic Board Startup.
[  OK  ] Stopped Connection service.
[FAILED] Failed to start Store Sound Card State.
[  OK  ] Stopped LSB: Start daemon at boot time.etails.
[  OK  ] Stopped LSB: Start busybox udhcpd at boot time.
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Swap.
         Stopping Load/Save Random Seed...
         Stopping Update UTMP about System Boot/Shutdown...
         Stopping Network Time Synchronization...
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Stopped target Encrypted Volumes.
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...
[  932.011297] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  932.062286] systemd-journald[8627]: Received SIGTERM from PID 1 (systemd-shutdow).
[  932.099302] systemd-udevd[8667]: worker [8725] did not accept message -111 (Connection refused), kill it
[  932.111351] systemd-udevd[8726]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.123985] systemd-udevd[8703]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.136314] systemd-udevd[8711]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.149269] systemd-udevd[8698]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.161750] systemd-udevd[8727]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.173900] systemd-udevd[8694]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.186008] systemd-udevd[8712]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.198385] systemd-udevd[8697]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.211067] systemd-udevd[8702]: Process '/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules' terminated by signal TERM.
[  932.259512] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  932.285993] systemd-shutdown[1]: Unmounting file systems.
[  932.293043] systemd-shutdown[1]: Remounting '/' read-only with options 'errors=remount-ro,data=ordered'.
[  932.539525] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro,data=ordered
[  932.628497] systemd-shutdown[1]: Remounting '/' read-only with options 'errors=remount-ro,data=ordered'.
[  932.639457] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro,data=ordered
[  932.647213] systemd-shutdown[1]: All filesystems unmounted.
[  932.652886] systemd-shutdown[1]: Deactivating swaps.
[  932.658354] systemd-shutdown[1]: All swaps deactivated.
[  932.663811] systemd-shutdown[1]: Detaching loop devices.
[  932.675994] systemd-shutdown[1]: All loop devices detached.
[  932.681861] systemd-shutdown[1]: Detaching DM devices.
[  932.687763] systemd-shutdown[1]: All DM devices detached.
[  932.715728] systemd-shutdown[1]: Powering off.
[  932.739436] musb-hdrc musb-hdrc.1.auto: remove, state 4
[  932.744819] usb usb1: USB disconnect, device number 1
[  932.749929] usb 1-1: USB disconnect, device number 2
[  932.756759] musb-hdrc musb-hdrc.1.auto: USB bus 1 deregistered
[  932.766976] reboot: Power down
[  932.770219] System will go to power_off state in approx. 1 second

U-Boot SPL 2016.11-rc3-00002-g73df7f7 (Nov 04 2016 - 15:20:36)
Trying to boot from MMC2


U-Boot 2016.11-rc3-00002-g73df7f7 (Nov 04 2016 - 15:20:36 -0500), Build: jenkins-github_Bootloader-Builder-479

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: MII MODE
cpsw
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Bad device 0:2 0x82000000 **
** Bad device 0:2 0x82000000 **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
5977 bytes read in 79 ms (73.2 KiB/s)

You can see this behavior here:

[ 932.766976] reboot: Power down

[ 932.770219] System will go to power_off state in approx. 1 second

U-Boot SPL 2016.11-rc3-00002-g73df7f7 (Nov 04 2016 - 15:20:36) Trying to boot from MMC2

[EDIT] What could cause this BBB to power up on it's own after it's been issued either a "halt" or "poweroff" command?

\$\endgroup\$
  • \$\begingroup\$ You haven't actually asked a question. The cause may be something with the pmic, a solution might be having the script read some metadata before it tries to flash and not flash over a complete version of the same target. Or require user input. If you are automating things I'd avoid a card to begin with, but at the least make a test system kick off the process over a serial connection and monitor the output, recording "done" against a hardware serial number or one soft assigned at the time of flashing and handle any other uniqueness like instance-specific certs. \$\endgroup\$ – Chris Stratton Dec 12 '18 at 15:07
  • \$\begingroup\$ I am not familiar with this particular device, but it may happen that something causes device to turn on and resurrect from shutdown state. Probably something got set in the U-boot environment, causing this behavior. \$\endgroup\$ – Anonymous Dec 13 '18 at 14:34
  • \$\begingroup\$ "Something" meant some external event - which devices do you have connected to the board? Ethernet? USB? \$\endgroup\$ – Anonymous Dec 13 '18 at 14:46
  • \$\begingroup\$ @ChrisStratton I've added my question that seemed to not be obvious. Anonymous- Nothing except power and the SD card are present. The odd thing that I think you're all overlooking, is that this very same SD card works on 90% of other BBB, and every now and then does this on one of them. \$\endgroup\$ – While-E Dec 13 '18 at 14:57
  • \$\begingroup\$ We are not overlooking; you provide insufficient data for troubeshooting. If same SD-card image is used every time (same = no modification to SD-card contents), same SD-card device is used every time, and 90% it works and 10% it does not work as expected, then you either have 10% failure rate of your hardware, there's something different in firmware (e.g. U-boot), or there's a problem with power. \$\endgroup\$ – Anonymous Dec 13 '18 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.