eMMC support is now added to the Beaglebone BSP on Codeplex. eMMC memory is the modern day replacement for bulk NAND memory typically used on embedded devices. eMMC memory, sometimes called managed NAND, has several advantages over traditional NAND memory like:

1. A standard SD bus interface.

2. Expandable capacity using the same hardware footprint.

3. Security features.

4. Indirect memory access.

For these reason, as well as several others, eMMC memory is quickly replacing native NAND memory in most all embedded devices.

Each eMMC device contains a smart controller which handles internal memory management functions. Things like wear leveling, error detection and corrections are now done on the device. These are tasks that use to be done on the host processor in the flash management layer and were the source of much frustration. As the NAND devices got bigger the ECC (Error Correction Code) algorithm had to change to support different geometries. This led to constant code changes and updates. Also, because the processors often needs to boot directly from these devices, the processors internal boot code also had to change or be versatile enough to support the ever changing NAND market. You can see why an eMMC industry standard (JEDEC JESD84) was embraced by both memory manufactures and embedded system designers.

The Beaglebone contains an onboard 2Gb (4Gb on rev C boards) eMMC device which we can boot from when properly prepared. You talk to the eMMC device much like a standard SD card but there are some subtle differences you need to be aware of. Under WEC 7 you can partition and format cards and hard drives using the control panel shell’s Storage Manager utility. In WEC2013 the shell was removed so we lose Storage Manager but we still have access to the equivalent command line utility DISKPART. Unfortunately this utility contains some problems creating MBRs (Master Boot Record) and partition information which is compatible with the AM335X firmware boot code.

Beaglebone’s comes with Linux installed on the eMMC device which has two partitions created with the Linux partitioning utilities. The first partition is approximately 72Mb in size, formatted FAT32 and is marked as the active (or bootable) partition. The second partition is a Linux Ext3 type partition which Windows Embedded, of course, does not understand.

So what are we to do? Well there are several possibilities. One would be just use the Linux partitioning utilities. This works but requires hopping back and forth between operating systems and you must understand the somewhat cryptic command language.

Another option would be just use what is already there. You can just delete all the Linux files on the FAT32 boot partition and replace them with the required Windows Embedded files (MLO, EBOOTSD.NB0 and NK.BIN). This works and once booted you can use the native CE tools to delete the foreign ext3 partition and recreate the second partition as a FAT32 or exfat partition, thus recovering the additional user space on the eMMC device. The problem with this is the boot partition is still set at 72Mb and this may be too small hold some of the larger Windows Embedded images created with many included components.

To solve this last issue we must resize or recreate the boot partition allocating more sectors. I rewrote some pieces of the PARTDISK utility to support the AM335x boot code. Now we can create multiple partitions of varying sizes on the eMMC device. We can also mark the first primary partition as “Active” and make it bootable.

I’ll follow up this post later showing how we can create a script file to do the whole partitioning and formatting in one fell swoop.