Booting i.MX6Q custom board from eMMC instead of USB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Booting i.MX6Q custom board from eMMC instead of USB

152 次查看
Rajagopal_VS
Contributor I

Dear NXP Community,

I have set up a Yocto build system and successfully generated the Yocto images (bootloader, rootfs, etc.) for our custom carrier board based on the i.MX6Q SoC.

Currently, the board is booting from a USB drive (partitioned with boot and rootfs). The boot partition contains the following files:
boot.scr
imx6q-apalis-eval.dtb
overlays/
overlays.txt
zImage

Now, I would like to completely avoid using the USB drive and instead boot the system directly from the internal flash or eMMC.

Could you please guide me with the required steps or commands to achieve this?

Thanks in advance for your support.

Best regards,

Raj

0 项奖励
回复
1 回复

90 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes you can boot from eMMC, you must first prepare the eMMC by flashing an operating system image to it, typically using the dd command in Linux . After flashing, the processor's hardware must be configured to select the eMMC as the boot source, often through low-level boot registers or by setting a hardware boot mode. Accessing the  uboot promp is a common method to both prepare the eMMC from a secondary source and to configure the eMMC boot environment before the kernel loads. 

Steps to Boot from eMMC on i.MX6
  1. Get the i.MX6 Serial Console and U-Boot:
     
    Connect the board to your computer via its serial console port. 
    Use a terminal program (like minicom or TeraTerm) to connect at 115200 baud. 
    Power on the board and quickly press a key to interrupt the auto-boot process and get to the U-Boot prompt. 
    Prepare the eMMC:
     
    Option 1: Using U-Boot with a Secondary Boot Source: If the eMMC is blank or corrupt, load a bootable image onto the eMMC from another source, such as an SD card or via TFTP. 
     
    Use U-Boot commands like fatload to read the image and mmc write to write it to the eMMC. 
     
    Option 2: Using dd (from a running Linux system):
    • Boot your i.MX6 board from an SD card or other media. 
      Use the dd command to write the desired operating system image file directly to the eMMC device (e.g., /dev/mmcblk0). 
       
       
      Configure eMMC Boot Settings:
       
      Method A: Via U-Boot Environment:
      • In U-Boot, you can sometimes change the boot environment variables to tell U-Boot to look for the kernel and root filesystem on the eMMC. 
         
        Method B: Using sysfs (within Linux):
        • After the board boots from another source, you can set low-level eMMC boot configurations through the sysfs interface. 
          Navigate to the appropriate eMMC device path, such as /sys/devices/platform/sdhci-esdhc-imx.2/mmc_host/mmc0/mmc0:0001, and modify the boot_partition or other relevant settings in boot_info. 
           
          Restart and Boot from eMMC:
          • Once the eMMC is flashed and the boot configuration is set, restart the board. 
             
            The i.MX6 should now boot the kernel and operating system directly from the eMMC storage device

           

           

          Regards

 

  •  
  •  
  •  

 

0 项奖励
回复