Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to flash BeagleBone Black eMMC with Debian 8.2 image?

This site, says to...

To turn these images into eMMC flasher images, edit the /boot/uEnv.txt file on the Linux partition on the microSD card and remove the '#' on the line with 'cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh'. Enabling this will cause booting the microSD card to flash the eMMC.

No such line exists in the uEnv.txt file. Nor do I see the init-eMMC-flasher-v3.sh file anywhere on the boot partition, although it may be on the hidden partition (at least hidden to Windows).

I have tried holding S2 (which seems to be an older (maybe?) method of flashing) with no success.

like image 713
Cody Smith Avatar asked Nov 26 '15 04:11

Cody Smith


3 Answers

The solution turned out to be pretty simple, although completely not explained.

Simply boot up Debian 8.2, login using debian/temppwd

Navigate to /opt/scripts/tools/eMMC/

cd /opt/scripts/tools/eMMC/

and run the file manually...

sudo ./init-eMMC-flasher-v3.sh

Wait for the process to finish, power off device, remove the SD card and simply power the device back on. It will now boot off the eMMC.

like image 91
Cody Smith Avatar answered Dec 09 '22 06:12

Cody Smith


The line mentioned in the instructions is the last line of uEnv.txt. I just downloaded a fresh copy of bone-debian-8.2-tester-2gb-armhf-2015-11-12-2gb.img.xz and /boot/uEnv.txt looks like this after I uncommented the eMMC flasher command:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.1.12-ti-r29
#uuid=
#dtb=

##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..)

##BeagleBone Black: HDMI (Audio/Video) disabled:
#dtb=am335x-boneblack-emmc-overlay.dtb

##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb

##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb

##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb

##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb

##BeagleBone Black: replicape
#dtb=am335x-boneblack-replicape.dtb

##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb

cmdline=coherent_pool=1M quiet cape_universal=enable

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable video=HDMI-A-1:1024x768@60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=

##Disable HDMI/eMMC (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G

##Disable HDMI (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

##Disable eMMC (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONE-EMMC-2G

##Audio Cape (needs HDMI Audio disabled) (v3.8.x)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI
#cape_enable=capemgr.enable_partno=BB-BONE-AUDI-02


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

The last line is the one you're looking for. If it's not there for some reason, just add it and save the file. Then when booting from SD, the LEDs will display a 'back and forth' pattern indicating that eMMC flashing is underway.

like image 41
Paul Ratazzi Avatar answered Dec 09 '22 07:12

Paul Ratazzi


Both boot/uEnv.txt and /opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh are on the Linux partition of the microSD card, which is why you can't see them from Windows.

If you plugged that card into a Linux machine, you would see a Linux-formatted rootfs volume, in addition to the FAT32 BEAGLEBONE partition. In fact, you can plug it into an already-booted BeagleBone, and it should appear under /media/rootfs.

In your own answer, you discovered another approach, by booting the SD card itself to get at its Linux partition. That works, but is possibly riskier, since you're running the flasher from within a fully multitasking Linux instead of letting it run alone as the init process.

like image 34
Harry Tsai Avatar answered Dec 09 '22 08:12

Harry Tsai