How to upload custom os to emmc?

Hi,

I have custom os from yocto build. I want to know how to upload the os to emmc in toradex board.
I have verdin dev board with imx8mmini.

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?

:+1: :-1:


Hello,

To upload a custom OS built with Yocto to the eMMC on a Toradex Verdin iMX8M Mini development board, you can follow these general steps. The process involves preparing the image, booting the board into a suitable mode for flashing, and then using a method to transfer and write the image to the eMMC.

  1. Prepare Your Custom OS Image: Ensure your Yocto build has completed successfully and you have the image files ready. Typically, this would be an image file with an extension like .wic, .img, or similar.

  2. Boot the Board into U-Boot: Power on your Verdin development board and stop the boot process to enter the U-Boot command prompt. This is usually done by pressing a key during boot.

  3. Set Up a Network Connection (if using TFTP or NFS): If you plan to transfer the image via a network (using TFTP, NFS, etc.), configure the network settings in U-Boot. This involves setting up IP addresses for your board and server. For example:

    setenv ipaddr 192.168.1.2
    setenv serverip 192.168.1.1
    saveenv
    

    Skip this step if you’re using an SD card or USB drive for the transfer.

  4. Transfer the Image to the Board: Depending on your setup, you might use one of several methods to transfer the image:

    • TFTP: tftpboot ${loadaddr} your_image_name.img
    • USB: Copy the image to a USB drive, connect it to the board, and use something like usb start; fatload usb 0:1 ${loadaddr} your_image_name.img
    • SD Card: Insert an SD card with the image, and use fatload mmc 1:1 ${loadaddr} your_image_name.img assuming the SD card is recognized as mmc 1.
  5. Write the Image to eMMC: Once the image is loaded into memory, you can write it to the eMMC. The command will depend on the image format and target storage. For a typical Yocto image, you might use the mmc write command. For example:

    mmc dev 0
    mmc write ${loadaddr} 0x0 ${filesize}
    

    This command assumes the eMMC is device 0 (mmc dev 0)

Please, also check if these links can help you solve your problem:

How to Load Compiled Binaries into Cortex-M | Toradex Developer Center.

Hi @vivek338,

Please refer to Toradex easy installer documentation for steps to flash new OS to module.

Toradex Easy Installer Overview | Toradex Developer Center

Best regards
Ritesh Kumar

Hi,

I follow the link you share and copy .wic image file to pendrive but toradex easy installer does not recognizing the pendrive.

Hi,

Also I have .tar.xz file build by yocto.How to extract or upload to pendrive?

Hi @vivek338 ,

The link is valid incase you want to boot from SD card/USB stick. Please note that there is a difference between flashing from SD card and booting from SD card.

There must be a file something like this “-image-Tezi_.tar”. You can simple extract and copy to pendrive.
After loading Toradex easy installer to modeule, this image should appear in the list of images visible in the GUI.
Also, extracting a tar file is simple which should be figured out at your end.