AnsweredAssumed Answered

IMX7D Enable HAB and using MFG TOOL to download FW

Question asked by Alice Fok on Apr 24, 2019
Latest reply on Apr 24, 2019 by igorpadykov

I got HAB event if I downloaded the FW through MFG Tool. I have tried to remove "0x00911000 0x2C 0x1C4 "u-boot.imx"" in csf file and got no HAB event.

 

Please advise how to download FW with MFG successfully with HAB.

 

Below is u-boot-imx.log

===============================================================

Image Type: Freescale IMX Boot Image
Image Ver: 2 (i.MX53/6/7 compatible)
Mode: DCD
Data Size: 565248 Bytes = 552.00 KiB = 0.54 MiB
Load Address: 877ff420
Entry Point: 87800000
HAB Blocks: 877ff400 00000000 00085c00
DCD Blocks: 00910000 0000002c 000001c4

===============================================================

 

Below is my csf file 

===============================================================

[Header]
Version = 4.2
Hash Algorithm = sha256
Engine = ANY
Engine Configuration = 0
Certificate Format = X509
Signature Format = CMS

 

[Install SRK]
File = "../../crts/SRK_1_2_3_4_table.bin"
Source index = 0


[Install CSFK]
File = "../../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"

[Authenticate CSF]

[Install Key]
Verification index = 0
Target Index = 2
File = "../../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"

[Authenticate Data]
Verification index = 2
Blocks = 0x877FF400 0x000 0x85C00 "u-boot.imx", \
0x00911000 0x2C 0x1C4 "u-boot.imx"

===============================================================

Below is my steps:

1. ./mod_4_mfgtool.sh clear_dcd_addr u-boot.imx
2. /cst -o uboot_csf.bin -i uboot.csf
3. ./mod_4_mfgtool.sh set_dcd_addr u-boot.imx
4, cat  u-boot.imx uboot_csf.bin  >  u-boot_signed.imx

5. Download u-boot_signed.imx with mfg tool

6. Power cycle again after download is finished

7. Enter u-boot 

8. Type "hab_status"

9. below will be shown

HAB Configuration: 0xf0, HAB State: 0x66

--------- HAB Event 1 -----------------
event data:
0xdb 0x00 0x08 0x42 0x33 0x22 0x0a 0x00

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ADDRESS (0x22)
CTX = HAB_CTX_AUTHENTICATE (0x0A)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 2 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x00
0x00 0x00 0x00 0x20

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 3 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x2c
0x00 0x00 0x01 0xc4

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 4 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x20
0x00 0x00 0x00 0x01

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 5 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x80 0x00 0x00
0x00 0x00 0x00 0x04

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)

Outcomes