Building UCM-iMX8M-Mini Yocto Linux images r1.2

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 UCM-iMX8M-Mini System-on-Module.

Learn more about Yocto

Yocto Environment Setup

Yocto host requirements are listed on the Yocto official site

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 git://source.codeaurora.org/external/imx/imx-manifest.git -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
repo sync

Next step is getting the Compulab BSP meta-layer.

git clone -b devel-imx8mm-4.14.98 https://github.com/compulab-yokneam/meta-compulab-bsp.git sources/meta-compulab-bsp
git clone -b devel https://github.com/compulab-yokneam/meta-compulab.git sources/meta-compulab

The Compulab meta-layer consists of meta-compulab directory, that provides support for UCM-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 UCM-iMX8M-Mini images.

Create Build Environment

  • Issue Compulab Setup Script:
source sources/meta-compulab-bsp/meta-bsp-imx8mm/tools/setup-imx8mm-env -b build-xwayland

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