Thanks @hector_delgado for reply,
I have flashed the key with the below details of uboot build for
$cd imx-mkimage/
$make SOC=iMX8QX flash_spl
I had got below details while building the uboot .
145408 bytes (145 kB, 142 KiB) copied, 0.00288485 s, 50.4 MB/s
282+1 records in
282+1 records out
144623 bytes (145 kB, 141 KiB) copied, 0.00315915 s, 45.8 MB/s
SOC: QX
REVISION: B0
DCD: skip
New Container: 0
SCFW: scfw_tcm.bin
AP: u-boot-spl.bin core: a35 addr: 0x00100000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION: 0x0000
ivt_offset: 1024
rev: 2
Platform: i.MX8QXP B0
ivt_offset: 1024
container image offset (aligned):13400
csf_off 0x13800
flags: 0x10
Hash of the images =
SCFW file_offset = 0x13400 size = 0x28400
Hash of the images =
AP file_offset = 0x3b800 size = 0x23800
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x510
Offsets = 0x400 0x510
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
append u-boot-atf-container.img at 380 KB
3146+0 records in
3146+0 records out
3221504 bytes (3.2 MB, 3.1 MiB) copied, 0.00977448 s, 330 MB/s
From the above details i had created the csf_boot_image.txt, Attached the csf file.
and created the uboot signed image.
Below is the o/p of keys which i have flashed.
=> fuse read 0 730 16
Reading bank 0:
Word 0x000002da: 0f2b72e0 b198e649 a323e0e5 bb649ea0
Word 0x000002de: 5469e0f0 683d36d1 4efe867f e661f8ce
Word 0x000002e2: e40850fe 7ff51662 97772618 da8f51fa
Word 0x000002e6: 43854e5c 8c7b2d7d 0b7bbb73 49aab9c8
=>
I cross checked the keys with hash table as mentioned in
https://github.com/nxp-imx/uboot-imx/blob/lf_v2023.04/doc/imx/ahab/introduction_ahab.txt
But unfortunately , after flashing the keys while checking the ahab_status, I am getting the below SECO events.
=> ahab_status
Lifecycle: 0x0020, NXP closed
SECO Event[0] = 0x0087EE00
CMD = AHAB_AUTH_CONTAINER_REQ (0x87)
IND = AHAB_NO_AUTHENTICATION_IND (0xEE)
sc_seco_get_event: idx: 1, res:3
I also checked this event in AN12312.pdf , its saying container image is not signed But I am sure its signed with the keys using CST tool.
Also I am getting the same size of signed and unsigned u-boot image.
$ls -l
-rw-r--r-- 1 user user 3610624 Oct 30 19:11 flash.signed.bin
-rw-r--r-- 1 user user 3610624 Oct 30 19:10 flash.bin
Is this correct ? Or should signed image be larger then unsigned img.?
Please suggest on this issue, As its quite risky to flash the keys in another device
Regards,
Rk