Help Needed: Flashing eMMC from SD card (BBB)

flash_eMMC.txt (3.8 KB)

I’m trying to flash a new image to my BBB. I used the BeagleBoard Imager to BeagleBone Black Debian 12 v5.10.x-ti to an SD card, and modified /boot/uEnv.txt to uncomment the line

##enable Generic eMMC Flasher:
cmdline=init=/usr/sbin/init-beagle-flasher

I held S2 button while powering on, and attached the serial output here as a file.

Just run:

sudo beagle-flasher

and it’ll flash the ‘other’…

Looking at your boot log, it ignored the microSD…

Regards,

I mounted the SD card from the BBB, and ran

debian@beaglebone:/mnt/usr/sbin$ sudo ./beagle-flasher 

And I get this

--------------------------------------------------------------------------------
Version: [1.20250527.0, add new fat-swap-rootfs layout...]
--------------------------------------------------------------------------------
Example: /etc/default/beagle-flasher
--------------------------------------------------------------------------------
source=/dev/mmcblk0
destination=/dev/mmcblk1
rfs_partition=single
rfs_rootfs_type=ext4
rfs_rootfs_startmb=4
bootloader=/opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh
flash_back=beaglebone-black-emmc-to-microsd

This looks right to me, but what do I know. Frankly, I’m a little confused in what context I should be executing the command.

it should start flashing…

What does sudo beagle-version show?

Took me a second to find…

root@beaglebone:/mnt/usr/bin# ./beagle-version 
eeprom:[A335BNLT00C02324SBB27824]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2022.04-gb4b56c73 (Oct 28 2025 - 17:45:28 +0000)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-00002-g31a8ae0206 (May 13 2020 - 09:26:17 -0500)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g31a8ae0206]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0]
kernel:[4.19.94-ti-r42]
nodejs:[v10.15.2]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-customizations]:[1.20200306.0-0rcnee0~buster+20200306]
pkg:[bb-usb-gadgets]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[kmod]:[26-1]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker]
cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_co]
dmesg | grep remote
[   58.883334] remoteproc remoteproc0: wkup_m3 is available
[   58.967718] remoteproc remoteproc0: powering up wkup_m3
[   58.967751] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[   58.968034] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   61.287777] remoteproc remoteproc1: 4a334000.pru is available
[   61.290109] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   61.287777] remoteproc remoteproc1: 4a334000.pru is available
[   61.287948] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[   61.290109] remoteproc remoteproc2: 4a338000.pru is available
[   61.290286] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[    0.921809] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.935016] gpio-of-helper ocp:cape-universal: ready
dmesg | grep wlcore
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Yeah your in the eMMC..

Where you are right now, just hold the ‘usr’ button, and push the ‘reset’ button… Lift finger only after the 4 leds turn on..

Regards,

No, luck, it still boots from the eMMC. When I go into the u-boot console, I can see mmc0. I tried running mmc dev 0 followed by boot, but it didn’t seem to help anything either.

Could it be defaulting to the eMMC, since no boot order is specified?

When the boot button is held, a newer version of u-boot is used (2019 vs. 2022). Does that mean that the SD card is being accessed?

Yeap… when you see u-boot loading 2022, that means it’s booting from microSD, and it should boot first before eMMC..

Regards,

Okay, so I switched to an older image (AM335x 11.7 2023-09-02 4GB microSD IoT) to see if that would help. I then went into the u-boot console and selected mmc0 as the boot device, which can be seen here

=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> boot
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
** Invalid partition 2 **
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
switch to partitions #0, OK
mmc1(part 0) is current device

It seems like it tries to boot from the sd card, fails for some reason and falls back to the emmc… Any thoughts on why?