How the Flashing of the eMMC Works in a Beaglebone Black Board

Beaglebone black board






So a beaglebone board is an embedded microcontroller which can run the Linux operating system.

The BeagleBone board has an SD card slot at the bottom of the board, which can hold a microSD card. Be aware that the card must be a microSD card, as the full size SD card cannot be directly used with the adapter that the board has.

So with using the microSD card, we can download the latest debian operating system onto the BeagleBone board's eMMC memory.

eMMC stands for embedded MultiMediaCard, which is a type of flash memory made up of NAND gates.

With the eMMC, we can write the latest debian OS to it and boot this operating system.

The BeagleBone black board Rev C has 4GB eMMC memory. The BeagleBone board comes ready with pre-stored debian operating system. Whether this debian operating system is latest would have to be determined.

If it is not the latest one and you want to run the latest one, you can check the debian OS version by using the command, lsb_release -da

You can then compare that version with the latest version on the site, beagleboard.org/latest-images

So there are 4 ways to boot an operating system using a beaglebone device.

The first and default boot mode is the eMMC boot, which allows for the fastest boot time and will enable the board to boot out of the box without having to purchase an SD card.

Another boot method is the SD boot, which boots the operating system from microSD slot. This method can be used to override what is on the eMMC device and can be used to program the eMMC when used in manufacturing process or for files updated.

These are the only boot methods of concern for this article. Other boot methods include the serial boot method and the USB boot method. The serial boot method uses the serial port to allow downloading of the software direct utilizing a separate serial cable to use this port. The USB boot method boots the operating system over the USB port.

Again, we focus on the first 2 boot methods, which is the eMMC boot and the SD boot.

The setup for the board's eMMC memory is shown below, which illustrate these 2 boot methods.


eMMC memory interfaces on a beaglebone black board


So you can see the 4GB of eMMC memory on the board.

There is an mmc1 interface (or port), which connects directly from the eMMC memory to the AM335x processor.

There is an mmc0 interface (or port), which connects from the microSD card to the processor.

Default boot mode for the board will be through the MMC1 port, with an option to change to the MMC0 port for SD card booting. The board is equipped with a single microSD connector to act as the secondary boot source and if selected as such, can be the primary boot source. Booting from the MMC0 port is used to flash the eMMC in the production environment or by the user to update the SW as needed.

To reflash the board's eMMC memory, you have to flash the bootable images and root file system onto the eMMC's memory. We use the SD card to flash the the images and root file system onto the eMMC memory.

To do this, the first thing we do is we download the latest debian operating system.

We then write the bootable image to the SD card using a disk writing software.

Then afterwards, we insert the SD card into the adapter of the BeagleBone board, and then we boot the board from the SD card.

When we boot the OS from the SD card, we execute the eMMC flasher script that is present in the SD card. This eMMC flasher script is part of the image that we downloaded and wrote to the SD card. When this script executes, it partitions the eMMC memory and flashes all the contents of the SD card onto the eMMC memory. This process usually takes a few minutes, about 5-10 minutes to complete.

The eMMC flasher script, which is run from the SD card, partitions the eMMC memory into FAT and EXT4, formats and creates file systems (FAT and ext4) ,copies all contents of the SD card onto the newly created partitions, and then powers down the board when done.

Once the flashing is complete, we can remove the SD card from the adapter and now the board can boot from the eMMC memory alone.

So whenever there are new bootable images available such as from BeagleBone, this process can be repeated each time, so that the latest operating system can be booted from the BeagleBone. The eMMC memory can be reflashed each time.



Related Resources





HTML Comment Box is loading comments...