OMAP-L138 Preparing SD Card for Boot
From Texas Instruments Embedded Processors Wiki
This document describes the boot process of the OMAP-L138 ARM+DSP SOC. The content also applies to AM1808 and C6748 devices unless otherwise specified.
Contents |
Introduction
Starting with silicon revision 2.1, OMAP-L138 now supports SD/MMC boot directly from a card. This eliminates the need for a separate UBL that boots from on-board flash memory.
Formatting Requirements
The bootloader requires that the AIS boot image be placed within the first 2MB and sector-aligned. The image is read raw so the image must be in an unformatted partition of the card.
TI Tools
- Serial Flashing Tools: The most recent version of the serial flashing tools now contains CCS3.3 ARM and DSP projects flashing a file to an SD/MMC card using the EVM. They may also be imported to CCS4 or CCS5.
- Linux SDK: The Linux Software Development Kit (SDK) provides scripts for formatting SD/MMC cards for Linux kernels and file systems.
Procedures
Booting a Stand-Alone Image
When no other partitions or file systems are needed on the SD/MMC card, you can directly write an AIS-signed executable to the start of the SD/MMC card. This can be performed using CCS or Linux:
CCS
To flash a single AIS image, open SDMMCWriter_ARM.pjt (or DSP) located in the "OMAP-L138\CCS\SDMMCWriter\" directory of the serial flashing tools. For CCS4/5 it will need to be imported in order to rebuild the flashing tool.
Follow the following steps
- Load the EVM GEL file
- Connect to the ARM core (or DSP core)
- Load the SDMMCWriter_ARM(DSP).out and run
- Type "y" when asked if you will be writing a UBL image
- Type the name of the AIS file to flash
- Type "none" when asked to enter the application file name
The file should now be successfully flashed to the SD/MMC card. Change the boot switches to SDMMC0 boot mode and power cycle to verify.
Linux
- Insert the SD/MMC card into a Linux host.
- Type "dmesg". The SD/MMC card name should show up near the end, usually something like "SDC".
- Type "sudo dd if=ais_file.bin of=/dev/sdx", where ais_file.bin is the file to flash and "sdx" is the name determined in the previous step.
The file should now be successfully flashed to the SD/MMC card. Change the boot switches to SDMMC0 boot mode and power cycle to verify.
Booting Linux
In order to boot Linux entirely off the SD/MMC card, there must be 3 separate partitions:
- Unformatted partition to flash AIS-signed U-Boot image
- FAT32 file system to store the Linux kernel for U-Boot to read
- EXT3 file system to store the file system Linux will mount
Perform the following steps to set up the card:
- On a Windows machine, use AISgen to convert the U-Boot binary to a bootable AIS file.
- You must specify the entry point as shown below in addition to the load address (adding @ to the application file).
- Certain version of U-Boot do not enable the UART2 PSC, so select "Configure PSC" and in the PSC tab, type "13" in the "Enable LSPC" field for PSC1.
- On the Linux host, use the "mksdboot.sh" script found in the /bin/ directory of the SDK install as follows, where "sdx" is where the SD/MMC card is detected:
sudo --device /dev/sdx --sdk <base directory of SDK install>
- After it has completed, remove and reinsert the card. You should see two partitions, one with uImage and another with the file system mounted.
- Now write the AIS-signed U-Boot directly to the card. To prevent overwriting the boot table, write to offset 10 of the card as follows:
sudo -dd in=u-boot.ais of=/dev/sdx seek=10
The SD card should now be successfully prepared. Change the boot switches to SDMMC0 boot mode and power cycle to verify.

