Hi NXP Team,
The installed UUU executable reports:
libuuu_1.5.21-0-g1f42172
We use:
sudo uuu -b emmc_all ~/Downloads/flash.bin *.wic
The built-in emmc_all script writes the complete .wic image using:
FB: flash -raw2sparse all _image
It then writes the bootloader, configures eMMC boot selection, and finishes with FB: done.
The script contains no explicit persistent flash-in-progress completion metadata handling or readback hash verification step.
If flashing is interrupted during the .wic write, the cluster can subsequently boot and display the updated HMI. We suspect that an existing usable bootloader and sufficient written boot,rootfs content permit this, but the selected slot and completeness of its contents are not yet confirmed.
Please advise how to add a power-loss-tolerant completion check that blocks normal boot from both slots after interrupted factory flashing, while preserving USB recovery. The metadata must remain valid independently of the full .wic write and bootloader update.
Hello,
An official solution is not implemented but you can customize the uuu script, the built-in emmc_all flow is simply a UUU script based on Fastboot and U-Boot commands, and it can be modified or replaced by a custom uuu.auto file. U-Boot commands can also be executed through FB: ucmd. This means you should add custom steps such as setting a "flash in progress" flag before programming and clearing it only after verification succeeds.
U-Boot Boot Count / Boot Limit
The U-Boot tree includes support for:
CONFIG_BOOTCOUNT_LIMIT
bootcount
bootlimit
altbootcmd
CONFIG_BOOTCOUNT_FS
When bootcount exceeds bootlimit, U-Boot executes altbootcmd instead of the normal bootcmd. This mechanism can be used to redirect the system to a recovery mode such as Fastboot