CM-T3x: Linux: Booting from MMC/SD card
CM-T3530 can boot either from on-board NAND flash or from MMC/SD card. There are certain requirements for MMC/SD card format imposed by internal boot ROM of the OMAP35x processor. The following describes how to create bootable MMC/SD card for different use cases.
Contents
Creating a bootable MMC/SD card
In order to create a bootable MMC/SD card compatible with OMAP3x boot ROM, it is necessary to set a special geometry in the partition table. OMAP3x boot ROM can work only with MMC/SD cards that have 255 heads and 63 sectors/track.
Linux
Detailed description how use Linux fdisk utility to adjust MMC/SD card partition table to suit OMAP3x boot ROM requirements can be found at TI Embedded Processors Wiki.
Windows
Windows users can use HP USB Disk Storage Format Tool and follow the steps below:
- Connect the card reader to the Windows machine where the formatting tool has been installed.
- Insert MMC/SD card into the card reader.
- Launch the HP USB Disk Storage Format Tool.
- Select FAT32 as File System.
- Click on Start.
- After formatting is done click OK.
After a bootable MMC/SD card is created it can be used for recovery system startup, for X-Loader and U-Boot testing and for booting Linux entirely from MMC/SD.
Booting X-Loader and U-Boot
- Copy X-Loader to the MMC/SD card's root directory and rename it as MLO. It is essential that the MLO will be the first file created on the MMC/SD card.
- Copy U-Boot binary to the MMC/SD card's root directory and rename it as u-boot.bin.
- Insert the MMC/SD card into SB-T35 MMC/SD slot or the CM-T3x on-board micro SD slot.
- Power on the system while holding SD Boot (SW1) button on SB-T35.
Booting Linux
CM-T3x can boot Linux from MMC/SD card. The MMC/SD card must have geometry parameters compatible with OMAP3x boot ROM (255 heads, 63 sectors/track) and at least two partitions: FAT32 partition for X-Loader, U-Boot and Linux kernel and ext4 partition for root filesystem.
After MMC/SD card geometry and partition table were updated, create FAT32 filesystem on the first partition and ext4 filsystem on the second partition:
sudo mkfs.vfat -F 32 /dev/sdc1 sudo mkfs.ext4 /dev/sdc2
In the above example we assumed that the card was recognized as /dev/sdc.
Mount the MMC/SD card FAT partition and copy X-Loader (MLO), U-Boot (u-boot.bin) and Linux kernel (uImage) to the MMC/SD card:
mkdir /mnt/card mount /dev/sdc1 /mnt/card cp /path/to/cm-t3x-uboot/images/x-load.bin /mnt/card/MLO sync cp /path/to/cm-t3x-uboot/images/u-boot.bin /mnt/card cp /path/to/cm-t3x-linux/images/uImage-cm-t3x.bin /mnt/card umount /mnt/card
Extract the Linux filesystem into the ext4 partition of the MMC/SD card:
mount /dev/sdc2 /mnt/card cd /mnt/card tar xjvf /path/to/cm-t3x-linux/images/Angstrom-image.tar.bz2 umount /mnt/card
The MMC/SD card is now ready and can be used to boot Linux. The kernel parameters required for MMC/SD boot are
- for Linux kernel v2.6.36 and below:
root=/dev/mmcblk0p2 console=ttyS2,115200n8 rootwait mmc_core.removable=0
- starting from Linux kernel v2.6.37:
root=/dev/mmcblk0p2 console=ttyO2,115200n8 rootwait mmc_core.removable=0