========= OFFSET dump =========
Loader IMAGE:
header_image_off 0x0
dcd_off 0x0
image_off 0x40
csf_off 0x2d400
spl hab block: 0x7e0fc0 0x0 0x2d400
Second Loader IMAGE:
sld_header_off 0x57c00
sld_csf_off 0x58c20
sld hab block: 0x401fcdc0 0x57c00 0x1020
zebra@linux:~/imx-yocto-bsp/imx8mmevk-zeus-linux-build/tmp/work/rfidevk-poky-linux/imx-boot/1.0-r0/git/iMX8M$ TEE_LOAD_ADDR=0xbe000000 ATF_LOAD_ADDR=0x920000 ./print_fit_hab.sh 0x60000 imx8mm-evk.dtb
0x40200000 0x5B000 0xC6560
0x402C6560 0x121560 0x8B2E
0x920000 0x12A090 0xB1E0
0xBE000000 0x135270 0x59210
cat csf_fit.txt
[Header]
Version = 4.3
Hash Algorithm = sha256
Engine = CAAM
Engine Configuration = 0
Certificate Format = X509
Signature Format = CMS
[Install SRK]
# Index of the key location in the SRK table to be installed
File = "../../crts/SRK_1_2_3_4_table.bin"
Source index = 0
[Install CSFK]
# Key used to authenticate the CSF data
File = "../../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"
[Authenticate CSF]
[Install Key]
# Key slot index used to authenticate the key to be installed
Verification index = 0
# Target key slot in HAB key store where key will be installed
Target index = 2
# Key to install
File = "../../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"
[Authenticate Data]
# Key slot index used to authenticate the image data
Verification index = 2
# Authenticate Start Address, Offset, Length and file
Blocks = 0x401fcdc0 0x57c00 0x1020 "flash.bin", \
0x40200000 0x5B000 0xC6560 "flash.bin", \
0x402C6560 0x121560 0x8B2E "flash.bin", \
0x920000 0x12A090 0xB1E0 "flash.bin", \
0xBE000000 0x135270 0x59210 "flash.bin"
zebra@linux:~/secureboot/release/linux64/bin$ ./cst -i csf_fit.txt -o csf_fit.bin
Invalid Block arguments, Blocks start offset and length together exceed file size in command AuthenticateData
TEE_LOAD_ADDR=0xbe000000 ATF_LOAD_ADDR=0x920000 VERSION="v1" ./print_fit_hab.sh 0x60000 imx8mm-evk.dtb
Defining the Variable VERSION will fixed the above issue.