i.MX8MP - burn signed image to eMMC using UUU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8MP - burn signed image to eMMC using UUU

1,744件の閲覧回数
amosercq
Contributor III

Hello,

as per subject, we have built a Yocto image following instructions from uboot-imx/doc/imx/habv4/guides/mx8m_secure_boot.txt at lf_v2022.04 · nxp-imx/uboot-imx obtaining a signed bootloader (signed_flash.bin), a signed kernel (Image_signed.bin).

We then replaced the unsigned bootloader and kernel in the deploy folder with the signed version (and added the tag that UUU expects to the signed bootloader file), which seems to be fine if flashing the resulting .wic image to an SD Card. However, if we use UUU, the process fails. 

In particular, it seems that the program fails to go past the 

SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000

command.

Manually running the same command for both the unsigned and signed flash files shows that there are no issues when using the unsigned version, but the command hangs after a few successful transfer operations (9%) and times out when using the signed version.

Are we perhaps missing some steps? 

Many thanks,

Alex

ラベル(1)
タグ(3)
0 件の賞賛
返信
8 返答(返信)

1,725件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Details on how to use HABv4 via SDP can be found in UUU documentation.

Best regards.

0 件の賞賛
返信

1,716件の閲覧回数
amosercq
Contributor III

Thanks for the quick response.

I am finding quite difficult to follow the doc you linked, as I can't find any u-boot-dtb related logs or .imx files throughout my whole Yocto environment. Could it be named something different?

I even searched for every "*.imx" files within u-boot-imx and then within the whole build folder, but there were no results at all.

many thanks,

Alex

0 件の賞賛
返信

1,707件の閲覧回数
amosercq
Contributor III
From https://www.nxp.com/docs/en/user-guide/IMX_PORTING_GUIDE.pdf, it says that "For i.MX 8M Quad, i.MX 8M Mini, i.MX 8M Nano, and i.MX 8M Plus, U-Boot does not contain DCD".
Could the cause of our issue be something different then?
0 件の賞賛
返信

1,660件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Are you using a specific script to flash de image?

Did you close the device?

Does it happen with unsigned images?

Please share the command and log when the issue is present.

Best regards.

0 件の賞賛
返信

1,649件の閲覧回数
amosercq
Contributor III

Hello,

We have not closed the device yet so we would expect both images to work. Flashing it to SD card works.

To flash the image we are running uuu from a Windows machine, the command we use is

uuu -b emmc_all imx-image-multimedia-imx8mp-lpddr4-evk.rootfs.wic

This works fine with the unsigned image, but not with the signed one.

Other observations from our investigation:

- The emmc_all script doesn't seem to get past the first command:

SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000

Indicating the issue is with the signed bootloader.

- The signed bootloader was created according to the instructions from https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt, then we tagged it according to uuu_bootloader_tag.bbclass.

- Running the command below with the unsigned bootloader:

uuu SDPS: boot -scanterm -f ./imx-boot-tagged-unsigned -scanlimited 0x800000

works as expected, we can see logs on the device console and it ends with "Run fastboot..."

amosercq_2-1737718099642.png

 

- Running the same command with the signed bootloader:

uuu SDPS: boot -scanterm -f ./imx-boot-tagged-signed -scanlimited 0x800000

doesn't work: it starts and hangs when it reaches 10% and there is no console output from the device at all.

amosercq_0-1737718026482.png

amosercq_1-1737718035142.png

- The same behaviour is observed when running 

uuu SDPS: boot -f ./imx-boot-tagged-signed

- We rebuilt uuu locally, enabling libusb debug prints to help pinpoint the issue, but could not figure out what causes the device to not respond (I attached the logs of this, for both the signed and unsigned cases).

Hope this helps

 

0 件の賞賛
返信

1,634件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Could you please try with the next command?

uuu.exe -b emmc_all <signed bootloader> <rootfs>

For example:

uuu.exe -b emmc_all imx-boot-<your device>-sd.bin-flash imx-image-multimedia-<your device>.wic

Best regards.

0 件の賞賛
返信

1,588件の閲覧回数
amosercq
Contributor III

Hello,

The behaviour observed is the same:

amosercq_0-1737975793752.png

It stops at 10% during SDPS: boot -scanterm -f signed_flash.bin -scanlimited 0x800000 then hangs until the timeout error comes up.

Note: signed_flash.bin is the signed flash.bin file created following the guide linked above.

As expected, running this command with the unsigned version works:

amosercq_1-1737976208472.png

Many thanks,

Alex

0 件の賞賛
返信

1,558件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Could you please try with other method and check if the issue is in UUU or signed image?

Please try with method mentioned in i.MX Linux User's Guide in section 4.3 Preparing an SD/MMC card to boot

Best regards.

0 件の賞賛
返信