Building MCM-iMX8M-Mini Yocto Linux images

From Compulab Mediawiki
Jump to: navigation, search

Overview

The Yocto Project is an open-source collaboration focused on embedded Linux development.
The purpose of this article is to show how to get Yocto Image with support for the MCM-iMX8M-Mini System-on-Module.

Learn more about Yocto

Yocto Environment Setup

Yocto host requirements are listed on the Yocto official site Linux Distributions to be used on a host are listed ibid

In order to get NXP Yocto BSP building environment please issue the following commands. More detailed instructions can be found at the NXP readme file

repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml
wget --directory-prefix .repo/manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mm/rel_imx_5.10.35_2.0.0-stable/scripts/imx-5.10.35_2.0.0_compulab.xml
repo init -m imx-5.10.35_2.0.0_compulab.xml
repo sync

The Compulab meta-layer consists of meta-compulab directory, that provides support for MCM-iMX8M-Mini and other Compulab i.MX based machines and contains recipes for U-boot and Linux kernel.

Image Building

This section provides information about building MCM-iMX8M-Mini images.

Create Build Environment

  • Issue Compulab Setup Script:
export MACHINE=mcm-imx8m-mini
MACHINE=mcm-imx8m-mini DISTRO=fsl-imx-xwayland  source ./compulab-setup-env -b build-xwayland

You will be asked regarding options of the image you are configuring.

Building the Images

The Yocto Project build uses the bitbake command.

  • To build a Compulab image with GUI use the command below:
bitbake -k compulab-ucm-imx8m-mini
  • To build a minimal Linux image use the command below:
bitbake -k core-image-full-cmdline
  • To re-build only the Linux kernel use the command below:
source setup-environment build-xwayland
bitbake -c cleansstate linux-imx
bitbake -k linux-imx
  • To re-build only the u-boot bootloader and boot image use the command below:
source setup-environment build-xwayland
bitbake -c cleansstate imx-boot u-boot-imx
bitbake -k imx-boot u-boot-imx

Installation

The resulting images are located in the build directory: build-xwayland/tmp/deploy/images/${MACHINE}

mcm-imx8m-mini.wic.bz2 complete SD card image
mcm-imx8m-mini.tar.bz2 root FS tree
imx-boot-mcm-imx8m-mini-sd.bin-flash_evk boot loader binary
Image kernel binary
modules-mcm-imx8m-mini.tgz kernel modules tree
mcm-imx8m-mini.dtb device tree binary


To deploy the built image follow the SD card installation instructions

Building previous versions of UCM-iMX8M-Mini Yocto