I am currently integrating the meta-nxp-security-reference-design layer into our Yocto build system to enable secure boot for i.MX93. Following NXP's recommendation, I am using SPSDK for the AHAB signing process. During this integration, I have encountered two issues that prevent successful builds for custom hardware with HSM-based signing.
Environment:
Issue 1: Missing KERNEL_DTB Parameter Breaks Custom Board Support
file:meta-secure-boot/recipes-secure-boot/imx-mkimage/imx-boot_%.bbappend
The kernel container build command lacks the DTB parameter: make
SOC=${IMX_BOOT_SOC_TARGET} flash_kernel --> no dtb file input
The iMX93/soc.mak has a hardcoded default:KERNEL_DTB ?= imx93-11x11-evk.dtb
Build fails for custom boards with:make[1]: *** No rule to make target 'imx93-11x11-evk.dtb', needed by 'flash_kernel'. Stop.
Issue 2: imx_signer Generates Incorrect YAML for PKCS11/HSM Signing
Files:
meta-secure-boot/recipes-secure-boot/linux/linux-imx-signature.bb
imx_signer tool
imx_signer reads my spsdk_ahab.cfg but generates nxpimage_config.yaml with hardcoded default paths instead of my PKCS11 configuration.
imx_signer doesn't parse PKCS11 configuration from CFG files correctly. It:
Ignores signer=type=pkcs11(spsdk yaml reference file contains signer not signature_provider) and uses type=file instead
Ignores srk_array_X paths and uses hardcoded template paths
Appears designed for file-based signing only
Issue 1: Can you add KERNEL_DTB parameter support to the flash_kernel recipe or should I follow different approach please suggest?
Issue 2: Does imx_signer support PKCS11 configuration? If not, what's the recommended approach for HSM signing with the security reference design?
Is there documentation reference for using PKCS11/HSM with meta-nxp-security-reference-design?