CM-T54: U-Boot: Firmware Overview

From Compulab Mediawiki
Jump to: navigation, search

Introduction

This article describes the firmware for CM-T54 system-on-module. CM-T54 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 OMAP54xx SoC. The OMAP54xx boot ROM is configured by default to boot SPL from the on board eMMC storage. Hardware boot selector (BOOT SELECT button) can define alternative boot strap. If alternative boot is selected, the boot ROM tries to boot first from a mSATA drive. If a SATA device is not detected or no valid boot image is found, the boot ROM will try to boot from the SD card. U-Boot initializes hardware modules necessary for system boot and loads the operating system.

Package contents

images

  • MLO - SPL binary
  • u-boot.img - U-Boot binary

u-boot

  • spl-2014.10-cm-t54-2.bin - SPL binary
  • u-boot-2014.10-cm-t54-2.bin - U-Boot binary
  • u-boot-2014.10-cm-t54-2.patch - patch vs. v2014.10 mainline U-Boot
  • patches - ordered collection of patches, that form the single patch above (u-boot-2014.10-cm-t54-2.patch)

SPL

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. If mSATA drive is used for boot, then SLP binary should be copied as file, named HLO, on the first FAT partition of the storage device.

U-Boot

U-Boot is the bootloader used on CM-T54. 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 on-board eMMC storage, mSATA drive or the network (TFTP/NFS server). If mSATA drive is used for boot, then U-Boot binary should be copied as file, named u-boot.img on the first FAT partition of the storage device. Please consult U-Boot quick reference and U-Boot project documentation for U-Boot features and commands description.

U-Boot environment

U-Boot environment resides on the on-board eMMC storage user data HW partition, regardless of the boot source. The environment resides at offset 0xC0000 from the start of eMMC user data HW partition, and its size is 16KB. In addition to the main environment, there is a second storage area at offset 0xc4000 of size 16K. This area is used to hold a redundant copy of the environment data as a backup.

Boot sources

CM-T54 can boot from a micro SD/MMC card, on-board eMMC storage or mSATA drive.

The following sections describe the layout of each storage type.

Default SD card mapping

Offset Description Size
0KB Reserved/MBR 128KB
128KB SPL 128KB
256KB U-Boot 512KB
768KB Reserved 384KB
1MB Remaining SD/MMC card space Remaining SD/MMC card space

Default eMMC storage mapping

Offset Description Size
0KB Reserved/MBR 128KB
128KB SPL 128KB
256KB U-Boot 512KB
768KB U-Boot environment 16KB
784KB U-Boot redundant environment 16KB
800KB Reserved 224KB
1MB Remaining eMMC storage space Remaining eMMC storage space

Example mSATA drive mapping

Partition Description Offset (Bytes) Size (Bytes)
/dev/sdb1 Boot 0x100000 0x6400000
/dev/sdb2 Linux file system 0x6400000 remaining SD card space

fdisk output for the 32GB sample mSATA drive:

Disk /dev/sdb: 32.0 GB, 32017047552 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62533296 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
Disk identifier: 0xd1530955

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      206847      102400    c  W95 FAT32 (LBA)
/dev/sdb2          206848    62533295    31163224   83  Linux

See also