Skip to content

Secure Boot Chain

meta-tolomeo authenticates the boot in two stages, so each stage verifies the next component before handing over execution.

Each Stage Authenticates the Next

The first stage is hardware-specific and covers the path from the silicon BootROM to the bootloader. The second is generic and covers the path from U-Boot to the Linux kernel.

BootROM → SPL / U-Boot  (Stage 1 — NXP HAB4 or AHAB)
U-Boot  → Linux kernel  (Stage 2 — U-Boot FIT signature)

Stage 1 is enforced by hardware: the i.MX BootROM will not execute a bootloader container that does not pass signature verification. Stage 2 is enforced by U-Boot firmware: a kernel FIT image that does not carry a valid RSA signature is rejected before the kernel is started.

Both stages are gated by the tlm-secure-boot distro feature and are inactive in development builds that do not set it.

Stage 1 — The BootROM Checks the Bootloader

The i.MX BootROM holds a hash of the Super Root Key (SRK) set burned permanently into device fuses during manufacturing. At every power-on, the BootROM verifies the cryptographic signature of the SPL/U-Boot container against that fused hash before transferring execution. A container that fails verification causes the BootROM to halt.

meta-tolomeo supports two NXP signing protocols depending on the i.MX device family:

HAB4 on i.MX8M

High Assurance Boot version 4, used on i.MX8M Plus and related i.MX8M variants (machine override mx8-generic-bsp). The signing tool is the NXP Code Signing Tool (CST). The U-Boot config fragment enables CONFIG_IMX_HAB.

External reference: NXP Code Signing Tool (CST) documentation

AHAB on i.MX9

Advanced High Assurance Boot, used on i.MX93 and other i.MX9 variants (machine override mx9-generic-bsp). Authentication is delegated to the EdgeLock Enclave (ELE), a dedicated security subsystem on the SoC. The signing tool is the NXP Secure Provisioning SDK (SPSDK). The U-Boot config fragment enables CONFIG_AHAB_BOOT.

External references:

Stage 2 — U-Boot Checks the Kernel FIT Image

The Linux kernel, device trees, and optional firmware are packaged into a FIT (Flattened Image Tree) image at build time. The build system signs the FIT image with an RSA private key and embeds the corresponding public key into U-Boot's own device tree.

At boot time, U-Boot reads the embedded public key and verifies the FIT image signature before loading the kernel. A FIT image without a valid signature, or signed with an unknown key, is rejected.

This mechanism is not NXP-specific: a BSP enables it with UBOOT_SIGN_ENABLE. On NXP targets, the kernel_fitimage_mcore class from meta-tolomeo-nxp builds and signs FIT images that include M-core firmware.

One Distro Feature Activates the Whole Chain

Adding tlm-secure-boot to DISTRO_FEATURES is the single switch that activates the full chain:

  • Enables the HAB/AHAB U-Boot config fragment (CONFIG_IMX_HAB or CONFIG_AHAB_BOOT)
  • Enables FIT image signing at build time (UBOOT_SIGN_ENABLE = "1")
  • Activates the imx-boot-signature recipe, which produces the signed NXP boot image

Builds without tlm-secure-boot produce unsigned images and are suitable for development and emulation targets (e.g. QEMU) where hardware authentication is not available.

DAVE Ships Development Keys for Build Validation

DAVE provides pre-generated key material under devel-keys/ for build validation without requiring production key infrastructure:

Material Purpose
devel-keys/secure-boot/ahab/spsdk_ahab.yaml AHAB signing configuration for mimx9352
devel-keys/secure-boot/ahab/crts/ SRK certificate set SRK0 to SRK3 (secp384r1)
devel-keys/secure-boot/ahab/keys/ SRK private keys SRK0 to SRK3 (secp384r1)
devel-keys/secure-boot/hab4/csf_hab4.cfg HAB4 signing configuration
devel-keys/secure-boot/hab4/crts/ SRK certificate set SRK1 to SRK4 (RSA-2048), SRK table and fuse files
devel-keys/secure-boot/hab4/keys/ SRK, CSF and IMG private keys (RSA-2048)
devel-keys/fitImage-sign.crt X.509 certificate for FIT image signing
devel-keys/fitImage-sign.key RSA private key for FIT image signing

Warning

The keys in devel-keys/ are publicly known and exist only for build validation. Never fuse or use them on a production device.

See also