UCM-iMX8M-Plus: Yocto Linux: Manual Installation: SD card

From Compulab Mediawiki
Jump to: navigation, search

Introduction

This article provides instructions needed to install the Yocto Linux SD-card image on SD card using a Linux Host workstation. The image provides full boot system including U-Boot, Linux kernel, device driver modules and example root filesystem.

Preparation steps

  • Obtain a Linux PC workstation.
  • Obtain a USB Card reader and an micro-SD Card. Any commercially available micro-SD card of 4GB (or larger) may be used for the installation.
  • Download the UCM-iMX8M-Plus Yocto Linux package from CompuLab website.
  • Unzip the package to a directory on the host workstation. From now we assume the device name is pakage_dir.
  • The Yocto Linux SD-card image file, mentioned below, can be found in the images subdirectory.
  • Plug the USB SD Card reader into the host PC. Insert the micro-SD Card into the USB Card reader. From now we assume the device name of the MMC/SD card on your Linux PC is /dev/sdX.

Installation

  • Make sure that the SD capacity is enough to fit the rootfs image.
Admolition note.png The recommended SD card capacity is greater than or equal to 8GB.
  • Define the MACHINE and the DRAM_CONF environment variables:
  • SOM Configuration
SOM type Command
ucm-imx8m-plus export MACHINE=ucm-imx8m-plus
ucm-imx8m-plus-sbev export MACHINE=ucm-imx8m-plus-sbev
mcm-imx8m-plus export MACHINE=mcm-imx8m-plus
som-imx8m-plus export MACHINE=som-imx8m-plus
  • Memory Configuration
SOM D option Command
D1,D8 export DRAM_CONF=d1d8
D2 export DRAM_CONF=d2
D4 export DRAM_CONF=d4
  • Prepare the boot media:
Admolition note.png 1) Replace sdX with the actual block device name on your Linux host.
2) The command order is important: 1-image, 2-bootloader
  • Flash the WIC image:
zstdcat pakage_dir/images/imx-image-full-${MACHINE}.rootfs.wic.zst | sudo dd of=/dev/sdX bs=1M status=progress
  • Update the bootloader:
sudo dd if=pakage_dir/bootloader/${MACHINE}/imx-boot_${MACHINE}_${DRAM_CONF} of=/dev/sdX bs=1K seek=32

Run Yocto Linux image

  • Insert the micro-SD card into SD socket P4
  • Connect a standard USB cable (included in the kit) between your host PC and the evaluation kit micro-USB2.0 connector P3
    Use a terminal emulator as described here
  • Press and hold the ALT_BOOT button (SW2) and then reset / power-on the system to force boot from SD card. Release ALT_BOOT button after 2-3 seconds
  • The system boots into Linux