Booting a signed image via USB (mfgtool) with i.MX53

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

Booting a signed image via USB (mfgtool) with i.MX53

Jump to solution
1,425 Views
BernhardWalle
Contributor I

Hello,

I have a problem booting a HAB-signed u-boot image via the serial download protocol over USB. I'm using the imx_usb_loader on Linux since I have the source code (which I doesn't have if I'm using mfgtool) and it contains detailled debugging output.

The image boots from NAND without problems, so the signature process should be basically correct.

http://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf​ contains instructions how to boot a signed image via USB in section "6.2  Signing Code Downloadable with Manufacturing Tool". However, that refers to i.MX 6 and not to i.MX53. My question would be if the i.MX53 also downloads the DCD into RAM and, if it does, what the address is? If I understand the source code and the output of imx_usb_loader correctly, the commands of the DCD are processed directly and the registers are set using memory write (0x0202) commands. So it shouldn't be necessary to authenticate the DCD. But the DCD address of the IVT must be set to 0.

So what I configured the USB loader to do the DCD configuration before and then download a signed u-boot.imx image without a DTD. But it still doesn't work.

Any help? Has anybody managed to boot a signed u-boot on i.MX53 via USB?

Regards,

Bernhard

Labels (1)
0 Kudos
1 Solution
842 Views
Yuri
NXP Employee
NXP Employee

Hello,

  As for imx_usb_loader :

"The method employed for MFG tool is not followed in this tool i.e. copying DCD content
to different address in OCRAM in order to perform memory initialization and other stuff
before booting the boot image. This tool can be used with normal signed image without
changing anything in the CSF as done for MFG tool."

  For example, please look at the following :

HAB events when using imx_usb_loader


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
843 Views
Yuri
NXP Employee
NXP Employee

Hello,

  As for imx_usb_loader :

"The method employed for MFG tool is not followed in this tool i.e. copying DCD content
to different address in OCRAM in order to perform memory initialization and other stuff
before booting the boot image. This tool can be used with normal signed image without
changing anything in the CSF as done for MFG tool."

  For example, please look at the following :

HAB events when using imx_usb_loader


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
842 Views
BernhardWalle
Contributor I

Thanks for the pointer. The solution was that not only the DCD pointer is cleared by imx_usb_loader but also the boot_data field. I modified imx_usb_loader to not clear the boot_data and now my setup works!

0 Kudos
842 Views
fabio_estevam
NXP Employee
NXP Employee

Bernhard,

Could you please share your imx_usb_loader patch?

Thanks

0 Kudos
842 Views
BernhardWalle
Contributor I

My plan was to get it merged upstream. But I'll send a pull request only after my first pull request was integrated.

But here is the direct link to the patch:

Add no_clear_boot_data option · bwalle/imx_usb_loader@e90ea8b · GitHub

0 Kudos