Subject: Colibri iMX7D secure-boot: HAB errors after fusing SRK (U-Boot appears unsigned)
Hardware / SW
- Module: Colibri iMX7D SoM
- Goal: Enable NXP HABv4 secure boot
- Yocto: 7.3.3
- Layers:
meta-toradex-security(downloaded from Toradex) - CST: NXP CST 4.1 (keys generated with this version)
Configuration (local.conf)
INHERIT += “tdx-signed”
INHERIT += “imx-hab”
DISTRO_FEATURES:append = " security"
SECURE_BOOT = “1”
U_BOOT_SIGNED = “1”
TDX_IMX_HAB_ENABLE = “1”
TDX_IMX_HAB_CST_DIR = “${TOPDIR}/keys/cst”
TDX_IMX_HAB_CST_CERTS_DIR = “${TDX_IMX_HAB_CST_DIR}/crts”
TDX_IMX_HAB_CST_CRYPTO = “rsa”
TDX_IMX_HAB_CST_KEY_SIZE = “2048”
TDX_IMX_HAB_CST_KEY_EXP = “65537”
TDX_IMX_HAB_CST_DIG_ALGO = “sha256”
TDX_IMX_HAB_CST_SRK_CA = “1”
TDX_IMX_HAB_CST_SRK_INDEX = “1”
TDX_IMX_HAB_CST_SRK = “${TOPDIR}/keys/cst/crts/SRK_1_2_3_4_table.bin”
TDX_IMX_HAB_CST_SRK_FUSE = “${TOPDIR}/keys/cst/crts/SRK_1_2_3_4_fuse.bin”
TDX_UBOOT_HARDENING_ENABLE = “1”
TDX_UBOOT_HARDENING_ENABLE_DBG = “0”
TDX_CHECK_UNSUPP_BOOTMETH = “1”
TDX_DISABLE_UNSUPP_BOOTMETH = “1”
FIT signing (kernel/DTB authenticity)
UBOOT_SIGN_ENABLE = “1”
FIT_GENERATE_KEYS = “1”
UBOOT_SIGN_KEYDIR = “${TOPDIR}/keys/cst”
UBOOT_SIGN_KEYNAME = “CSF1_1_sha256_2048_65537_v3_usr”
UBOOT_SIGN_IMG_KEYNAME = “IMG1_1_sha256_2048_65537_v3_usr”
What we did
- Generated SRK/CSF/IMG keys with CST 4.1.
- Built the image. The build produced
fuse-cmds.txtunder the image deploy path. - Flashed the image and booted before fusing →
hab_statusshows no HAB errors. - Programmed fuses exactly as listed in
fuse-cmds.txt(SRK hash and related words). - Rebooted → now
hab_statusreports HAB events/errors. From the errors we inferred U-Boot is not being accepted as signed.
Problem
- After fusing the SRK hash, HAB rejects the boot image. It looks like U-Boot is not signed (or the CSF doesn’t match the fused SRK) even though:
- Signing is enabled in the build (see config above), and
- We used the fuse commands generated by the build.
- For Colibri iMX7D with
meta-toradex-security, are the variables above sufficient to ensure the U-Boot container (u-boot.imx) is signed with a valid CSF**?
- Do we also need any board/machine-specific settings (e.g., additional
TDX_*orUBOOT_*variables) to embed the CSF intou-boot.imx?
- Is
U_BOOT_SIGNED = "1"redundant or required whenINHERIT += "tdx-signed"andINHERIT += "imx-hab"are set? - Does
UBOOT_SIGN_ENABLE = "1"(FIT signing for kernel/DTB) interact with or gate the HAB CSF signing of U-Boot on i.MX7D, or are these independent knobs? - The build generated
fuse-cmds.txt. Can you confirm this file contains the correct SRK hash endianness/words for i.MX7D on Toradex BSP 7.3.3? - Are there known issues with CST 4.1 and BSP 7.3.3 for i.MX7D (e.g., SRK CA vs. user certs, SRK index mismatch, or CSF version fields) that could cause HAB rejection after fusing?
- On i.MX7D specifically, should we expect the signed artifact to be
u-boot.imx(U-Boot + IVT + DCD + CSF), and if so, which target(s) in your layer produce that file with an attached CSF?
Thanks in advance—any guidance or known-good config snippet for iMX7D + BSP 7.3.3 would be very helpful.