Skip to content

Instantly share code, notes, and snippets.

@smalinux
Forked from Zixuan-Qiao/bbb_flash_emmc.md
Created November 25, 2024 16:33
Show Gist options
  • Save smalinux/d5436c73f2b671f3e1102a9574c6e22a to your computer and use it in GitHub Desktop.
Save smalinux/d5436c73f2b671f3e1102a9574c6e22a to your computer and use it in GitHub Desktop.
Summary on how to flash the onboard eMMC of Beaglebone Black

Beaglebone Black - Flashing the eMMC with the Latest Image

The kernel image that came with the board is usually outdated. Thus, I decided to update it to the latest image by flashing the onboard eMMc with an SD card. The process I followed is documented here.

Required Hardware

Beaglebone Black, PC running on Ubuntu (ver 20.04)

Serial to USB cable, USB type A to mini B cable, power adapter

Micro SD card and adapter

Preparing the SD Card

First download the latest image from https://www.beagleboard.org/distros.

I chose the AM335x 11.7 2023-09-02 4GB eMMC IoT Flasher since my use case does not required the GUI provided by Xfce.

Extract the content with Ubuntu's built-in tool xz-utils:

unxz $name-of-your-downloaded-file$

This step should yield a .img file.

Call up the Startup Disk Creator, which is also a built-in tool of Ubuntu. Insert your SD card. In my case, I just used a brand new SDHC card without any other formatting. Select the .img file and your SD card in the Startup Disk Creator and start the writting process. This took about 3-4 minutes on my host.

Once the process is finished, navigate to the SD card, there should exist a root file system. In its /boot directory, check the content of the uEnv.txt. The last line should look like this:

cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Note that this line should already be uncommented (without a '#' in the front).

Flashing the eMMC

Power off the board, remove all the connections and peripherals. Insert the SD card.

Hold down the S2 button, connect the power cable. I used an adapter that can provide 5V 2A through USB cable.

Wait until all the onboard LEDs light up, then release the button. The LEDs will blink a couple of times and start to light up from left to right then right to left. When the flashing is completed, the LEDs will go off. It took about 5 minutes on my board.

Remove the power and the SD card. Connect the board to the host PC to verify the version of the kernel.

References

  1. https://www.youtube.com/watch?v=_nPj1cCFrRk
  2. https://www.beagleboard.org/distros/am335x-11-7-2023-09-02-4gb-microsd-iot
  3. https://fastbitlab.com/preparing-micro-sd-card-for-sd-boot/
  4. https://learn.adafruit.com/beaglebone-black-installing-operating-systems/flashing-the-beaglebone-black
  5. https://askubuntu.com/questions/1193232/how-do-i-use-an-img-xz-file-or-get-an-img-file-from-it
  6. https://stackoverflow.com/questions/31725206/unable-to-flash-emmc-from-sd-card-beaglebone-black
  7. https://forum.beagleboard.org/t/adding-gui-to-iot/32115/5
  8. https://forum.beagleboard.org/t/beaglebone-black-is-there-a-newer-debian-with-xfce-existing-didnt-found-oct-2023/36336
  9. https://subscription.packtpub.com/book/iot-and-hardware/9781785285059/1/ch01lvl1sec14/booting-your-beaglebone-board-from-a-sd-card
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment