Hi,
I’m currently working with the secure boot features introduced in the meta-toradex-security layer for Torizon OS 6.7.0. I successfully managed to close a Colibri iMX7 eMMC device, and now I’m trying to test the full secure boot flow, including recovery scenarios in case of corrupted updates or tampered-with devices.
To do this, I attempted to reflash the device using NXP’s uuu tool, since I know that Toradex Easy Installer doesn’t support closed devices out of the box, mainly because it lacks secure boot signing.
What I’ve Done So Far:
I created a custom signed u-boot.imx based on the colibri-imx7-emmc configuration, that boots and immediately enables fastboot mode. I signed it using the NXP CST tool (v4.0.1), and verified that it boots correctly on the closed device.
During the testing process, something went wrong and my MMC storage got wiped. Now the device doesn’t recognize the expected partitions.
On my pc:
U>CFG: FB: -vid 0x1b67 -pid 0x4027
Start Cmd:CFG: FB: -vid 0x1b67 -pid 0x4027
Okay
U>FB: flash -raw2sparse all recovery/colibri-imx7-emmc.wic
Start Cmd:FB: flash -raw2sparse all recovery/colibri-imx7-emmc.wic
New USB Device Attached at 1:4
0x07000000Variable not implementedinvalid partition or device1:4>Fail invalid partition or device(1.013s)
invalid partition or device
On the imx7 (u-boot):
Colibri iMX7 # fastboot 0
USB EHCI 1.00
Starting download of 16769064 bytes
…
…
downloading of 16769064 bytes finished
** Bad device specification mmc all **
** Bad device specification mmc all **
Couldn’t find partition mmc all
clearly the partitions are not correct anymore, also after trying to reinitialize them:
$ setenv partitions 'uuid_disk=${uuid_gpt_disk};name=boot,start=1MiB,size=64MiB,uuid=${uuid_gpt_boot};name=rootfs,size=100%,uuid=${uuid_gpt_rootfs}'
$ gpt write mmc 0 $partitions
And:
$ gpt repair mmc 0
Long story short:
I’m looking for guidance on how to reinitialize the MMC storage and flash a fresh Torizon image onto the closed device. Specifically:
- Is it possible to use a
.wicimage to flash the MMC? If so, how? - If not, what specific files from my BitBake build output can I use to manually flash the device?
- (what are the correct configurations for adding a
.wicas artifact inlocal.conf?) - Are there any recommended steps or scripts for flashing a closed device using
uuu?
Any help or pointers would be greatly appreciated!
Thanks in advance,
Jippe