Difference between revisions of "CM-FX6: U-Boot: Firmware Overview"

From Compulab Mediawiki
Jump to: navigation, search
(Package contents)
(See also)
Line 7: Line 7:
 
from the SPI flash as a fall back.
 
from the SPI flash as a fall back.
 
U-Boot initializes hardware modules necessary for system boot and loads the operating system.
 
U-Boot initializes hardware modules necessary for system boot and loads the operating system.
 +
 +
=== Package contents ===
 +
 +
==== images ====
 +
* {{filename|cm-fx6-firmware}} - U-Boot and SPL binaries combined to a single binary
 +
 +
==== u-boot ====
 +
* {{filename|spl-2014.04-cm-fx6-1.3.bin}} - SPL binary
 +
* {{filename|u-boot-2014.04-cm-fx6-1.3.bin}} - U-Boot binary
 +
* {{filename|u-boot-2014.04-cm-fx6-1.3.patch}} - patch vs. v2014.04 mainline U-Boot
 +
* {{filename|patches}} - ordered collection of patches, that form the single patch above (u-boot-2014.04-cm-fx6-1.3.patch)
 +
 +
==== Utilities ====
 +
* {{filename|firmware_scripts}} - A collection of helper scripts
 +
** {{filename|cm-fx6-bootloader-update.sh}} - A script for updating U-Boot from Linux
 +
** {{filename|combine_firmware.sh}} - A script for combining SPL and U-Boot to a single binary
  
 
== SPL ==
 
== SPL ==
Line 33: Line 49:
 
! Offset
 
! Offset
 
! Description
 
! Description
 +
! Size
 
|-
 
|-
 
| 0KB
 
| 0KB
 
| Reserved
 
| Reserved
 +
| 1KB
 
|-
 
|-
 
| 1KB
 
| 1KB
 
| SPL
 
| SPL
 +
| 63KB
 
|-
 
|-
 
| 64KB
 
| 64KB
 
| U-Boot
 
| U-Boot
 +
| 448KB
 
|-
 
|-
 
| 512KB
 
| 512KB
 
| Reserved
 
| Reserved
 +
| 256KB
 
|-
 
|-
 
| 768KB
 
| 768KB
 
| U-Boot environment
 
| U-Boot environment
 +
| 256KB
 
|-
 
|-
 
| 1MB
 
| 1MB
 
| Reserved
 
| Reserved
 +
| Remaining SPI flash space
 
|}
 
|}
  
Line 57: Line 80:
 
! Offset
 
! Offset
 
! Description
 
! Description
 +
! Size
 
|-
 
|-
 
| 0KB
 
| 0KB
 
| Reserved/MBR
 
| Reserved/MBR
 +
| 1KB
 
|-
 
|-
 
| 1KB
 
| 1KB
 
| SPL
 
| SPL
 +
| 63KB
 
|-
 
|-
 
| 64KB
 
| 64KB
 
| U-Boot
 
| U-Boot
 +
| 448KB
 
|-
 
|-
 
| 512KB
 
| 512KB
 
| Reserved
 
| Reserved
 +
| 512KB
 
|-
 
|-
 
| 1MB
 
| 1MB
 +
| Remaining SD-card space
 
| Remaining SD-card space
 
| Remaining SD-card space
 
|}
 
|}
  
 +
=== Default NAND flash mapping ===
 +
{| cellpadding="3" border="1" style="border: 1px solid rgb(85, 85, 85); border-collapse: collapse;"
 +
! Offset
 +
! Description
 +
! Size
 +
|-
 +
| 0MB
 +
| Linux kernel
 +
| 7.5MB
 +
|-
 +
| 7.5MB
 +
| Device tree blob
 +
| 0.5MB
 +
|-
 +
| 8MB
 +
| Linux filesystem
 +
| Remaining NAND flash space
 +
|}
  
== Package contents ==
 
 
=== images ===
 
* {{filename|cm-fx6-firmware}} - U-Boot and SPL binaries combined to a single binary
 
 
=== u-boot ===
 
* {{filename|spl-2014.04-cm-fx6-1.3.bin}} - SPL binary
 
* {{filename|u-boot-2014.04-cm-fx6-1.3.bin}} - U-Boot binary
 
* {{filename|u-boot-2014.04-cm-fx6-1.3.patch}} - patch vs. v2014.04 mainline U-Boot
 
* {{filename|patches}} - ordered collection of patches, that form the single patch above (u-boot-2014.04-cm-fx6-1.3.patch)
 
 
=== Utilities ===
 
* {{filename|firmware_scripts}} - A collection of helper scripts
 
** {{filename|cm-fx6-bootloader-update.sh}} - A script for updating U-Boot from Linux
 
** {{filename|combine_firmware.sh}} - A script for combining SPL and U-Boot to a single binary
 
  
 
== See also ==
 
== See also ==

Revision as of 13:13, 17 September 2014

Introduction

This article describes the firmware for CM-FX6 system-on-module. CM-FX6 firmware consists of two components provided in a single binary: Secondary Program Loader (SPL) and U-Boot. SPL is the bootstrap utility invoked by the CPU internal boot ROM code of the i.MX6 SoC. The i.MX6 boot ROM tries to boot SPL from either SD card, or SPI flash, as determined by the hardware boot selector (BOOT SELECT button). SPL performs minimal hardware initializations and loads U-Boot from the same boot storage device. If loading U-Boot from MMC fails, SPL will try to load it from the SPI flash as a fall back. U-Boot initializes hardware modules necessary for system boot and loads the operating system.

Package contents

images

  • cm-fx6-firmware - U-Boot and SPL binaries combined to a single binary

u-boot

  • spl-2014.04-cm-fx6-1.3.bin - SPL binary
  • u-boot-2014.04-cm-fx6-1.3.bin - U-Boot binary
  • u-boot-2014.04-cm-fx6-1.3.patch - patch vs. v2014.04 mainline U-Boot
  • patches - ordered collection of patches, that form the single patch above (u-boot-2014.04-cm-fx6-1.3.patch)

Utilities

  • firmware_scripts - A collection of helper scripts
    • cm-fx6-bootloader-update.sh - A script for updating U-Boot from Linux
    • combine_firmware.sh - A script for combining SPL and U-Boot to a single binary

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. SPL resides at 0x400 offset from the start of its storage (either SPI flash, or MMC/SD card).

U-Boot

U-Boot is the bootloader used on CM-FX6. 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 NAND flash, the on-board SSD, or the network (TFTP/NFS server). U-Boot resides at offset 0x10000 from the start of its storage.

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 SPI flash, regardless of the boot source. The environment resides at offset 0xC000 from the start of SPI flash, and its size is 8KiB.

Boot sources

CM-FX6 can boot from either a micro SD card, or the on-board SPI flash.

The following sections describe the layout of each storage type.

Default SPI flash mapping

Offset Description Size
0KB Reserved 1KB
1KB SPL 63KB
64KB U-Boot 448KB
512KB Reserved 256KB
768KB U-Boot environment 256KB
1MB Reserved Remaining SPI flash space

Default SD card mapping

Offset Description Size
0KB Reserved/MBR 1KB
1KB SPL 63KB
64KB U-Boot 448KB
512KB Reserved 512KB
1MB Remaining SD-card space Remaining SD-card space

Default NAND flash mapping

Offset Description Size
0MB Linux kernel 7.5MB
7.5MB Device tree blob 0.5MB
8MB Linux filesystem Remaining NAND flash space


See also