mfgtools icon indicating copy to clipboard operation
mfgtools copied to clipboard

Corrupt image with larger transfer sizes

Open tmelin opened this issue 3 years ago • 4 comments

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.

tmelin avatar Dec 21 '21 15:12 tmelin

Can you sent me your fit image?

nxpfrankli avatar Dec 27 '21 18:12 nxpfrankli

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.

nxpfrankli avatar Dec 27 '21 18:12 nxpfrankli

Can you try branch b314? https://github.com/NXPmicro/mfgtools/tree/b314

nxpfrankli avatar Jan 04 '22 15:01 nxpfrankli

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!

tmelin avatar Jan 05 '22 12:01 tmelin