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,548 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,521 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,522 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"
 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1913979%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ecan%20not%20flash%20emmc%20over%20uuu%20tool%20with%20build-in%20script%20emmc_all%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1913979%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20use%20a%20imx8mp%20soc%20with%208GB%20emmc%20flash.%20I%20built%20a%20yocto%20image%20which%20contains%20a%20u-boot%202024.01%20and%20a%20linux%20kernel%206.6%3C%2FP%3E%3CP%3EThe%20output%20wic-file%20has%20a%20size%20of%207.6GB%3C%2FP%3E%3CP%3EWhen%20I%20try%20to%20flash%20this%20wic%20file%20over%20the%20uuu%20tool%20I%20always%20got%20an%20error.%3C%2FP%3E%3CP%3ECommand%3A%20uuu.exe%20-b%20emmc_all%20myYoctoImage.wic%3C%2FP%3E%3CP%3EError%3A%20%22write_sparse_image%3A%20Request%20would%20exceed%20partition%20size!%22%3C%2FP%3E%3CP%3EThe%20error%20occurs%20repeatable%20at%20the%202GB%20border.%3C%2FP%3E%3CP%3EI%20enabled%20the%20debug%20outputs%20of%20image-sparse.c%20in%20the%20u-boot.%3C%2FP%3E%3CP%3EThis%20is%20the%20last%20output%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EFlashing%20sparse%20image%20at%20offset%200%0A%3D%3D%3D%20Sparse%20Image%20Header%20%3D%3D%3D%0Amagic%3A%200xed26ff3a%0Amajor_version%3A%200x1%0Aminor_version%3A%200x0%0Afile_hdr_sz%3A%2028%0Achunk_hdr_sz%3A%2012%0Ablk_sz%3A%204096%0Atotal_blks%3A%20528126%0Atotal_chunks%3A%202%0AFlashing%20Sparse%20Image%0A%3D%3D%3D%20Chunk%20Header%20%3D%3D%3D%0Achunk_type%3A%200xcac3%0Achunk_data_sz%3A%200x7ff00%0Atotal_size%3A%200xc%0Awrite_sparse_image%3A%20Request%20would%20exceed%20partition%20size!%0Adwc3-generic-peripheral%20usb%4038100000%3A%20request%2000000000bdf52900%20was%20not%20queued%20to%20ep1in-bulk%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20need%20to%20mention%20that%20I%20use%20the%20GPT%20partition%20table.%3C%2FP%3E%3CP%3EWhat%20changed%20in%20u-boot%20that%20I%20can%20not%20flash%20my%20whole%20wic-file%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1913979%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1914794%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20can%20not%20flash%20emmc%20over%20uuu%20tool%20with%20build-in%20script%20emmc_all%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1914794%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20thing%20I%20found%20out%20how%20to%20handle%20it.%20I%20can't%20use%20the%20build-in%20scripts%20anymore.%3C%2FP%3E%3CP%3ETo%20flash%20the%20wic-image%20I%20have%20to%20use%3C%2FP%3E%3CP%3E%3CSTRONG%3EFB%3A%20flash%20-raw2sparse%20mmc2%20mywicimage%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EAnd%20for%20flashing%20the%20bootloader%3C%2FP%3E%3CP%3E%3CSTRONG%3EFB%3A%20flash%20mmc2boot0%20flash.bin%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThis%20works%20with%20the%20following%20configuration%20of%20u-boot%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3ECONFIG_FASTBOOT%3Dy%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_BUF_ADDR%3D0x42800000%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_BUF_SIZE%3D0xC800000%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_FLASH%3Dy%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_UUU_SUPPORT%3Dy%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_FLASH_MMC_DEV%3D2%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_MMC_BOOT_SUPPORT%3Dy%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_MMC_BOOT1_NAME%3D%22mmc2boot0%22%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_MMC_BOOT2_NAME%3D%22mmc2boot1%22%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_MMC_USER_SUPPORT%3Dy%3C%2FDIV%3E%3CDIV%3ECONFIG_FASTBOOT_MMC_USER_NAME%3D%22mmc2%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EBecause%20I%20am%20not%20able%20to%20run%20a%20custom%20script%20with%20uuu-tool%20under%20windows%2C%20I%20think%20I%20need%20to%20compile%20my%20own%20version%20with%20a%20modified%20build-in%20script%20%22emmc_all%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E