how to flash debian image in the sd card to emmc in beaglebone black industrial

how to flash debian image in the sd card to emmc in beaglebone black industrial

Hello,

Depending on your image and kernel…

  1. Go to uEnv.txt in /boot/ and change the file to suit booting from eMMC instead.
  2. If you are using a newer image and kernel, like the 5.10.x-ti- kernels, try to use enable-beagle-flasher.

Seth

P.S. If that does not work, if either one or two from above does not work, please reply with the output of these two commands:

cat /etc/dogtag

and…

uname -a

Very helpful. Thanks for sharing .

1)uname -a 5.10
2)BeagleBoard.org Debian Bullseye IoT Image 2023-09-02

how to do this " 1. If you are using a newer image and kernel, like the 5.10.x-ti- kernels, try to use enable-beagle-flasher."

If you want or need to flash the micro SD Card image to the eMMC on the BBB, you can use that script that someone put together. I think @RobertCNelson threw it together for people to flash their eMMC from micro SD Card on the BBB (am335x supported SoC/SiP board).

Anyway, I think your questions is HOW to use it.

  1. try…
    a. enable-beagle-flasher on the command line
  2. If that does not work…
    b. sudo enable-beagle-flasher on the command line
  3. If that does not work…
    c. sudo apt install beagle-flasher

and…

From what I can tell, the enable-beagle-flasher command works on a reboot into the system. You might also try:

beagle-flasher as a command to just copy the data from disk to eMMC.

I just picked this up from DigiKey…


When Debian 11.x (Bullseye) came out, i took some time to re-write the flasher’s… This was back ported to 20.04, and should be pre-installed on your image…

ubuntu@ubuntu:~$ dpkg --list | grep bb-beagle-flasher
ii  bb-beagle-flasher                          1.20220202.3-0~focal+20220301        armhf        beagleboard.org beagle-flasher
There are two commands…

sudo enable-beagle-flasher
ā€œenable-beagle-flasherā€ sets up the media to flash the ā€˜other’ media on the next reboot.

So, if you boot from microSD, that script would enable the microSD to flash the eMMC on the next boot.

The other:

sudo beagle-flasher
This is standalone and just copies the media over to the other media…

So, if you booted from microSD, it would directly copy that over to the eMMC… It’s not 100% safe, like the other, as you are running directly from it, but it’s good enough for most users. (if you have xorg/etc use the other…)…

So if your already running from the eMMC, i’d stick in a blank microSD and run:

sudo beagle-flasher
Once done, i’d then bootup ā€˜once’ with the microSD and run:

sudo enable-beagle-flasher
sudo systemctl poweroff
Now that microSD is setup for auto-flashing every board booted with it…

Regards,

That may be of help. That bit of info can be found here:

I am not even sure if those ideas are around still… Be careful!

1 Like

from: Debian 11.x (Bullseye) - Monthly Snapshot - 2023-10-07

eMMC Flasher

Copy board specific configuration files, example:

sudo enable-beagle-flasher
sudo reboot

Regards,

2 Likes

I cannot say that it is that easy because that is not who I am right now…

Easy! Thank you, sir.

Seth

i can only boot from sd card,can i execute ā€œenable-beagle-flasherā€ this command ?

Thanks it works
I booted from the SD card after downloading and installing the Debian image from beaglebone site, and then I added the following command ā€œsudo beagle-flasherā€ to it.

sudo enable-flasher worked for 5.10 but now i want to flash 4.19 from sd card to emmc,i tried this but it shows error message ā€œbeagle-flasher:command not foundā€

if the debian image is 4.19 ,how to flash it?

Hello everyone,

I’ve been trying to flash the eMMC from the SD card on my BeagleBone Black. This works when I run the command:

sudo enable-beagle-flasher

This modifies the uEnv.txt file on the SD card by uncommenting the line:

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

After a reboot, the device successfully flashes the eMMC from the SD card. However, the script then automatically comments the line again in uEnv.txt.

I’d like the SD card to flash the eMMC every time I boot, without needing to run the command manually or edit the file after each flash.

This used to work in earlier versions — is there a way to restore that behavior?

Thanks in advance!

yeah… that is the behavor:

flasher: arm32/usr/sbin/beagle-flasher Ā· master Ā· BeagleBoard.org / usr-customizations Ā· GitLab

flasher-enable: arm32/usr/sbin/enable-beagle-flasher Ā· master Ā· BeagleBoard.org / usr-customizations Ā· GitLab

me thinking, the eMMC bootloader is loading the eMMC uEnv.txt and messing with you!

Regards,

Thanks for the insight!

That would explain why my changes to the uEnv.txt on the SD card seem to be ignored or overwritten.
Do you know how I can prevent the eMMC bootloader from loading its own uEnv.txt and make sure the system uses the one from the SD card instead?

Is there a recommended way to force the BeagleBone to always use the uEnv.txt from the SD card during boot?

Any suggestions would be much appreciated!

Hi Robert,

sorry about the confusion – I think I mixed up the boot devices. Looks like I was editing the uEnv.txt on the eMMC instead of the SD card.

I’ve now correctly set the uEnv.txt on the SD card and also enabled write protection on it.
It seems to be working as expected now.

Thanks again for your help!