CL-SOM-AM57x: U-Boot: Firmware Overview

From Compulab Mediawiki
Jump to: navigation, search


This article describes firmware for the CompuLab CL-SOM-AM57x System-on-Module / Computer-on-Module. The CL-SOM-AM57x firmware consists of two components: Secondary Program Loader (SPL) and U-Boot. SPL is the bootstrap utility invoked by the CPU internal boot ROM code of the AM57x SoC. The AM57x boot ROM is configured by default to boot SPL from the on board SPI flash storage. Hardware boot selector (ALT BOOT button) can define alternative boot strap. If alternative boot is selected, the boot ROM tries to boot from the SD card.

SPL performs minimal hardware initializations and loads U-Boot. U-Boot initializes hardware modules necessary for system boot and loads the operating system.


SPL is responsible for initial clock setup, DDR initialization and boot media controller initialization. It is loaded into the CPU internal SRAM immediately after system reset. After basic hardware setup, SPL loads U-Boot bootloader into the system RAM and transfers control to the U-Boot bootloader. In case of SD card, file system mode, is used for boot, then SLP binary should be present as file, named MLO, located in the boot partition, root directory.


U-Boot is the bootloader used on CL-SOM-AM57x. It allows flexible selection of operating system boot modes, provides scripting facilities and command line interface through a serial port.
U-Boot allows booting operating system from the on-board eMMC storage, SD card, SATA drive or from network (from TFTP server). Please consult U-Boot quick reference and U-Boot project documentation for U-Boot features and commands description. In case of SD card, file system mode, is used for boot, U-Boot binary should be present as a file, named u-boot.img, located in the boot partition, root directory.

U-Boot environment

U-Boot environment resides on the on-board SPI flash at offset 0xC0000. The environment size is 16KiB, reside in 64KiB sector.

Boot sources

CL-SOM-AM57x can boot from SD/MMC card or on-board SPI flash.

The following sections describe the layout of each storage type.

SPI flash

CL-SOM-AM57x SPI flash mapping
Offset (Bytes) Description Size (Bytes)
0x0 SPL0 0x10000
0x10000 SPL1 0x10000
0x20000 SPL2 0x10000
0x30000 SPL3 0x10000
0x40000 U-Boot 0x80000
0xC0000 U-Boot environment 0x10000
0xD0000 Reserved Remaining SPI flash space

SD card raw mode

CL-SOM-AM57x SD card mapping
Offset (Bytes) Description Size (Bytes)
0x0 MBR/GPT tables 0x20000
0x20000 SPL0 0x20000
0x40000 SPL1 0x20000
0x60000 U-Boot 0x80000
0x100000 Partitions space Remaining SD card space

SD card file system mode

Example of an SD card partitioning

Partition Description Offset (Bytes) Size (Bytes)
/dev/mmcblk1p1 Boot 0x100000 0x40000000
/dev/mmcblk1p2 Linux file system 0x40100000 Remaining SD card space

fdisk output for an example 4GB SD card:

Disk /dev/mmcblk1: 3.7 GiB, 3975151616 bytes, 7763968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1450304b

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *       2048 2099199 2097152    1G  c W95 FAT32 (LBA)
/dev/mmcblk1p2      2099200 7763967 5664768  2.7G 83 Linux

See also