mfgtools
mfgtools copied to clipboard
Corrupt image with larger transfer sizes
Tested with master commit 49afb54. File that triggered error was of size 32509758 bytes. command was
SDPV: write -f image.fit -addr 0x89000000
File transfer is successful, but sanity checks in U-Boot side (version 2021.10) fails. Error
## Checking Image at 89000000 ...
FIT image found
FIT check error -22
Bad FIT image format!
More specifically fdt_check_full() in U-Boot fails when checking FDT_PROP nodes as the propname is garbled. Error code is FDT_ERR_TRUNCATED Same image can be loaded without errors with previous uuu version in use, 1.2.135. Hence it would initially indicate that the image gets corrupted during the transfer.
Can you sent me your fit image?
Yes, I found it.
We limited size to 32MB because the first fat partition of wic image built by yocto is 32MB.
We supposed boot image also used for SD boot.
Let me think how to balance this.
Can you try branch b314? https://github.com/NXPmicro/mfgtools/tree/b314
Tested with b314 branch commit 06a6cc2 ("Fixed 314 Corrupt image with larger transfer sizes at sdp(s).") I can confirm that with change transfer is now successful and image is bootable.
(As a side note I occasionally see sha256 checksum for image not matching with expected. That also happens with 1.2.135 when transferring large image but is likely related to some other issue.)
Thanks for fixing this!