Flashing BBB eMMC with Yocto Image?

I’ll have the students try this, and please correct/insert any commands missed:

Step 1: Boot from the microSD by holding down “S2” and releasing

Step 2: Once booted from the microSD, copy the .img file to the Beagle? FTP? (Need command)

Step 3: As root, run `dd if=.img of=/dev/mmcblk1

Step 4: Power off, remove microSD card and reboot Yocto on the eMMC`

wget http://<something>/<file>.img

Regards,

What if the .img is already saved to a computer. Could it be ftp’d into the beagle that way? Does it need to be in a specific location prior to step 3?

ftp, sure… most browser’s disabled support of that today…

Linux/Mac = use scp it copy it over…

Windows = WinSCP :: Official Site :: Free SFTP and FTP client for Windows

Regards,

1 Like

Any specific location it has to be saved to in the beagle?

Well i assume your Yocto build has a default user… So it’s home directory…

Regards,

Would they even need to boot from the microSD if the .img is copied into the beagle via SFTP from a computer into its home directory? In other words, can’t they boot to the standard Debian image first, copy the Yocto .img into the beagle’s home directory and then run the “dd” command?

Sure.

Edit… On second thought No… Please follow the directions i already listed. You’ve asked for concrete instructions, but in your last message you are making a big assumption or wasting time.

Let’s assume the board is from the factory… Debian is on the eMMC… So booting into eMMC in Debian and then flashing Yocto with dd will fail, as the OS is running from eMMC…

So you’d have to flash Debian on to a microSD first, to boot from Debian and flash the eMMC for Yocto… In which case, you can skip a step and just Flash Yocto to the microSD boot into Yocto from the microSD and flash Yocto to the eMMC.

This method also ensure’s your Yocto image was built corretly for this target, as if it fails to boot from microSD i can pretty much guarantee eMMC will also fail…

So for concrete instructions:

Flash Yocto to microSD:
Boot BBB with Yocto microSD
copy image to Running Yocto
Flash eMMC with dd while running from microSD

Regards,

1 Like

Booted from the microSD card into the Yocto image (Boots fine from SD card so image is good).

Copied the .img file from the PC to the /home directory of the Beagle via SFTP but noticed that the original .img file was 1.19GB on the PC but only 0.25GB after it copied into the /home directory.

Proceeded running the “dd” command from above. Waited until it finished then powered off. Then removed the microSD card and tried to boot back up. Nothing happened, no USR LED activity, just the power light.

Powered down again and inserted the microSD card, and powered up. This time, it booted to the Yocto image, however, “S2” wasn’t held down to boot from the microSD. It booted by itself into the Yocto image. I don’t know where it is booting from now, but it still needs the microSD to boot. Open to any suggestions

Any other suggestions Robert?

if the sha256sum doesn’t match, then you didn’t copy teh image over…

That’s expected, you dd’ed random stuff to the eMMC, so what ever you dd’ed to it is just not bootable…

Figure out why only 0.25GB was copied… then try dd again…

Regards,

There may not be enough space on the partition maybe? Booting from the sd card and trying to copy the .img into it?

Sounds like a Yocto issue…

Sorry that’s not something I work with…

Any luck, Seth?

Hello @danjones ,

Not yet. I have been trying to build the kernel and u-boot lately w/ updates. For some reason, my Yocto image is breaking. Sorry.

Seth

If anyone is still looking for a step-by-step walk-through of flashing the BBB eMMC with an image built using the Yocto project, I have detailed so in a recent article:

https://takeofftechnical.com/yocto-project-linux-bbb/

I hope it helps!

1 Like

Hello @brad-tot ,

Thank you! My yocto broke itself. I probably did something but I am blaming it on yocto for now.

Anyway, this is well put together w/ a lot of instructions and warnings for those of us who do not understand that things get erased in full on building procedures!

Seth

P.S. Anyway…testing will ensue!