Uuu flash error: sparse image block size issue

For some reason I’m getting this error below.
Image size is lower than MMC, but it still complaints.
Could you please help me to debug it?
Thanks!

Error msg:

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.21-0-g1f42172
Success 0    Failure 1                                                                             
3:43     6/ 8 [sparse image block size issue         ] FB[-t 600000]: flash all someimage.img

setup:

Dahlia V1.1C
Verdin imx8m Plus Q 4GB WBIT / 16GB

info:

Verdin iMX8MP # mmcinfo
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 4e
Name: S0J56X 
Bus Speed: 200000000
Mode: HS400 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.8 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
Verdin iMX8MP # mmc list
FSL_SDHC: 1
FSL_SDHC: 2 (eMMC)
Verdin iMX8MP # mmc hwpartition   
Partition configuration:
        No enhanced user data area
        No GP1 partition
        No GP2 partition
        No GP3 partition
        No GP4 partition
Verdin iMX8MP # mmc part
Partition Map for MMC device 2  --   Partition Type: DOS
Part    Start Sector    Num Sectors     UUID            Type
  1     2048            131072          0039cd6f-01     0c Boot
  2     133120          1048576         0039cd6f-02     83
  3     1181696         22243503        0039cd6f-03     8e


-rw-r--r-- 1 user users 13993705472 Jun 20 14:03 image-ARM64-test.raw.img

cat uuu.auto_bkp 
uuu_version 1.4.43

SDPS: boot -f imx-boot
CFG: FB: -vid 0x0525 -pid 0x4000
CFG: FB: -vid 0x0525 -pid 0x403a
CFG: FB: -vid 0x0525 -pid 0x403d
CFG: FB: -vid 0x0525 -pid 0x403f
CFG: FB: -vid 0x0525 -pid 0x4040
CFG: FB: -vid 0x0525 -pid 0x4041
CFG: FB: -vid 0x0525 -pid 0x4042
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv emmc_dev 2
FB: ucmd mmc dev ${emmc_dev}
FB: flash bootloader some-boot-file
FB: ucmd mmc partconf ${emmc_dev} 1 1 0
FB[-t 600000]: flash all image-ARM64-test.img
FB: reboot
FB: done

screen logs:

Detect USB boot. Will enter fastboot mode!
Net:   eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for                                mfgtools
, using default environment

Run bootcmd_mfg: fastboot 0
Hit any key to stop autoboot:  0 
Detect USB boot. Will enter fastboot mode!
flash target is MMC:2
request 00000000fdf4e3c0 was not queued to ep1in-bulk
Detect USB boot. Will enter fastboot mode!
request 00000000fdf4e3c0 was not queued to ep1in-bulk
switch to partitions #0, OK
mmc2(part 0) is current device
Detect USB boot. Will enter fastboot mode!
request 00000000fdf4e3c0 was not queued to ep1in-bulk
request 00000000fdf4e3c0 was not queued to ep1in-bulk
Starting download of 1331760 bytes
request 00000000fdf4e3c0 was not queued to ep1in-bulk
..........
downloading of 1331760 bytes finished
request 00000000fdf4e3c0 was not queued to ep1in-bulk
writing to partition 'bootloader'
Initializing 'bootloader'
switch to partitions #1, OK
mmc2(part 1) is current device
Writing 'bootloader'

MMC write: dev # 2, block # 0, count 2602 ... 2602 blocks written: OK
Writing 'bootloader' DONE!
request 00000000fdf4e3c0 was not queued to ep1in-bulk
Detect USB boot. Will enter fastboot mode!
request 00000000fdf4e3c0 was not queued to ep1in-bulk
request 00000000fdf4e3c0 was not queued to ep1in-bulk
Starting download of 16765472 bytes
request 00000000fdf4e3c0 was not queued to ep1in-bulk
..........................................................................
.....................................................
downloading of 16765472 bytes finished
request 00000000fdf4e3c0 was not queued to ep1in-bulk
writing to partition 'all'
sparse flash target is mmc:2
writing to partition 'all' for sparse, buffer size 16765472
Flashing sparse image at offset 0
Flashing Sparse Image
........ wrote 228261888 bytes to 'all'
request 00000000fdf4e3c0 was not queued to ep1in-bulk
Starting download of 2666938 bytes
request 00000000fdf4e3c0 was not queued to ep1in-bulk
....................
downloading of 2666938 bytes finished
request 00000000fdf4e3c0 was not queued to ep1in-bulk
writing to partition 'all'
sparse flash target is mmc:2
writing to partition 'all' for sparse, buffer size 2666938
Flashing sparse image at offset 0
write_sparse_image: Sparse image block size issue [32523]
request 00000000fdf4e3c0 was not queued to ep1in-bulk

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


The error message you’re encountering, “sparse image block size issue,” typically indicates a problem with the sparse image format being incompatible with the block size expected by the device’s eMMC. Sparse images are used to efficiently flash large partitions by only writing the non-empty sections, but they require specific handling based on the target hardware’s block size and the sparse image’s block size.

Given the context and the error encountered during the flashing process with the UUU (Universal Update Utility), here are a few steps to troubleshoot and potentially resolve the issue:

  1. Check Sparse Image Block Size: The sparse image format includes a header specifying the block size used when the image was created. This block size must be compatible with the eMMC block size on your Verdin iMX8M Plus module. You can use tools like simg2img or img2simg on a Linux machine to check or adjust the sparse image’s block size. Ensure it matches the eMMC’s block size (512 bytes, as indicated in your mmcinfo output).

  2. Verify Image Integrity: Ensure the sparse image file (someimage.img) is not corrupted. You can try re-generating or re-downloading the image if possible.

  3. UUU Version Compatibility: Ensure you’re using a version of the UUU tool that is compatible with your hardware and the image you’re trying to flash. Although you’ve mentioned using libuuu_1.5.21, consider testing with another version if available, especially if the image was provided or recommended to be flashed with a specific UUU version.

  4. Review UUU Script: Double-check the commands in your uuu.auto_bkp script. Ensure that the FB: flash all image-ARM64-test.img command is correct and that the image name matches exactly, including any file extension differences (.img vs .raw.img as seen in your setup information).

  5. MMC Configuration: Although less likely to be the cause, ensure that the MMC device configuration (partitioning, enhanced storage configuration, etc.) does not conflict with the flashing process. Your mmc hwpartition output indicates no enhanced user data area or GP partitions, which should be fine, but it’s worth reviewing any MMC configuration steps related to your specific use case.

  6. Use Alternative Flashing Methods: If the issue persists, consider using an alternative method to flash the image, such as directly writing the image to the eMMC using dd if

Please, also check if these links can help you solve your problem:

eMMC (Linux) | Toradex Developer Center.

Problem has been solved with another version of uuu (1.4.127)

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.127-0-g08c58c9
Success 1    Failure 0                                                                                                                   
3:41     8/ 8 [Done                                  ] FB: done

Hello @szymonp,

Thank you for letting us know about the solving of the issue. I am glad you managed to solve it.

Best regards
Collin