How do you generate BBB-eMMC-flasher-2013.05.28.img.xz ?

I’ve looked around, but I’ve been unable to find instructions on how to generate something similar to the BBB emmc flasher image. I know how to build an image for BBB using Angstrom, but is there a specific target or some sort of script to generate my own BBB emmc flasher image?
I want to be able to make an SD card to flash my custom builds.

(sorry if repost, posted to unofficial beaglebone group on accident initially)

Hey,

After deploying your image to the BBB, you can save it with the command :

sudo dd if=/dev/sdb of=/users/toto/beagle.img

It’s the only way that I know.

Micka,

This is what I use: https://github.com/beagleboard/meta-beagleboard/blob/master/contrib/bone-flash-tool/emmc-prepare.sh

It needs to run with root permissions, so be *very* careful when using it. Use an existing image as a base.

Koen,
Thanks! this is what I was looking for.

I will also note that it caused me a bit of confusion that /usr/bin/emmc.sh was the actual script that was running(which cds to /build and runs), and not the emmc.sh in /build. I kept editing the one in /build and wondered why nothing was happening. Perhaps a comment in emmc.sh or moving the one in /build would help?

Neabex wrote:

I've looked around, but I've been unable to find instructions on how
to generate something similar to the BBB emmc flasher image. I know
how to build an image for BBB using Angstrom, but is there a specific
target or some sort of script to generate my own BBB emmc flasher image?
I want to be able to make an SD card to flash my custom builds.

so far, there are no instructions to generate a flasher image. generating the image involves actually running it on the real hardware first.

for tinkering with custom builds I would recommend to simply boot and run it from an sd card, that involves just simply copying kernel and root file sytem to the card. You might want to delete MLO from the emmc to make it boot from SD always.

Hi Koen,

I’m actually working with the Ubuntu distro for BBB and would like to create an eMMC flasher version using a custom kernel build. Robert C. Nelson’s page for the Ubuntu distro only includes an eMMC flasher for a prebuilt Ubuntu image. Would I be able to use the “bone-flash-tool” script that you referenced to do this? And are there any instructions for using the shell script (posted on a Wiki somewhere)? I haven’t done too much with shell scripting so I don’t quite follow everything that this script is doing.

Thanks for any tips you can offer.
-Mike

Hi Mike,

Your related post on another forum suggests that you are still chasing this problem. There are instructions here:

http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents

For creating a microSD card with an autorun.sh script that will restore your .img file to the eMMC. I’ve used this successfully to restore a BBB to a known good state.

Hope this helps!

I actually had trouble using that script (The USER0 LED didn’t ever blink steadily – it kept its “heartbeat” pattern). I was finally able to restore using the ssh method, though. It turns out that when you boot from the microSD the eMMC is actually mmcblk1 – not mmcblk0. I didn’t realize that until I started mounting the different partitions and inspecting their contents.

For me, the following commands worked:

To create a backup:

  1. Create a bootable microSD with a standalone image (Not an eMMC flasher image. I used Ubuntu http://elinux.org/BeagleBoardUbuntu#Raring_13.04_armhf)

  2. Insert the microSD card with the board powered off. I think the board should automatically boot from the microSD card when power is applied.

  3. Connect to the BBB through ssh

  4. From the BBB, copy the eMMC contents to the host computer

sudo dd if=/dev/mmcblk1 bs=1M | ssh mdarling@192.168.7.1 “dd of=/home/mdarling/Desktop/BBB_Backup.img bs = 1M”

To restore the backup:

  1. Boot from a microSD card as described above

  2. Connect to the BBB via ssh

  3. From the BBB,

ssh mdarling@192.168.7.1 “dd if=/home/mdarling/Desktop/BBB_Backup.img bs=1M” | sudo dd of=/dev/mmcblk1 bs=1M

For me, a backup/restore using the “dd” method took under 10 minutes.

Thanks for your help, “Tumbleweed”.