HABv4 on imx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HABv4 on imx6ull

Jump to solution
1,439 Views
GrDK
Contributor II

Hi,

I burn a signed u-boot-dtb.imx, and prog the fuse, when check the hab events, it occurs err like this. What could I do for it?

=> hab_status

Secure boot disabled

HAB Configuration: 0xf0, HAB State: 0x66

--------- HAB Event 1 -----------------
event data:
0xdb 0x00 0x14 0x42 0x69 0x0a 0xc0 0x00
0xca 0x00 0x0c 0x00 0x01 0xc5 0x1d 0x00
0x00 0x00 0x07 0xe4

STS = HAB_WARNING (0x69)
RSN = HAB_UNS_ENGINE (0x0A)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 2 -----------------
event data:
0xdb 0x00 0x1c 0x42 0x69 0x0a 0xc0 0x00
0xca 0x00 0x14 0x00 0x02 0xc5 0x1d 0x00
0x00 0x00 0x0d 0x3c 0x87 0x7f 0xf4 0x00
0x00 0x08 0x2c 0x00

STS = HAB_WARNING (0x69)
RSN = HAB_UNS_ENGINE (0x0A)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)

Labels (4)
0 Kudos
Reply
1 Solution
1,407 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This processor does not have CAAM, I suggest you try with a different engine:

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

Best regards.

View solution in original post

0 Kudos
Reply
5 Replies
1,408 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This processor does not have CAAM, I suggest you try with a different engine:

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

Best regards.

0 Kudos
Reply
1,396 Views
GrDK
Contributor II

Hi JorgeCas,  

thanks for your reply, and I finally reach at 

###########

Secure boot disabled

HAB Configuration: 0xf0, HAB State: 0x66
No HAB Events Found!

###########

But lately when I boot the device, it occurs 

###########

Authenticate image from DDR location 0x80800000...
bad magic magic=0x0 length=0x00 version=0x0
bad length magic=0x0 length=0x00 version=0x0
bad version magic=0x0 length=0x00 version=0x0
Error: Invalid IVT structure

Allowed IVT structure:
IVT HDR = 0x4X2000D1
IVT ENTRY = 0xXXXXXXXX
IVT RSV1 = 0x0
IVT DCD = 0x0
IVT BOOT_DATA = 0xXXXXXXXX
IVT SELF = 0xXXXXXXXX
IVT CSF = 0xXXXXXXXX
IVT RSV2 = 0x0
Authenticate zImage Fail, Please check

###########

I do not make any config to authenticate zImage, could u please give me a help?

 

0 Kudos
Reply
1,376 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This error is because authenticate image code failed, you can refer to the application note to check if your steps are correct.

You can also refer to the next links:

https://community.nxp.com/t5/i-MX-Processors/Secure-boot-imx6-Invalid-IVT-structure/td-p/1618944

https://www.ezurio.com/documentation/high-assurance-boot-hab-for-dummies

Best regards.

0 Kudos
Reply
1,391 Views
GrDK
Contributor II

And I found that, we use mfgtools to update uboot, zImage and ..., once enable HAB, mfgtool could not work.

0 Kudos
Reply
1,436 Views
GrDK
Contributor II

Here is my csf_uboot.txt, 

[Header]

Version = 4.2

Hash Algorithm = sha256

Engine Configuration = 0

Certificate Format = X509

Signature Format = CMS

Engine = CAAM

[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 = 0x877ff400 0x00000000 0x00082c00 "u-boot-dtb.imx"

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2335788%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2335788%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%EF%BC%8C%3C%2FP%3E%3CP%3EI%20burn%20a%20signed%20u-boot-dtb.imx%2C%20and%20prog%20the%20fuse%2C%20when%20check%20the%20hab%20events%2C%20it%20occurs%20err%20like%20this.%20What%20could%20I%20do%20for%20it%3F%3C%2FP%3E%3CP%3E%3D%26gt%3B%20hab_status%3C%2FP%3E%3CP%3ESecure%20boot%20disabled%3C%2FP%3E%3CP%3EHAB%20Configuration%3A%200xf0%2C%20HAB%20State%3A%200x66%3C%2FP%3E%3CP%3E---------%20HAB%20Event%201%20-----------------%3CBR%20%2F%3Eevent%20data%3A%3CBR%20%2F%3E0xdb%200x00%200x14%200x42%200x69%200x0a%200xc0%200x00%3CBR%20%2F%3E0xca%200x00%200x0c%200x00%200x01%200xc5%200x1d%200x00%3CBR%20%2F%3E0x00%200x00%200x07%200xe4%3C%2FP%3E%3CP%3ESTS%20%3D%20HAB_WARNING%20(0x69)%3CBR%20%2F%3ERSN%20%3D%20HAB_UNS_ENGINE%20(0x0A)%3CBR%20%2F%3ECTX%20%3D%20HAB_CTX_COMMAND%20(0xC0)%3CBR%20%2F%3EENG%20%3D%20HAB_ENG_ANY%20(0x00)%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E---------%20HAB%20Event%202%20-----------------%3CBR%20%2F%3Eevent%20data%3A%3CBR%20%2F%3E0xdb%200x00%200x1c%200x42%200x69%200x0a%200xc0%200x00%3CBR%20%2F%3E0xca%200x00%200x14%200x00%200x02%200xc5%200x1d%200x00%3CBR%20%2F%3E0x00%200x00%200x0d%200x3c%200x87%200x7f%200xf4%200x00%3CBR%20%2F%3E0x00%200x08%200x2c%200x00%3C%2FP%3E%3CP%3ESTS%20%3D%20HAB_WARNING%20(0x69)%3CBR%20%2F%3ERSN%20%3D%20HAB_UNS_ENGINE%20(0x0A)%3CBR%20%2F%3ECTX%20%3D%20HAB_CTX_COMMAND%20(0xC0)%3CBR%20%2F%3EENG%20%3D%20HAB_ENG_ANY%20(0x00)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2335788%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX6%20All%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6UL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336300%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336300%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAnd%20I%20found%20that%2C%20we%20use%20mfgtools%20to%20update%20uboot%2C%20zImage%20and%20...%2C%20once%20enable%20HAB%2C%20mfgtool%20could%20not%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336277%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336277%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20JorgeCas%2C%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20for%20your%20reply%2C%20and%20I%20finally%20reach%20at%26nbsp%3B%3C%2FP%3E%3CP%3E%23%23%23%23%23%23%23%23%23%23%23%3C%2FP%3E%3CP%3ESecure%20boot%20disabled%3C%2FP%3E%3CP%3EHAB%20Configuration%3A%200xf0%2C%20HAB%20State%3A%200x66%3CBR%20%2F%3ENo%20HAB%20Events%20Found!%3C%2FP%3E%3CP%3E%23%23%23%23%23%23%23%23%23%23%23%3C%2FP%3E%3CP%3EBut%20lately%20when%20I%20boot%20the%20device%2C%20it%20occurs%26nbsp%3B%3C%2FP%3E%3CP%3E%23%23%23%23%23%23%23%23%23%23%23%3C%2FP%3E%3CP%3EAuthenticate%20image%20from%20DDR%20location%200x80800000...%3CBR%20%2F%3Ebad%20magic%20magic%3D0x0%20length%3D0x00%20version%3D0x0%3CBR%20%2F%3Ebad%20length%20magic%3D0x0%20length%3D0x00%20version%3D0x0%3CBR%20%2F%3Ebad%20version%20magic%3D0x0%20length%3D0x00%20version%3D0x0%3CBR%20%2F%3EError%3A%20Invalid%20IVT%20structure%3C%2FP%3E%3CP%3EAllowed%20IVT%20structure%3A%3CBR%20%2F%3EIVT%20HDR%20%3D%200x4X2000D1%3CBR%20%2F%3EIVT%20ENTRY%20%3D%200xXXXXXXXX%3CBR%20%2F%3EIVT%20RSV1%20%3D%200x0%3CBR%20%2F%3EIVT%20DCD%20%3D%200x0%3CBR%20%2F%3EIVT%20BOOT_DATA%20%3D%200xXXXXXXXX%3CBR%20%2F%3EIVT%20SELF%20%3D%200xXXXXXXXX%3CBR%20%2F%3EIVT%20CSF%20%3D%200xXXXXXXXX%3CBR%20%2F%3EIVT%20RSV2%20%3D%200x0%3CBR%20%2F%3EAuthenticate%20zImage%20Fail%2C%20Please%20check%3C%2FP%3E%3CP%3E%23%23%23%23%23%23%23%23%23%23%23%3C%2FP%3E%3CP%3EI%20do%20not%20make%20any%20config%20to%26nbsp%3Bauthenticate%20zImage%2C%20could%20u%20please%20give%20me%20a%20help%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336142%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336142%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThis%20processor%20does%20not%20have%20CAAM%2C%20I%20suggest%20you%20try%20with%20a%20different%20engine%3A%3C%2FP%3E%0A%3CPRE%3E%5BHeader%5D%3CBR%20%2F%3EVersion%20%3D%204.2%3CBR%20%2F%3EHash%20Algorithm%20%3D%20sha256%3CBR%20%2F%3EEngine%20Configuration%20%3D%200%3CBR%20%2F%3ECertificate%20Format%20%3D%20X509%3CBR%20%2F%3ESignature%20Format%20%3D%20CMS%3CBR%20%2F%3E%3CSTRONG%3EEngine%20%3D%20SW%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2335792%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20HABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2335792%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHere%20is%20my%20csf_uboot.txt%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%5BHeader%5D%3C%2FP%3E%3CP%3EVersion%20%3D%204.2%3C%2FP%3E%3CP%3EHash%20Algorithm%20%3D%20sha256%3C%2FP%3E%3CP%3EEngine%20Configuration%20%3D%200%3C%2FP%3E%3CP%3ECertificate%20Format%20%3D%20X509%3C%2FP%3E%3CP%3ESignature%20Format%20%3D%20CMS%3C%2FP%3E%3CP%3EEngine%20%3D%20CAAM%3C%2FP%3E%3CP%3E%5BInstall%20SRK%5D%3C%2FP%3E%3CP%3E%23%20Index%20of%20the%20key%20location%20in%20the%20SRK%20table%20to%20be%20installed%3C%2FP%3E%3CP%3EFile%20%3D%20%22..%2Fcrts%2FSRK_1_2_3_4_table.bin%22%3C%2FP%3E%3CP%3ESource%20index%20%3D%200%3C%2FP%3E%3CP%3E%5BInstall%20CSFK%5D%3C%2FP%3E%3CP%3E%23%20Key%20used%20to%20authenticate%20the%20CSF%20data%3C%2FP%3E%3CP%3EFile%20%3D%20%22..%2Fcrts%2FCSF1_1_sha256_2048_65537_v3_usr_crt.pem%22%3C%2FP%3E%3CP%3E%5BAuthenticate%20CSF%5D%3C%2FP%3E%3CP%3E%5BInstall%20Key%5D%3C%2FP%3E%3CP%3E%23%20Key%20slot%20index%20used%20to%20authenticate%20the%20key%20to%20be%20installed%3C%2FP%3E%3CP%3EVerification%20index%20%3D%200%3C%2FP%3E%3CP%3E%23%20Target%20key%20slot%20in%20HAB%20key%20store%20where%20key%20will%20be%20installed%3C%2FP%3E%3CP%3ETarget%20Index%20%3D%202%3C%2FP%3E%3CP%3E%23%20Key%20to%20install%3C%2FP%3E%3CP%3EFile%3D%20%22..%2Fcrts%2FIMG1_1_sha256_2048_65537_v3_usr_crt.pem%22%3C%2FP%3E%3CP%3E%5BAuthenticate%20Data%5D%3C%2FP%3E%3CP%3E%23%20Key%20slot%20index%20used%20to%20authenticate%20the%20image%20data%3C%2FP%3E%3CP%3EVerification%20index%20%3D%202%3C%2FP%3E%3CP%3E%23%20Authenticate%20Start%20Address%2C%20Offset%2C%20Length%20and%20file%3C%2FP%3E%3CP%3EBlocks%20%3D%200x877ff400%200x00000000%200x00082c00%20%22u-boot-dtb.imx%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HABv4%20on%20imx6ull%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThis%20error%20is%20because%20authenticate%20image%20code%20failed%2C%20you%20can%20refer%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26amp%3Bsource%3Dweb%26amp%3Brct%3Dj%26amp%3Bopi%3D89978449%26amp%3Burl%3Dhttps%3A%2F%2Fcommunity.nxp.com%2Fpwmxy87654%2Fattachments%2Fpwmxy87654%2Fimx-processors%2F60046%2F1%2Fi.MX_6_Linux_High_Assurance_Boot_(HAB)_User%252527s_Guide.pdf%26amp%3Bved%3D2ahUKEwib4rqUg6-TAxV0HkQIHYxGAo4QFnoECAwQAQ%26amp%3Busg%3DAOvVaw3KfpbSCOakrVf3iJCP6h0M%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eapplication%20note%3C%2FA%3E%20to%20check%20if%20your%20steps%20are%20correct.%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20refer%20to%20the%20next%20links%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors%2FSecure-boot-imx6-Invalid-IVT-structure%2Ftd-p%2F1618944%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors%2FSecure-boot-imx6-Invalid-IVT-structure%2Ftd-p%2F1618944%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.ezurio.com%2Fdocumentation%2Fhigh-assurance-boot-hab-for-dummies%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.ezurio.com%2Fdocumentation%2Fhigh-assurance-boot-hab-for-dummies%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E