Closed niziak closed 6 months ago
U-Boot still complains, even with fixed genimage
. U-Boot message returned to uuu
:
20%Bogus chunk size for chunk type Dont Care1:223>Fail Bogus chunk size for chunk type Dont Care(23.31s)
There 2nd problem with U-Boot. Message above is generated in U-Boot's CRC32 chunk handler. Error message is misleading. U-Boot incorrectly handle CRC32 chunk size check: https://github.com/u-boot/u-boot/blob/master/lib/image-sparse.c#L291
Scenario
Hi. I'm using NXP i.MX8MM. It is flashed using
uuu
PC software and U-Boot in fastboot mode on target. To speedup flashing process I've decided to use Android sparse format (which is natively supported by U-Boot) and it works when:uuu
generate sparse format for u-boot on fly from raw sdcard image.img2simg
but flashing stops near end of process when I'm using
genimage
'sandroid-sparse
image. Also it is not possible to convert generated by genimagesparse
file using Andorid Toolssimg2img
. Dumping content of genimage'ssparse
file shows missing blocks:Investigation summary
There is a bug in
genimage
, when last FS extent ends earlier than real file size. Block generation loop depends only on extent map not real file size.Reproduction
tuncate -s 100M empty.sparse