Difference between revisions of "Loading Images onto eMMC Devices"
Line 11: | Line 11: | ||
The procedures below required that you have a TFTP and NFS server setup on a host computer. | The procedures below required that you have a TFTP and NFS server setup on a host computer. | ||
+ | |||
For instructions on setting up a TFTP server see the following page: [[Installing TFTP server]] | For instructions on setting up a TFTP server see the following page: [[Installing TFTP server]] | ||
Line 19: | Line 20: | ||
== Creating partitions and formatting eMMC == | == Creating partitions and formatting eMMC == | ||
− | == Extracting | + | Once the Linux command prompt is reached the Linux utilities can be used to create and format partitions. |
+ | The <code>fdisk</code> utility can be used to create partitions on the eMMC. | ||
+ | |||
+ | |||
+ | fdisk /dev/mmcblk0 | ||
+ | |||
+ | For more information about <code>fdisk</code> | ||
+ | http://tldp.org/HOWTO/Partition/fdisk_partitioning.html | ||
+ | |||
+ | After creating the partitions they can formatted with the various <code>mkfs</code> utilities. | ||
+ | |||
+ | Formatting a partition with EXT3: | ||
+ | mkfs.ext /dev/mmcblk0p2 | ||
+ | |||
+ | Formatting a partition with FAT32: | ||
+ | mkdosfs -F 32 /dev/mmcblk0p1 | ||
+ | |||
+ | == Extracting filesystems to eMMC == | ||
+ | |||
+ | mount /dev/mmcblk0p2 /mnt/card | ||
+ | cd /mnt/card | ||
+ | tar xzvf /emac-image.rootfs.tar.gz | ||
+ | |||
== Quick Reference (by Target Type) == | == Quick Reference (by Target Type) == | ||
=== SoM-3517M === | === SoM-3517M === | ||
+ | |||
+ | mkdosfs -F 32 /dev/mmcblk0p1 | ||
+ | mount /dev/mmcblk0p1 /mnt/card | ||
+ | cd /vg-controls | ||
+ | cp MLO uImage u-boot.bin /mnt/card/ | ||
+ | sync | ||
+ | umount /dev/mmcblk0p1 mkfs.ext3 /dev/mmcblk0p2 | ||
+ | mount /dev/mmcblk0p2 /mnt/card | ||
+ | cd /mnt/card | ||
+ | tar xzvf /emac-image-som3517-20120530221838.rootfs.tar.gz | ||
+ | cd .. | ||
+ | sync | ||
+ | umount /dev/mmcblk0p2 | ||
+ | |||
=== SoM-9X25M / IPAC-9X25 === | === SoM-9X25M / IPAC-9X25 === |
Revision as of 11:39, 30 December 2013
Contents
Background
Newer EMAC products have started using eMMC in place of NAND flash. eMMC is an embedded MMC compliant memory that takes the form of an integrated circuit instead of a media card.
U-Boot does not support writing to file systems in eMMC. To overcome this issue, the embedded target has to be boot into Linux using an auxiliary method. Once U-Boot has been loaded into RAM, it can be used to load the target kernel using TFTP and boot into a file system stored in NFS.
Once the board has boot into Linux the eMMC can be partitioned, formatted, and the root file system can be extracted. The SoM-3517M requires a special FAT formatted partition that contains the bootloader and Linux kernel image.
This article explains the general process of writing the eMMC from Linux as well as some specifics related to the programming the SoM-3517M.
The procedures below required that you have a TFTP and NFS server setup on a host computer.
For instructions on setting up a TFTP server see the following page: Installing TFTP server
For installation of a bootable NFS see the following page: Setting up an NFS File Server
For instruction for booting into NFS with U-Boot: Booting with an NFS Root Filesystem
Creating partitions and formatting eMMC
Once the Linux command prompt is reached the Linux utilities can be used to create and format partitions.
The fdisk
utility can be used to create partitions on the eMMC.
fdisk /dev/mmcblk0
For more information about fdisk
http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
After creating the partitions they can formatted with the various mkfs
utilities.
Formatting a partition with EXT3:
mkfs.ext /dev/mmcblk0p2
Formatting a partition with FAT32:
mkdosfs -F 32 /dev/mmcblk0p1
Extracting filesystems to eMMC
mount /dev/mmcblk0p2 /mnt/card cd /mnt/card tar xzvf /emac-image.rootfs.tar.gz
Quick Reference (by Target Type)
SoM-3517M
mkdosfs -F 32 /dev/mmcblk0p1 mount /dev/mmcblk0p1 /mnt/card cd /vg-controls cp MLO uImage u-boot.bin /mnt/card/ sync umount /dev/mmcblk0p1 mkfs.ext3 /dev/mmcblk0p2 mount /dev/mmcblk0p2 /mnt/card cd /mnt/card tar xzvf /emac-image-som3517-20120530221838.rootfs.tar.gz cd .. sync umount /dev/mmcblk0p2