Create .wic file that contains signed flash.bin and Image

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

Create .wic file that contains signed flash.bin and Image

ソリューションへジャンプ
1,291件の閲覧回数
amosercq
Contributor III

Hello,

I have successfully been following the instructions from uboot-imx/doc/imx/habv4/guides/mx8m_secure_boot.txt at lf_v2022.04 · nxp-imx/uboot-imx to enable HABv4 on my iMX8MP.

I now have:

  1. The signed bootloader signed_flash.bin
  2. The signed kernel Image_signed.bin
  3. The (unsigned) OS image .wic

Currently, I have been flashing the .wic file to an SD card and manually replaced flash.bin and Image with their signed counterparts.

I was wondering whether there is a way I could modify my Yocto recipe so that the resulting .wic file already has the signed flash and Image?

many thanks,

Alex

ラベル(2)
0 件の賞賛
返信
1 解決策
1,219件の閲覧回数
amosercq
Contributor III

Thank you, it seems that it is possible for me to replace the bootlader and kernel files in the deploy folder with their signed version (signed_flash.bin becomes imx-boot and Image_signed.bin becomes Image).
However, the new .wic file works when burned on an SD card, but seems to have problems when using uuu.

In` particular, even after adding the tag to the bootloader file, the uuu command errors with "This wic boot length is wrong".

The command used to flash the new (signed) wic file to eMMC is:
`uuu.exe -b emmc_all <image.wic>`

The output:
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.182-0-gda3cd53
Success 0 Failure 1
2:14-2016A80 1/ 1 [This wic boot length is wrong ] SDPS: boot -scanterm -f <image.wic> -scanlimited 0x800000

I was wondering if you knew what the cause of this error could be, before I dive into the mfgtools code to try reverse engineer it? 

 

Many thanks,

Alex

元の投稿で解決策を見る

タグ(4)
0 件の賞賛
返信
3 返答(返信)
1,263件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The i.MX BSP package contains several root file systems. They are named with the following convention:
[image name]-[backend]-[platform][board].[ext4|wic]. The ext4 extension indicates a standard
file system. It can be mounted as NFS, or its contents can be stored on a boot media such as an SD/MMC card.
Check the Linux user guide to how to burn and copy firmware with hab container:

https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf

 

Regards

0 件の賞賛
返信
1,220件の閲覧回数
amosercq
Contributor III

Thank you, it seems that it is possible for me to replace the bootlader and kernel files in the deploy folder with their signed version (signed_flash.bin becomes imx-boot and Image_signed.bin becomes Image).
However, the new .wic file works when burned on an SD card, but seems to have problems when using uuu.

In` particular, even after adding the tag to the bootloader file, the uuu command errors with "This wic boot length is wrong".

The command used to flash the new (signed) wic file to eMMC is:
`uuu.exe -b emmc_all <image.wic>`

The output:
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.182-0-gda3cd53
Success 0 Failure 1
2:14-2016A80 1/ 1 [This wic boot length is wrong ] SDPS: boot -scanterm -f <image.wic> -scanlimited 0x800000

I was wondering if you knew what the cause of this error could be, before I dive into the mfgtools code to try reverse engineer it? 

 

Many thanks,

Alex

タグ(4)
0 件の賞賛
返信
1,188件の閲覧回数
amosercq
Contributor III

Update: the issue was due to a malformed imx-boot file that caused the length field not to match the actual size of the bootloader. It has now been fixed however uuu still fails to flash the signed .wic to eMMC.
It reaches 10% and then hangs, eventually erroring with HID(W): LIBUSB_ERROR_TIMEOUT (-7).

タグ(3)
0 件の賞賛
返信