In u-boot how load yocto image from nfs share into memory

Hello,

I want to load the yocto wic image into memory in order to flash the internal emmc shared on a nfs folder. Is it possibile or I neeed to load it with tftp ?.

Thank you

Regards

Flavio Gobber

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Flavio,

To load a Yocto WIC image into memory from an NFS share in U-Boot, you can follow these general steps. However, please note that U-Boot typically supports loading files over TFTP more directly than NFS. If you still prefer to use NFS, you might need to mount the NFS share first and then load the image. Here’s a general approach:

  1. Set up the NFS server: Ensure your NFS server is properly configured and the WIC image is accessible from the NFS share.

  2. Configure U-Boot for NFS:

    • Set the environment variables for the NFS server and the path to the WIC image.
    • Example:
      setenv serverip <NFS_SERVER_IP>
      setenv rootpath /path/to/nfs/share
      setenv imagefile <wic_image_name>.wic
      
  3. Mount the NFS share:

    • U-Boot does not natively support mounting NFS shares directly. You might need to use a Linux kernel with NFS support to mount the NFS share and then load the image. Alternatively, you can use TFTP to load the image directly into memory.
  4. Load the image using TFTP (recommended):

    • If you decide to use TFTP, you can load the image directly into memory using the following commands:
      tftpboot ${loadaddr} ${imagefile}
      
  5. Flash the eMMC:

    • Once the image is loaded into memory, you can proceed to flash it to the internal eMMC. For example:
      mmc dev 0
      mmc write ${loadaddr} <start_block> <num_blocks>
      

Here’s a more detailed example assuming you use TFTP:

  1. Set up TFTP server: Ensure your TFTP server is running and the WIC image is placed in the TFTP root directory.

  2. Configure U-Boot for TFTP:

    setenv serverip <TFTP_SERVER_IP>
    setenv imagefile <wic_image_name>.wic
    setenv loadaddr 0x12000000  # Example load address
    
  3. Load the image using TFTP:

    tftpboot ${loadaddr} ${imagefile}
    
  4. Flash the eMMC:

    mmc dev 0
    mmc write ${loadaddr} <start_block> <num_blocks>
    

If you need more specific instructions or run into issues, please provide additional details about your setup and the exact steps you are following.

Best regards,

[Your Name]

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

Colibri iMX7 - Disable Display and use pins differently.

Hi, @flavio!

Just to confirm if I understood right, do you want to install an image that is in a NFS folder?

If yes, you could use the image compatible with Toradex Easy Installer that Yocto saves in the output folder and the TorizonCore Builder images serve command. Please refer to this topic where I explain how to use it.

In order to use this command, you will need to use Toradex Easy Installer too to be able to select your custom image in the installer.

Please, feel free to ask for help if you have any trouble or doubt.

Best regards.
Lucas Azeituno