AnsweredAssumed Answered

i.MX6 Recovery Mode with HAB and MFG tool

Question asked by Mickey I on Nov 21, 2013
Latest reply on May 14, 2018 by thomaslinder

Hi,

 

I'm trying to boot a i.MX6 with a signed u-boot and I'm getting HAB events.

I followed the guide (AN4581 6.2) and looked at two related posts here but I still can't get to a clean events status (https://community.freescale.com/message/332405#332405, https://community.freescale.com/docs/DOC-96451).

The first HAB event reported is HAB_INV_IVT.

 

U-Boot > hab_status

iMX6 HAB status Information :

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

Checking HAB_status

 

 

HAB Configuration: 0xf0 HAB State: 0x66

 

 

--------- HAB Event 1 -----------------

event data:

   0xdb 0x00 0x08 0x41 0x33 0x05 0x0a 0x00

 

 

--------- HAB Event 2 -----------------

event data:

   0xdb 0x00 0x08 0x41 0x33 0x22 0x0a 0x00

 

 

--------- HAB Event 3 -----------------

event data:

   0xdb 0x00 0x08 0x41 0x33 0x22 0x0a 0x00

 

 

--------- HAB Event 4 -----------------

event data:

   0xdb 0x00 0x08 0x41 0x33 0x22 0x0a 0x00

 

 

--------- HAB Event 5 -----------------

event data:

   0xdb 0x00 0x14 0x41 0x33 0x0c 0xa0 0x00

   0x00 0x00 0x00 0x00 0x27 0x80 0x04 0x00

   0x00 0x00 0x00 0x20

 

 

--------- HAB Event 6 -----------------

event data:

   0xdb 0x00 0x14 0x41 0x33 0x0c 0xa0 0x00

   0x00 0x00 0x00 0x00 0x27 0x80 0x08 0x20

   0x00 0x00 0x00 0x04

 

Here are the steps I took and their outputs. I'd appreciate any ideas to resolve this:

 

I'm using two files:

* image-pad.bin                 - padded u-boot.bin

* image-pad-no-dcdptr.bin  - a copy of image-pad.bin with the DCD pointer zeroed out.

 

CSF file:

[Header]

        Version = 4.0

        Security Configuration = Open

        Hash Algorithm = sha256

        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 = 0x27800400 0x400 0x32c00 "/home/plomba/temp/debug_mfg/image-pad-no-dcdptr.bin", \

                 0x00910000 0x42C 0x3F0 "/home/plomba/temp/debug_mfg/image-pad-no-dcdptr.bin"

 

image-pad-no-dcdptr.bin - IVT to DCD ptr binary:

0x00000400: D1002040 20088027 00000000 00000000     .. @ ..'........

0x00000410: 20048027 00048027 00308327 00000000      ..'...'.0.'....

0x00000420: 00008027 00500300 00000000 D203F040     ...'.P.........@

 

 

u-boot.bin (signed) - IVT to DCD ptr binary:

0x00000400: D1002040 20088027 00000000 2C048027     .. @ ..'....,..'

0x00000410: 20048027 00048027 00308327 00000000      ..'...'.0.'....

0x00000420: 00008027 00500300 00000000 D203F040     ...'.P.........@

 

Running Linux MFG tool:

# ./imx_usb u-boot.bin

config file <./imx_usb.conf>

config file <./mx6_usb_work.conf>

parse mx6_usb_work.conf

15a2:0054(mx6_qsb) bConfigurationValue =1

Interface 0 claimed

report 1, wrote 16 bytes, err=0

report 3, read 4 bytes, err=0

read=56 78 78 56

u-boot.bin 0 0 1 0 1 2

main dcd length 3f0

sub dcd length 3ec

dcd_ptr=0x2780042c

 

 

loading binary file(u-boot.bin) to 27800000, skip=0, fsize=35000 type=aa

 

 

<<<217088, 217088 bytes>>>

jumping to 0x27800400

 

 

 

Thanks,

Mickey.

Outcomes