can not flash emmc over uuu tool with build-in script emmc_all

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can not flash emmc over uuu tool with build-in script emmc_all

Jump to solution
1,359 Views
MicMoba
Contributor V

Hi,

I use a imx8mp soc with 8GB emmc flash. I built a yocto image which contains a u-boot 2024.01 and a linux kernel 6.6

The output wic-file has a size of 7.6GB

When I try to flash this wic file over the uuu tool I always got an error.

Command: uuu.exe -b emmc_all myYoctoImage.wic

Error: "write_sparse_image: Request would exceed partition size!"

The error occurs repeatable at the 2GB border.

I enabled the debug outputs of image-sparse.c in the u-boot.

This is the last output:

Flashing sparse image at offset 0
=== Sparse Image Header ===
magic: 0xed26ff3a
major_version: 0x1
minor_version: 0x0
file_hdr_sz: 28
chunk_hdr_sz: 12
blk_sz: 4096
total_blks: 528126
total_chunks: 2
Flashing Sparse Image
=== Chunk Header ===
chunk_type: 0xcac3
chunk_data_sz: 0x7ff00
total_size: 0xc
write_sparse_image: Request would exceed partition size!
dwc3-generic-peripheral usb@38100000: request 00000000bdf52900 was not queued to ep1in-bulk

I need to mention that I use the GPT partition table.

What changed in u-boot that I can not flash my whole wic-file?

 

Tags (4)
0 Kudos
Reply
1 Solution
1,332 Views
MicMoba
Contributor V

I thing I found out how to handle it. I can't use the build-in scripts anymore.

To flash the wic-image I have to use

FB: flash -raw2sparse mmc2 mywicimage

And for flashing the bootloader

FB: flash mmc2boot0 flash.bin

This works with the following configuration of u-boot:

CONFIG_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
CONFIG_FASTBOOT_BUF_SIZE=0xC800000
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_UUU_SUPPORT=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=2
CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc2boot0"
CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc2boot1"
CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
CONFIG_FASTBOOT_MMC_USER_NAME="mmc2"
 
Because I am not able to run a custom script with uuu-tool under windows, I think I need to compile my own version with a modified build-in script "emmc_all"
 

 

View solution in original post

1 Reply
1,333 Views
MicMoba
Contributor V

I thing I found out how to handle it. I can't use the build-in scripts anymore.

To flash the wic-image I have to use

FB: flash -raw2sparse mmc2 mywicimage

And for flashing the bootloader

FB: flash mmc2boot0 flash.bin

This works with the following configuration of u-boot:

CONFIG_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
CONFIG_FASTBOOT_BUF_SIZE=0xC800000
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_UUU_SUPPORT=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=2
CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc2boot0"
CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc2boot1"
CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
CONFIG_FASTBOOT_MMC_USER_NAME="mmc2"
 
Because I am not able to run a custom script with uuu-tool under windows, I think I need to compile my own version with a modified build-in script "emmc_all"