hello,
I am trying to run bitbake imx-boot to get a boot image with ahab signed.
But the running terminate with this error:
| /opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/mx8_sign.sh -t flash
| Verified TDX_IMX_HAB_CST_BIN=/opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/cst-4.0.1/linux64/bin/cst
| Verified TDX_IMX_HAB_CST_SRK=/opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/keys/SRK_1_2_3_4_table.bin
| Verified TDX_IMX_HAB_CST_SRK_CERT=/opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/keys/SRK1_sha256_4096_65537_v3_usr_crt.pem
| Verified TDX_IMX_HAB_CST_TEMPLATE=mx8_template.csf
| Verified UNSIGNED_IMAGE=/opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/git/iMX8QX/flash.bin
| Verified LOG_MKIMAGE=/opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/mkimage-flash.log
| Creating CSF file: /opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/flash.csf
| Using SRK1 for signing.
| Inferred that CA flag was not set; signing with SRK only.
| Signing ‘/opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/git/iMX8QX/flash.bin’ with CST tool.
| Tool location: ‘/opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/cst-4.0.1/linux64/bin/cst’
| CSF location: ‘/opt/yocto/scarthgap-7.4.0/TEST-AHAB/tmp/work/colibri_imx8x-tdx-linux/imx-boot/1.0/flash.csf’
| Error: Cannot open key file /opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/keys/SRK1_sha256_4096_65537_v3_usr_key.
|
this is the content of the keys folder
flavio@simde:/opt/yocto/scarthgap-7.4.0/TEST-AHAB$ ls /opt/yocto/scarthgap-7.4.0/TEST-AHAB/../simde/secure-boot/keys -l
total 60
-rw-rw-r-- 1 flavio flavio 1858 Jan 25 20:42 CSF_crt.pem
-rw------- 1 flavio flavio 3272 Jan 25 20:42 CSF_key.pem
-rw-rw-r-- 1 flavio flavio 1858 Jan 25 20:42 IMG_crt.pem
-rw------- 1 flavio flavio 3272 Jan 25 20:42 IMG_key.pem
-rw-rw-r-- 1 flavio flavio 64 Jan 25 20:42 SRK_1_2_3_4_fuse.bin
-rw-rw-r-- 1 flavio flavio 144 Jan 25 20:42 SRK_1_2_3_4_fuse.txt
-rw-rw-r-- 1 flavio flavio 2112 Jan 25 20:42 SRK_1_2_3_4_table.bin
-rw-rw-r-- 1 flavio flavio 7237 Jan 25 20:42 SRK1_sha256_4096_65537_v3_usr_crt.pem
-rw-rw-r-- 1 flavio flavio 7237 Jan 25 20:42 SRK2_sha256_4096_65537_v3_usr_crt.pem
-rw-rw-r-- 1 flavio flavio 7237 Jan 25 20:42 SRK3_sha256_4096_65537_v3_usr_crt.pem
-rw-rw-r-- 1 flavio flavio 7237 Jan 25 20:42 SRK4_sha256_4096_65537_v3_usr_crt.pem
I tried to put into the folder the file SRK1_sha256_4096_65537_v3_usr_key but none changed.
and this is con/local.conf content about ahab
INHERIT += “tdx-signed”
TDX_IMX_HAB_ENABLE = “1”
IMX_BOOT_SOC_TARGET = “ahab”
TDX_IMX_HAB_CST_DIR = “${TOPDIR}/../simde/secure-boot”
TDX_IMX_HAB_CST_BIN = “${TDX_IMX_HAB_CST_DIR}/cst-4.0.1/linux64/bin/cst”
TDX_IMX_HAB_CST_CERTS_DIR = “${TDX_IMX_HAB_CST_DIR}/keys”
TDX_IMX_HAB_CST_KEY_SIZE = “4096”
TDX_IMX_HAB_CST_DIG_ALGO = “sha256”
TDX_IMX_HAB_CST_SRK_CA = “0”
which could be the reason of the error.
Thank you
Best regards
Flavio