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
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
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.
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..."
- 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.
- 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
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.
Hello,
The behaviour observed is the same:
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:
Many thanks,
Alex
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.