Skip to content

03. How to install Yocto Image into eMMC

AdlinkCCoE edited this page Oct 23, 2024 · 15 revisions

Getting Started

  • Step 1: Copy the Yocto image to SD Card and boot it from SD Card on your target device

    ​ Please follow up the step i.MX6 /i.MX6R2 to copy image to SD Card.

  • Step 2: After boot into OS, format the built-in eMMC storage

    1. Enter the command to identify the location of eMMC

      $ sudo fdisk -l
      

      Note:

      in our case, /dev/mmcblk0 is eMMC device and /dev/mmcblk1 is SD Card device.

    2. Enter the command to delete the existing partitions

      sudo fdisk /dev/mmcblk0
      

      p to list all partitions, then d and a number to delete all existing partitions, then w to write the changes.

    3. Create a new partition with the below command

      $ sudo fdisk /dev/mmcblk0 
      

      n to create new partition, then use all the defaults, then w to write the changes.

    4. Format the partition you created

      sudo mkfs.ext4 -L "emmc" /dev/mmcblk0p1
      
  • Step 3: Copy the image from SD Card to the built-in eMMC and enter the command to start to copy

    $ sudo dd if=/dev/mmcblk1 of=/dev/mmcblk0 bs=1M count=3000
    $ sync
    

    Note:

    • /dev/mmcblk1: the SD Card device
    • /dev/mmcblk0 : the built-in eMMC device
    • bs=1M & count=3000 : the image size is about 3 GB (3000 x 1 MB). the size will be changed based on your image size.
  • Step 4: Power off your target device and configure the dip switch or Jumper to eMMC booting.

    It supports several boot devices on LEC-BASE 2.0 and LEC BASE R1 carrier board .

    • For LEC-BASE 2.0 carrier board: selection of a specific boot device is defined by the switches (SW39), as follows:

      boot device SW1 SW2 SW3 SW4
      eMMC ON OFF OFF OFF
    • For LEC BASE R1 carrier board: selection of a specific boot device is defined by the Jumpers (JP16, JP17, JP18, JP19 ), as follows:

      image-20210311180053059

Step 5: then, power on your target device and the booting message will be present from the UART console or HDMI display

Note:

For "LEC-iMX6" module, please boot to u-boot stage and configure the booting setting with the below command:

U-Boot> setenv boot_emmc LOAD=\'ext2load mmc 0:2\'\; BOOTARGS=\'mmcblk0p2 ro\'\; run boot
U-Boot> setenv bootcmd 'run boot_emmc'
U-Boot> saveenv
U-Boot> reset

image-20210323111540250