Flash wic image with UUU on Linux

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

Flash wic image with UUU on Linux

5,070 Views
ebecam_
Contributor I

Hello,

I am working on an IMX8M Mini, and I recently started to used fully partionned .wic.bz2 image instead of sdcard.bz2.

Flashing my emmc with uuu is not functional on my Linux laptop (Ubuntu 18.04 - 64bit) with .wic.bz2 image. This is working fine with a Windows laptop so I know my .wic.bz2 is correctly built. I had no trouble to flash on my Linux when I used .sdcard.bz2 image.

 

uuu command used is: sudo ${UUU_DIR}/uuu -v -b emmc_all \
${BIN_DIR}imx-boot-smarthub-hw-sd.bin-flash_evk \
${BIN_DIR}winegard-smarthub-smarthub-hw.wic.bz2

 

Here is the output of uuu:

Wait for Known USB Device Appear...
New USB Device Attached at 1:91
1:91>Start Cmd:FB: ucmd setenv fastboot_dev mmc
1:91>Okay (0.012s)
1:91>Start Cmd:FB: ucmd setenv mmcdev ${emmc_dev}
1:91>Okay (0s)
1:91>Start Cmd:FB: ucmd mmc dev ${emmc_dev}
1:91>Okay (0.097s)
1:91>Start Cmd:FB: flash -raw2sparse all /mnt/dev/1_Projects/SMARTHUB/bin/winegard-smarthub-smarthub-hw.wic.bz2/*
16775680terminate called without an active exception
Aborted

 

Version used is: libuuu_1.4.138-0-g051a8fe, uuu_version 1.2.39

 

Below the output of U-Boot if it helps:

u-boot=> fastboot USB0
switch to partitions #0, OK
mmc1(part 0) is current device
Starting download of 16776232 bytes
..........................................................................
.....................................................
downloading of 16776232 bytes finished
writing to partition 'all'
sparse flash target is mmc:1
writing to partition 'all' for sparse, buffer size 16776232
Flashing sparse image at offset 0
Flashing Sparse Image
........ wrote 16776192 bytes to 'all'
Starting download of 16776244 bytes
..........................................................................
.....................................................
downloading of 16776244 bytes finished
writing to partition 'all'
sparse flash target is mmc:1
writing to partition 'all' for sparse, buffer size 16776244
Flashing sparse image at offset 0
Flashing Sparse Image
........ wrote 16776192 bytes to 'all'

 

Does anyone know if there is some restrictions on Linux side with the uuu tool ? Are they any patch to fix it ?

Thanks for your help

 

Labels (2)
0 Kudos
3 Replies

5,039 Views
ebecam_
Contributor I

Hi Aldo,

Thanks for your reply, using the uncompressed image solved my issue. I have another question on my mind. My .wic image is a 15G image and takes around 20min to flash with UUU. 

Do you know if this can be speed up ? Out of the 15G, only a small part really contains data, most of image is 0 bytes, so is there a way to bypass those ?

Thanks for your help,

Elise

 

 

0 Kudos

5,007 Views
AldoG
NXP TechSupport
NXP TechSupport

Hi,

Well actually this is more of a yocto thing, if you want to reduce the size of the .wic image you may check the following:
https://community.nxp.com/t5/i-MX-Processors/Yocto-WIC-image-creator-with-fixed-partition-sizes/m-p/...

I don't know if it may be possible for the tool to bypass partitions since it will copy the whole .wic image, some customers have removed messages from UART port to speed up a bit the flash process.

BR,
Aldo.

0 Kudos

5,056 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Could you try by decompressing the .bz2 file?

It may be using too much memory like in the scenario below:
https://github.com/NXPmicro/mfgtools/issues/179

Also, I think this may be a tool related issue, I would suggest to post it in the github as well.

Best regards,
Aldo.

0 Kudos