02. How to install Yocto Image into SD Card - ADLINK/meta-adlink-nxp GitHub Wiki

Getting Started

This procedure describes how to merge u-boot, Linux kernel and filesystem images to SD Card on LEC-IMX95,OSM-IMX93, LEC-iMX8M Plus, LEC-iMX8M, LEC-iMX6R2, LEC-iMX6 modules with I-PI SMARC Plus, LEC BASE 2.0, LEC BASE R1 carrier board.

Note: All of files will be erased on SD Card. The size of SD Card should be at least 8 Gb.


LEC-IMX95/OSM-IMX93 supported:

  1. Enter the command on your host machine.

    1.1 Below command to flash the image (u-boot + kernel + rootfs) to SD Card

    $ sudo dd if=<image_name>.wic of=/dev/sdX bs=64M
    $ sync

    Note

    • Flash the pre-built image for memory 2G/4G modules.
    • Here “sdX” refers to SD card storage medium detected in host machine
  2. Insert SD Card into your host machine and insert it and power on your target device to boot from SD card. Make sure boot switch setting is set for carrier SD card


LEC-iMX8M supported:

  1. Enter the command on your host machine.

    NOTE: u-boot are now build with the image, step 1.1 described below is no longer required

    1.1 Below command to add u-boot to image you built from GitHub

    $ sudo dd conv=notrunc if=<Path to u-boot binary> of=<Path to BSP image>/core-image-weston-lec-imx8m.sdcard bs=1k seek=33
    $ sync

    Note:

    1.2 Below command to flash the image (u-boot + kernel + rootfs) to SD Card

    $ sudo dd if=<Path to BSP image>/<image_name>.wic of=/dev/sdX bs=64M
    $ sync

    Note

    • Flash the pre-built image for memory 1G/2G/4G modules.
    • Here “sdX” refers to SD card storage medium detected in host machine
  2. Insert SD Card into your host machine and insert it and power on your target device to boot from SD card. Make sure boot switch setting is set for carrier SD card


LEC-iMX6R2 supported:

  1. Enter the command on your host machine.

    1.1 Below command to add u-boot to image you built from GitHub

    $ sudo dd conv=notrunc if=<Path to u-boot binary> of=core-image-westonimx6r2-lec-imx6-2.sdcard bs=512 seek=2
    $ sync

    Note:

    • Here is the pre-built u-boot binary for 1G/2G/4G modules

      • LEC-iMX6R2 4G Memory with Quad/Dual SoC: click here
      • LEC-iMX6R2 2G Memory with Quad/Dual SoC: click here
      • LEC-iMX6R2 1G Memory with Quad/Dual SoC: click here
      • LEC-iMX6R2 2G Memory with Solo/Dual Lite SoC: click here
      • LEC-iMX6R2 1G Memory with Solo/Dual Lite SoC: click here
      • LEC-iMX6R2 512 MB Memory with Dual Lite SoC: click here
    • core-image-westonimx6r2-lec-imx6-2.sdcard will be generated after you follow up this Yocto building instruction(without u-boot inside)

    1.2 Below command to flash the image (u-boot + kernel + rootfs) to SD Card

    $ sudo dd if= core-image-weston-imx6r2-lec-imx6-2.sdcard of=/dev/sdX bs=64M
    $ sync

    Note

    • Flash the pre-built image for memory 512MB/1G/2G/4G modules.
    • Here “sdX” refers to SD card storage medium detected in host machine
  2. Insert SD Card into your target and power on your target device to boot from SD card. Make sure boot switch setting is set for carrier SD card


LEC-iMX6 supported:

  1. Enter the command on your host machine.

    1.1 Below command to add u-boot to image you built from GitHub

    $ sudo dd conv=notrunc if=<Path to u-boot binary> of=core-image-weston-imx6-lec-imx6-1.sdcard bs=1k seek=1
    $ sync

    Note:

    • Here is the pre-built u-boot binary for 1G/2G modules

      • LEC-iMX6 1G Memory with Quad/Dual SoC: click here
      • LEC-iMX6 2G Memory with Quad/Dual SoC: click here
      • LEC-iMX6 1G Memory with Solo/Dual Lite SoC: click here
      • LEC-iMX6 2G Memory with Solo/Dual Lite SoC: click here
    • core-image-weston-imx6-lec-imx6-1.sdcard will be generated after you follow up this Yocto building instruction(without u-boot inside)

    1.2 Below command to flash the image(u-boot + kernel + rootfs) to SD Card

    $ sudo dd if=core-image-weston-imx6-lec-imx6-1.sdcard of=/dev/sdX bs=64M
    $ sync

    Note

    • Flash the pre-build OS image for 1G/2G modules.
    • Here “sdX” refers to SD card storage medium detected in host machine
  2. Insert SD Card into your host machine and power on your target device to boot from SD card. Make sure boot switch setting is set for carrier SD card

  3. Please boot to u-boot stage and configure the booting setting with the below command:

    U-Boot> setenv boot_sd LOAD=\'ext2load mmc 1:2\'\; BOOTARGS=\'mmcblk1p2 ro\'\; run boot
    U-Boot> saveenv
    U-Boot> reset

    image-20210322155858019


How to configure the Dip Switch or Jumper for SD Card 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
    Carrier SD Card OFF ON ON 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-20210322172618201

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

⚠️ **GitHub.com Fallback** ⚠️