eMMC flashing suggestions

for other newbies, here is a summary of my flashing/updating experiences.

debian is the recommend distribution now. (not ubuntu, not angstrom, not others, even though they probably work, too.)

the posted debian 7.5 standard releases are too finicky. I always got something different and weird. half the time it would just access both, half the time it would stop with all four LEDs black. sometimes it got stuck at its hdmi conversation. once or twice, I got a red-letter screen telling me that it was flashing, but it never got far.

in contrast, when I tried the new console flasher release, debian 7.7 (the one that has an md5sum of 1a70…), I had instant success on both rev B and rev C boards. unlike the 7.5 releases, which had two partitions, this one has only one. so, let me recommend 7.7 to anyone like me.

here is a summary of the upgrading process. the information is already spread in many different places, but here is a summary (again) for the google cache:

  • on your linux laptop computer: download the img.xz file, check the md5sum, use unxz on the image file, and dd bs=1M if=*.img of=/dev/mmcblk0 (where /dev/mmcblk0 is the flash location on my notebook). the dd should report that you copied about 1.8GB. on a $10 sdhc premium 32gb card (300x), this takes about 90 seconds. then sync (just to make sure). then remove and reinsert the disk to make sure that a linux partition shows up (it is called rootfs and is an ext4). umount it cleanly.
  • unpower your BBB. insert the sdhc. hold the button near the card slot, and power up the BBB.
  • the USB power supply on a dual-head USB cable is enough.
  • the display is active during the flash and can be connected to see the progress. it works, even if you only have USB power to the BBB.
  • with a fast sdhc card, flashing the console image to the eMMC can take as little as 5-15 minutes.
  • during the flashing, the LEDs blink in a succinct pattern back and forth.
  • four solid LEDs means you succeeded. four black LEDs mean you failed. on the HDMI console, it will state when it has halted.
  • if you reboot, you should see a nice penguin at the top left of the display. the boot should take about a minute. the default username (debian) and password (temppwd) are displayed on the hdmi login screen.

unlike the ubuntu images, the hdmi display output on this debian is rock-solid. the USB “magic” (which makes the BBB claim to be a mass storage device over USB and which runs a network over the same device, so that you can even point your browser at 192.168.7.2) is not in the console images. however, you do have a full computer with display output and keyboard support now. if the tcp/ip ethernet cable network is connected during reboot, it will come up. this means you can then run “apt-get upgrade” and “apt-get update”.

when I figure out how to install and uninstall the usb magic (earlier posts), I will try to add it to this post.

[thank you, robert, for having done the hard work.]

You can enable, the usb magic via:

sudo apt-get update ; sudo apt-get install udhcpc ; sudo reboot

Regards,

Not always...rsync hits both media devices hard as it transfers data
between the microSD & eMMC... Lots of power spikes, you really need a
good 5 Volt Dc (2amp) wall plug to reliable flash..

Regards,

thank you, robert.

[video] I installed fbset. “apt-get install fbset”. on a 1920x1080 monitor, it selects 1280x800. 1280x1024 is a limit of the 125MHZ clock the AM3359 . this is why xres 1920 yres 1080 is a no go. as robert has pointed out (repeatedly), this can be changed by hand at boot time in uEnv.txt . (on my monitor, one video problem is that it cuts off a little at the bottom.)
https://groups.google.com/forum/#!searchin/beagleboard/Robert%7Csort:date/beagleboard/Nb5TQxykUo4/9MIJYFQB43YJ

Q: can the arm kernels use VESA text modes, such as 60x132 ? I don’t need to display graphics in a frame buffer. I would be perfectly happy with a text mode. (my guess is no.)

[usb client] apt-get install udhcpc yields busybox and udhcpc . I also installed usbutils . but there must be some other package to get usb to work. it’s not just that the networking over usb does not work, it is also that usb doesn’t present anything on its usb client port to the usb host (i.e., my notebook computer). what package am I missing? (would it make sense to include this by default in 7.8? it’s probably widely needed.)

regards, /iaw

Doh!

Guess i was falling asleep.. "udhcpd" is the client...

sudo apt-get remove udhcpc ; sudo apt-get install udhcpd

Then you also need the script to enable it:

sudo mkdir -p /opt/scripts/boot/
cd /opt/scripts/boot/
sudo wget https://raw.githubusercontent.com/RobertCNelson/boot-scripts/master/boot/am335x_evm.sh
sudo chmod +x am335x_evm.sh

Anywho.. That's not the point of the console image. It's spec'd to
just be enough to boot and flash the eMMC. If you want something
more, "it's the base" to start with <period>...

https://github.com/RobertCNelson/omap-image-builder/blob/master/configs/bb.org-console-debian-stable.conf

./RootStock-NG.sh -c bb.org-console-debian-stable

Regards,

nope, there is still something missing. the client USB port does not identify itself by lsusb from the connected laptop. I am getting power from this port, but no usb bbb device identification.

I am happy to start over, but I don’t know where. I want to flash a working debian image to my beaglebone blacks, rev B and C, with 2GB into the eMMC. console is fine—I don’t need X.

the 7.5 img.xz doesn’t seem to work for me. I can’t flash it.

the 7.7 img.xz works, but now seems too basic (if it is just designed for flashing); and even with the above steps, I can’t seem to get the client USB ident to work. actually, this is probably the last step I need. after getting the USB client magic (id, usb mass storage, and usb networking) to work, I would be operating a non-magical linux device that I could handle myself. (in someone else’s port, I think you mentioned that the usb was not working, but the 1a70b1cb550bd8d0bf4f2c0d43e72cba image had this fixed already.)

I think the RootStock-NG.sh and your .conf file are part of a (complex?) toolchain to build img.xz files. alas, I don’t know this toolchain. looking at http://elinux.org/BeagleBoardDebian#Demo_Image, the only .img.xz file I saw that flashes the eMMC is:

BBB-eMMC-flasher-debian-7.7-console-armhf-2014-10-29-2gb.img.xz

robert—I know you are already doing a lot here, so please forgive my audacity: may I suggest offering a 7.7 .img.xz eMMC flasher that has the usb client port already working? if not, what steps need to be taken for the bbb USB client port to identify itself as a device to the connected desktop USB host?

regards,

/iaw

here is a revised version of my “mini-guide” to using robert nelson’s images for flashing/updating. it is a summary of the OS installation (upgrading) process. the information is already spread in many different places, but here is a summary (again) for the google cache:

debian is the recommend distribution now. (not ubuntu, not angstrom, not others, even though they probably work, too.) yet, I found the official debian 7.5 standard releases to be too finicky. I always got something different and weird. half the time it would just blink to tell me that it would access both uSD and eMMC, half the time it would stop with all four LEDs black. sometimes it got stuck at its hdmi conversation. once or twice, I got a red-letter X screen telling me that it was flashing, but it never got far even then. in contrast, when I tried the new console flasher release, debian 7.7, I had instant success on both rev B and rev C boards. so, let me highly recommend 7.7.

robert has posted images on both http://elinux.org/Beagleboard:BeagleBoneBlack_Debian and http://elinux.org/BeagleBoardDebian . you probably want the site with the colon in it. when you download images, make sure that your md5sum’s are ok. a brief network interruption can lead you to endless tries due to a corrupt image file. the posted md5 is for the xz’ed version, not the unxz’ed img file.

I recommend the lxde image, which you can find when you search for its md5sum, f93a8cdaec59a06198fbc9095320cc2d . in future month, just look for BBW/BBB (All Revs), Flasher: lxde: (xyzMb Free on 2GB eMMC).

  • on your linux laptop computer: download your chosen img.xz file, check the md5sum on the .img.xz file, use unxz on the image file, make sure that it is not mounted, and then “burn-dd” it. I recommend downloading the file into its own directory.:

umount /dev/mmcblk0p1 ## if it is mounted

unxz *.img.xz ## assuming it is the only such file in the directory

dd bs=1M if=*.img of=/dev/mmcblk0

sync

(where /dev/mmcblk0 is the flashable port to your uSD device location on your desktop or notebook).

the dd should report that you copied about 1.8GB. on a $10 uSD premium 32gb card (300x), this takes about 90 seconds. then sync (just to make sure) before you remove it.

I usually then remove and reinsert the disk to make sure that at least one linux partition shows up. if you do this, umount or eject it cleanly right after. on the bbb console images, there is only one partition, called rootfs, which is an ext4. on the lxde images, there are two partitions. again, make sure you umount these after your quick-test.

  • unpower your BBB. insert your burned uSD card in the BBB. you may need to hold the button near the card slot (though my BBBs seem to want to boot from the uSD slot by default), and power up the BBB. if the BBB does not power up, try pressing the power-on button and/or reset buttons where the four LEDs are. (after the flash, you may need to do this again, too, as power-insert by itself may not always start it.)

  • the USB power supply on a dual-head USB cable may or may not be enough. Robert recommends a 2A power supply. I have had luck with 1A. for flashing, I usually also remove the hdmi display and keyboard/mouse (and of course ethernet) to conserve power. I just have one cable, the power, to the BBB.

  • the display is active during the flash and can be connected to see the progress. it seems to work, even if you only have USB power to the BBB, but you have been warned that this is taking chances with power provision.

  • with a fast sdhc card, flashing the uSD image to the eMMC can take as little as 5-15 minutes.

  • during the flashing, the LEDs blink in a very succinct pattern back and forth. at the end, four solid LEDs means you succeeded. four black LEDs mean you failed. on the HDMI console, it will state when it has halted.

  • make sure to remove your uSD card NOW. otherwise, you may be reflashing again!

  • if you reboot, for the console images, you should see a nice penguin at the top left of the display. the boot should take about one minute in total. the default username (debian) and password (temppwd) are displayed on the hdmi login screen. however, root (without password) also works.

NOTES

  • the USB gadget works out of the box on the lxde image 2014-11-19 (md5= f93a8cdae…). the USB gadget port comes alive pretty far towards the end of the boot. this means that when you boot up the BBB, on a connected PC, the BBB will show up as a 1d6b:0104 linux foundation multifunction composite gadget, which means that your connected PC will try to mount it like an external USB drive. also, the lxde image supports network connections into 192.168.7.2. all of this is without configuration and effort.

  • the USB gadget “magic” is not in the console images, as of nov 2014. as far as I can tell, the difference is that the lxde kernel loads g_multi and libcomposite, while the console image does not. however, the console still gives you a full computer with display output and keyboard support. if the tcp/ip ethernet cable network is connected during reboot, it will come up. this means you can then run “apt-get upgrade” and “apt-get update”.

  • unlike the ubuntu 14.04 images, I found the hdmi display output on the debian to be rock-solid, though the descender of the font is a little cut off at the bottom on my monitor. in any case, be aware that ubuntu screen flickering is because of beaglebone black resolution limitations (1280x1024), fallback display resolution, and how your specific monitor works. it’s not that debian is intrinsically better than ubuntu. nevertheless, given that debian is now the official, I would stick to it first.

  • if you want to drive the HDMI display, preferably boot with it connected and make sure your monitor is not asleep. the BBB hdmi port has multiple purposes, and during the boot up tries to configure itself. you may get stuck with flickery no-screen output on your hdmi monitor otherwise.

  • some time during the boot process seems dedicated to the BBB trying to figure out whether its (ethernet) network connection is live and possibly whether it finds various internet gateways and name servers. it boots faster when ethernet is plugged in.

  • you should do an “apt-get update” and then “apt-get upgrade” as soon as you have a live network connection.

  • reboot works, but “shutdown now” does not. as an old linux hack, the idea of pulling a plug without warning scares me.

  • lxde disk: on my 4GB BBB Rev C, the rootfs is 1.4G, with 1.9G available. by default, there seems to be a second partition on /dev/mmcblk0p1, which is the FAT16 partition which I am guessing is used at boot time. “ioping -c 10 .” on the eMMC tells me that I have about 910 iops, with a typical latency of about 1ms. for comparison, this is about twice as fast as what I get from my 32GB Premium 300x Transcend card on the BBB. for comparison, a Macbook Pro with internal SSD, costing only about 30 times as much, has a performance is about 40,000 iops.

  • lxde ram: of my 512MB, running lxde, about 335MB remain free.

hope this helps others. again, thank robert nelson for the hard work.

/iaw