I’m running into an issue with secure boot setup on the 8mp where the main OS image fails to boot, and I’m not sure how to resolve the issue.
I’ve successfully followed the various readmes and documents to both use CST to generate a set of signing keys for u-boot, as well as the FIT image and conf signing keys. The yocto build succeeds without complaining.
I’ve deployed u-boot to the board successfully - and this all seems to work as expected - I can see it behaving like a build with signing enabled. The device is not yet fused or closed, so any errors are informational (though hab_status also reports no events).
The issue arises when trying to boot the main device OS - it’s finding the partition but FIT signatures are failing (some text lightly edited to hide sensitive info):
Scanning mmc 2:1...
Found U-Boot script /boot.scr
970 bytes read in 1 ms (947.3 KiB/s)
## Executing script at 50280000
13367 bytes read in 2 ms (6.4 MiB/s)
## NOTE: Bootloader seems to support secure boot.
14 bytes read in 3 ms (3.9 KiB/s)
29440972 bytes read in 92 ms (305.2 MiB/s)
## Loading kernel from FIT Image at 50300000 ...
Using 'conf-freescale_imx8mp-verdin-customized.dtb' configuration
Verifying Hash Integrity ... sha256,rsa2048:fit-image-1- error!
Verification failed for '<NULL>' hash node in 'conf-freescale_imx8mp-verdin-customized.dtb' config node
Failed to verify required signature 'key-fit-conf-1'
Bad Data Hash
ERROR -2: can't get kernel image!
Inspecting the yocto built FDT image with dumpimage shows that indeed, the “hash” node for the FDT conf entires is all “unavailable” - though clearly it has been signed successfully given the presence of an actual signature:
Timestamp: Thu Jan 1 00:00:00 1970
Configuration 1 (conf-freescale_imx8mp-verdin-customized.dtb)
Description: 0 Linux kernel, FDT blob
Kernel: kernel-1
FDT: fdt-freescale_imx8mp-verdin-customized.dtb
Hash algo: sha256
Hash value: unavailable
Sign algo: sha256,rsa2048:fit-conf-1
Sign padding: pkcs-1.5
Sign value: [hexadecimal signature]
I suppose it makes sense a configuration doesn’t have a hash value since it’s not a physical “blob” of data, just references to other data blobs - but I don’t know where to begin troubleshooting the u-boot failure in that it’s looking for a hash that doesn’t (cannot?) exist.
The yocto build is based off the 7.7.0 release tag in the manifest.
Thanks!
~BW908