Hi,
after I swichted to the new uboot (2024.01) I can't flash a wic-file to the 
emmc anymore.

I use a uboot version for imx8 processors but I think the fastboot parts are 
equal. There is a special tool supported from NXP called uuu-tool to flash 
files by the fastboot protocol

With the old uboot (2021.04) I can flash the uboot-image as the wic-image as 
follows:

uuu.exe -b emmc flash.bin                 -> (flashes only the uboot)
uuu.exe -b emmc_all flash.bin wic.bin       -> (load the uboot into ram, start 
it and flash the wic-image)

My emmc has two separate boot-partitions with 16MB per partition. The emmc 
itself has 8GB

With the parameter -b the uuu-tool uses internal scripts.

Here is the simplified scirpt of emmc_all:
# @_flash.bin            | bootloader
# @_image   [_flash.bin] | image burn to emmc, default is the same as bootloader

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash -raw2sparse all _image
FB: flash -scanterm -scanlimited 0x800000 bootloader _flash.bin
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: done


My emmc device number is 2. So the environment variable emmc_dev is also 2. The 
-raw2sparse parameter let the uuu tool download and flash chunks of the 
wic-image-file.

I found out that build-in script "emmc" also not work anymore.

The original emmc script:
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash bootloader _image
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: Done

I have to change the bold marked line into:
"FB: flash boot0 _image" or "FB: flash boot1 _image"
to flash the bootloade into the boot partitions of my emmc

But I did not find out how to modify the "emmc_all" script to flash the entire 
emmc

The wic-file is an image which contains:
partition 1: kernel
partition 2: rootfs
partition 3: kernel
partition 4: rootfs
partition 5: user memory

This is what I expect what the fb_mmc.c  and  image-sparse.c  should do in 
Linux-like-syntax
dd if=wic-image of=/dev/mmcblk2 bs=1M

I put some debug messages into fb_mmc.c to have a closer look to the thinks 
what happen during the flashing.
It seems that always is looked for partitions and its not possible to write to 
the raw emmc.


Which fastboot command can I use to flash the raw emmc regardless of whether 
there are already partitions or not?





Mit freundlichen Grüßen / Best Regards

Michael Stahl
Staatl. gepr. Techniker
Lead Engineer - Advanced Development

MOBA Mobile Automation AG


[Location]      Kapellenstraße 15,  65555 Limburg, Deutschland  [Globe]         
www.moba-automation.de<https://moba-automation.de>
[Mail.png]      mst...@moba.de<mailto:mst...@moba.de>   [phone]         +49 
6431 9577-439<tel:+49%206431%209577-439>
[MOBA Logo]     [cid:2e5b8e33-e905-441f-ac10-1803e0a80da3] 
<https://www.xing.com/companies/mobamobileautomationag>   
<https://twitter.com/MOBA_Automation> 
[cid:d7cfd9f4-059e-414b-814d-493142624df5] 
<https://twitter.com/MOBA_Automation>   
[cid:117f85e5-b05d-4481-9dc6-5120cafd20f3] 
<https://de.linkedin.com/company/moba-mobile-automation>   
[cid:cb580079-18a8-43db-bdc1-db3fadc8d0fc] 
<https://www.facebook.com/MOBAWorldwide>   
[cid:682a418e-9b49-4793-a415-54f1aef33637] 
<https://www.youtube.com/user/MOBALive>

Chairman of the supervisory board: Ralf Konrad;
Executive board: Volker G. Harms, Dr. Holger Barthel;
Corporate headquarters: Limburg;
Register court: Limburg, HRB 2552, USt-IdNr.: DE 113865988

Information about the protection of your personal data can be found here:
https://moba-automation.de/datenschutzinfo-geschaeftspartner

This message is intended for the addressee only as it contains private and 
confidential information.
The contents are not to be disclosed to anyone other than the addressee.
Unauthorized recipients are requested to comply with the above and inform the 
sender immediately of any error in transmission
P Before printing this email, please consider if it´s really necessary

Reply via email to