Secure Boot Path: From BootROM to Userspace in ZynqMP and i.MX8
Published at July 18, 2025 · 5 min read · Tags: secure boot u-boot imx8 zynq
Secure Boot Path: From BootROM to Userspace in ZynqMP and i.MX8
Published at July 18, 2025 · 5 min read · Tags: secure boot u-boot imx8 zynq
Secure Boot ensures that only authenticated and untampered code runs on a system.
This post walks through the secure boot process from BootROM all the way to Linux userspace, focusing on Xilinx ZynqMP and NXP i.MX8.
We explain how keys are stored and verified, how FIT images are authenticated, and what protections are required even after Linux boots.
The diagram below illustrates the secure boot process commonly used in embedded SoCs like Xilinx ZynqMP and NXP i.MX8.
It shows the sequence of boot stages, starting from power-on and proceeding through:
This process forms a Chain of Trust, ensuring only signed and authorized software components are executed.
π Power-on / Reset
The system powers up or resets. The internal BootROM is the first code to execute.
π BootROM (eFUSE / OCOTP keys)
Verifies the signature of the first-stage bootloader (FSBL/SPL) using SHA hashes of public keys burned into OTP fuses.
This step is the immutable root of trust.
π¦ FSBL / SPL β DDR Init, Load U-Boot
Initializes DDR memory and loads the second-stage bootloader (U-Boot) into RAM.
π§° U-Boot β Verify FIT with embedded public key
Verifies the authenticity of the kernel, initrd, boot scripts, and device tree from a signed FIT image using public keys embedded in U-Boot DTB.
π§ Linux Kernel β Optional: dm-verity / IMA / EVM
The kernel is loaded and started. Optionally, it enforces runtime file integrity using:
dm-verity
: read-only rootfs block verificationIMA
: file measurement and auditEVM
: protects file metadataπ§βπ» Userspace β Applications, OP-TEE integration
The final stage where user applications, services, and possibly OP-TEE components run.
Trusted apps (TAs) can safely store and use cryptographic keys inside the TEE.
BOOT.BIN
from SD/eMMCRSA_USE_KEY_SEL
for optional key selectionflash.bin
with CSF sectionSRK_SEL
fieldβ Once keys are burned, they cannot be changed.
β
If KEY_SEL
is not fused, fallback is possible via key rolling.
U-Boot verifies the FIT image, which may include:
Image
).dtb
)initramfs
or cpio.gz
)boot.scr
)signature@x
node with hash + RSA signatureThe public keys used for FIT signature verification are placed in U-Bootβs Device Tree Blob (DTB).
Mode | Config | Modifiable in field | Security |
---|---|---|---|
Embedded DTB | CONFIG_OF_EMBED=y |
β Requires U-Boot rebuild | β More secure |
Separated DTB (external) | CONFIG_OF_SEPARATE=y |
β Replaceable if not protected | β οΈ Less secure |
Once the kernel boots, it mounts the rootfs.
At this point, Secure Boot no longer enforces integrity, unless you explicitly enable runtime protections:
dm-verity
IMA/EVM
FIT image must be re-signed whenever:
If only rootfs is updated via SWUpdate, and not loaded from FIT, the FIT itself doesn’t need to change.
Tip: You can split boot and data into two separate FIT images to avoid signing everything each time.
Feature | ZynqMP | i.MX8 |
---|---|---|
Root Key Storage | eFUSE (SHA3-384) | OCOTP (SHA256) |
Max Keys | 4 | 4 (SRK Table) |
Key Selection | Optional via bit | Optional via SRK_SEL |
FIT Auth | U-Boot + signed FIT | U-Boot + signed FIT |
Runtime Protection | Manual (dm-verity, IMA) | Often with OP-TEE |
FS Updates | Re-sign or SWUpdate | Re-sign or secure loader |
Secure Boot doesnβt stop at the bootloader β itβs a full chain of trust from BootROM to your application.
Each stage must hand off to the next via signed, verified content, and U-Boot’s FIT signature mechanism plays a central role in ensuring this.
To fully protect your system, consider:
CONFIG_OF_EMBED
)dm-verity
for rootfs protectionOP-TEE
for sensitive secretsNeed help integrating this with Yocto or adding signed update flows (SWUpdate, RAUC)?
Feel free to reach out β Iβd be glad to help secure your system end to end.