Hello,
DEK blob must be created by a software running in Arm TrustZone Secure World, the CAAM block takes into consideration the TrustZone configuration when encapsulating the DEK and the resulting blob can be only decapsulated by a SW running in the same configuration. As ROM code is running in ARM TrustZone secure world we must encapsulate the blobs using OP-TEE.
- Building ATF to support OP-TEE:
$ make PLAT=<SoC Name> SPD=opteed bl31
- Building OP-TEE to support DEK blob encapsulation:
$ CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y source ./scripts/nxp_build.sh <Board Name>
* OP-TEE debug logs can be enabled by adding CFG_TEE_CORE_LOG_LEVEL=4 in command line above.
The imx-mkimage is used to combine all the images in a single flash.bin binary.
Copy all the binaries generated (U-Boot images, bl31.bin, tee.bin and Firmware) into iMX8M directory and run the following commands according to the target device:
- Create a dummy DEK blob:
$ dd if=/dev/zero of=iMX8M/dek_blob_fit_dummy.bin bs=96 count=1 && sync
- Assembly flash.bin binary:
$ make SOC=<SoC Name> flash_spl_uboot
Regards