i.mx6ULL hab_auth_image_or_fail causes UUU USB library Fault

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

i.mx6ULL hab_auth_image_or_fail causes UUU USB library Fault

812 Views
JohnKlug
Senior Contributor I

I am testing hab_auth_img_or_fail on U-Boot 2020.04.

 

I corrupted the image, and ran the code (uncorrupted image works fine):

=> hab_auth_img_or_fail $loadaddr $filesize $ivtoffset

Authenticate image from DDR location 0x80800000...

Secure boot enabled

HAB Configuration: 0xcc, HAB State: 0x99

--------- HAB Event 1 -----------------
event data:
0xdb 0x00 0x1c 0x42 0x33 0x18 0xc0 0x00
0xca 0x00 0x14 0x00 0x02 0xc5 0xff 0x00
0x00 0x00 0x0d 0x34 0x80 0x80 0x00 0x00
0x04 0xa1 0xc0 0x20

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_SIGNATURE (0x18)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)

authentication fail -> hab_auth_img_or_fail 0x80800000 4a1cf58 4a1c000

  uuu:

$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.107-15-gd1c466c

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================
	3:12	 MX6ULL	 SDP:	 0x15A2	0x0080	 0x0001

$ uuu -b nand u-boot-usb-signed.imx 
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.107-15-gd1c466c

Success 0    Failure 1                                                                                                                                   
                                                                                                                                                          
                                                                                                                                                          
3:12     1/ 1 [HID(W):LIBUSB_ERROR_TIMEOUT           ] SDP: boot -f u-boot-usb-signed.imx              
0 Kudos
4 Replies

769 Views
JohnKlug
Senior Contributor I

Let me make this clear.  I intentionally caused corruption on my image.  I am testing hab_auth_img_or_fail (or hab_failsafe).

 

hab_auth_img_or_fail is correctly bringing up USB for recovery.  Unfortunately this is not useful, because USB then fails to respond. The work-around is to disable the NAND, and have the ROM boot code bring up USB, which then works correctly.

 

Is there any fix for this issue, so U-Boot will be able to bring up USB correctly so I can then flash the device with UUU without having to physically disable the NAND?

0 Kudos

765 Views
Yuri
NXP Employee
NXP Employee

@JohnKlug 
Hello,

   after boot error (hab_auth_img_or_fail) it makes sense to power off the board,
setup manually i.MX for USB serial downloader mode  and power on the system
again.

 

Regards,
Yuri.

0 Kudos

785 Views
Yuri
NXP Employee
NXP Employee

@JohnKlug 
Hello,

  I've sent You some comments directly.

Regards,
Yuri.

0 Kudos

718 Views
JohnKlug
Senior Contributor I

Just to make it clear that this did not fix my issue.  I corrupted my image deliberately and wrote it to the NAND.

I started uuu:

uuu mlinux-mtcap3-test-image-mtcap3-20210809163413-uuu.zip

 

I then power on my device (I have tried both our board and a Variscite Dart board with i.MX6 ULL (end of U-Boot console output)):

 

Secure boot enabled

HAB Configuration: 0xcc, HAB State: 0x99

--------- HAB Event 1 -----------------
event data:
0xdb 0x00 0x1c 0x42 0x33 0x18 0xc0 0x00
0xca 0x00 0x14 0x00 0x02 0xc5 0xff 0x00
0x00 0x00 0x16 0x34 0x80 0x80 0x00 0x00
0x03 0x50 0xa0 0x20

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_SIGNATURE (0x18)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)

authentication fail -> hab_auth_img_or_fail 0x80800000 350b958 350a000

 


I then see on the PC the following from UUU:

 

Success 0 Failure 1


3:12 1/ 1 [HID(R):LIBUSB_ERROR_TIMEOUT ] SDP: boot -f u-boot-usb-signed.imx 

 

 

 

Since I have a test version of U-Boot, I have fastboot enabled.  If I type "fastboot 0", I can then get uuu to work.  fastboot is not acceptable, if we are to lock down the device.

0 Kudos