Template:GLSDK Using EMMC Boot

Using eMMC Boot
eMMC boot method is the same as MMC/SD flashing and booting procedure. Format MMC/SD card and create boot/rootfs partition (refer to Software development setup section).

$ sudo ${INSTALL_DIR}/bin/mksdboot.sh --device /dev/sdY --sdk ${INSTALL_DIR}

The MMC/SD boot partition contains MLO,u-boot.img and uenv.txt. The rootfs partition contains ext4 file system with kernel & DTBs in rootfs/boot directory. Formatting of eMMC device can be done by using mk-eMMC-boot.sh script. Boot the EVM with MMC/SD boot mode first and then run the mk-eMMC-boot.sh script to create the eMMC partitions.

Partitioning and formatting eMMC

 * Boot kernel using MMC/SD boot mode (refer to Software development setup section).
 * mount the MMC/SD boot partition, create uenv-emmc.txt.

# mount /dev/mmcblk1p1 /mnt # cp /mnt/uenv.txt /mnt/uenv-emmc.txt Note: edit /mnt/uenv-emmc.txt and set rootfs=/dev/mmcblk0p2 in bootargs.

Note: Edit mk-eMMC-boot.sh script file and make sure "mmc_dev" point to appropriate MMC/SD device node (/dev/mmcblkX).
 * consider /dev/mmcblk0 is eMMC device, then use the following script to partition the eMMC device.The mk-eMMC-boot.sh will create boot, rootfs partition on eMMC device and copy the all files from MMC/SD card to eMMC.

#./mk-eMMC-boot.sh --device /dev/mmcblk0


 * reboot EVM to u-boot prompt, and set environment variables "mmcdev" and the "bootpart" point to eMMC device.

#env default -a #setenv bootpart 1:2 #setenv mmcdev 1 #saveenv


 * Set boot switches to EMMC boot mode.

Set SW2[7..0] = 00111000


 * Remove MMC/SD card and reboot the EVM, now should boot from eMMC device.

Partitioning and formatting eMMC from Host PC through USB
The ums (USB Mass Storage feature) command in U-Boot can be used to expose the MMC as USB storage drive (/dev/sdX) to Host PC.

Syntax: ums mmc 


 * Setup: Connect USB0 port of the EVM to Ubuntu host PC.

From U-boot prompt => ums 0 mmc 0
 * Exposing MMC/SD as storage media

=> ums 0 mmc 1
 * Exposing eMMC as storage media

This command will expose the mmc device as storage device (/dev/sdX) to Ubuntu PC, further user can mount and partition, format and copy the files to device.

Description
This template describes how to use eMMC Boot mode on.

Parameters
This template takes following parameters - platform, in DRA7xx, OMAP5

Example
To use this template simply add the following line to your wiki page.

Here's how it will look in your wiki page: