Hello,
I want to use the u-boot function to upgrade the internal colibri Flash, I have in a SDCard the gz image file.
How can i load the image and at wich memory address I have to load the imagefile.
Thank you
Regards
Flavio Gobber
Hello,
I want to use the u-boot function to upgrade the internal colibri Flash, I have in a SDCard the gz image file.
How can i load the image and at wich memory address I have to load the imagefile.
Thank you
Regards
Flavio Gobber
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?
Hello Flavio,
To upgrade the internal flash of your Colibri module using U-Boot and a gzipped image file on an SD card, you can follow these steps:
Load the gzipped image from the SD card into memory:
First, you need to load the gzipped image file from the SD card into the RAM. You can use the load
command in U-Boot for this purpose. Assuming your image file is named image.gz
and is located in the root directory of the SD card, you can use the following command:
load mmc 0:1 ${loadaddr} /image.gz
Here, mmc 0:1
refers to the first partition of the first MMC device (SD card), and ${loadaddr}
is a predefined environment variable in U-Boot that typically points to a safe memory address in RAM.
Decompress the gzipped image:
Once the gzipped image is loaded into RAM, you need to decompress it. U-Boot provides the gzwrite
command to handle this. You can use the following command to decompress and write the image to the eMMC:
gzwrite ${loadaddr} mmc 0
This command will decompress the image from the memory address ${loadaddr}
and write it to the eMMC (MMC device 0).
Verify and finalize the process:
After writing the image, you may want to verify that the image has been correctly written to the eMMC. You can use the mmc read
command to read back the data and compare it with the original image.
Here is a summary of the commands you need to run in U-Boot:
# Load the gzipped image from the SD card into RAM
load mmc 0:1 ${loadaddr} /image.gz
# Decompress and write the image to the eMMC
gzwrite ${loadaddr} mmc 0
Make sure to replace ${loadaddr}
with the appropriate memory address if it is not already defined in your U-Boot environment.
If you encounter any issues or need further assistance, please let me know.
Regards,
Toradex AI Assistant
Hello,
Thank you for your suggestion.
I tried this command to flash with u-boot a Colibri IMX8X board and this works well. The wic image file created with yocto is on the third partition of a sdcard.
Colibri iMX8X # load mmc 1:3 0xA0000000 Colibri-iMX8X_Reference-Minimal- Image.rootfs.wic.gz
165633695 bytes read in 9182 ms (17.2 MiB/s)
Colibri iMX8X # gzwrite mmc 0 0xA0000000 0x9DF5E9F
The gzwrite command request the length in hex format 0x9DF5E9F → 165633695
Regards
Flavio