Setting up a Yocto build environment#

The Yocto Project is an open-source collaboration project that provides templates, tools, and methods to help you create custom Linux-based systems for embedded products. If it is your first image build using the Yocto Project please refer to The Yocto Project for instructions on how to get started. This guide will assume you have the essential host packages installed.

Board Support Package

The repository of the BSP is located in here. This BSP is based on Kernel version 5.15.71 and Yocto Project Long Term Release Kirkstone (4.0)

Dependencies

URL: compulab-yokneam/meta-bsp-imx8mp

branch: kirkstone-2.2.0

Patches

Please submit any patches against the meta-demmelproducts layer to the maintainer:

Christian Rödlach, c.roedlach@demmel.com

Add the meta-demmelproducts layer#

The layer meta-demmelproducts is based on copmpulab’s and NXP’s BSP found here under this branch: kirkstone-2.2.0.

Create and navigate to the build directory and set the target machine from the following table.

Panel Name

MACHINE

DPP-LMB-8P

dpp-lmb-8p

DPP-LHC70-8P

dpp-lhc70-8p

DPP-LHC101-8P

dpp-lhc101-8p

DPP-LHC121-8P

dpp-lhc121-8p

mkdir iLCD-bsp && cd iLCD-bsp
export MACHINE=<MACHINE>  # e.g. export MACHINE=dpp-lmb-8p

Initialize repo manifests#

Initialize the repo with the specified manifest, then create a local manifests directory and download the custom manifest. Finally synchronize the repo.

repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-linux-kirkstone -m imx-5.15.71-2.2.0.xml

mkdir -p .repo/local_manifests
wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mp/kirkstone-2.2.0/scripts/meta-bsp-imx8mp.xml

repo sync

If you have any trouble with the repo please visit the appendix

Clone meta-demmelproducts in sources/ directory#

Navigate to the sources directory and clone the meta-demmelproducts repository. Then switch to the kirkstone branch.

cd sources
git clone -b kirkstone https://demmelproducts@bitbucket.org/imx8mp/meta-demmelproducts.git
cd meta-demmelproducts
cd ..

Setup build environment#

Set the target machine again according to the machine table. Then source the environment setup script for the build configuration.

export MACHINE=ucm-imx8m-plus
source compulab-setup-env -b build-${MACHINE}

Add the meta-demmelproducts layer to your build configuration by adding the following line to build-ucm-imx8m-plus/conf/bblayers.conf:

BBLAYERS += "${BSPDIR}/sources/meta-demmelproducts"

Set the DRAM configuration parameter by adding the following line to build-ucm-imx8m-plus/conf/local.conf:

DRAM_CONF = "d2d4"

Build the image#

You can choose either an image file containing the iLCD demo application, chromium browser, candera and NXP demos by building the demmelproducts-image-demo image.

The pre-built image files can be found here. Select the required image from the following tabs.

The demo image is a pre-configured and feature-rich image that is intended to showcase the capabilities of our hardware. It is designed to provide a comprehensive demonstration of the system’s functionality, applications, and use cases to our customers.

bitbake -k demmelproducts-image-demo

The debug image build is specifically configured and optimized for debugging purposes. It includes additional tools, libraries, and configurations aimed at facilitating the debugging process for software developers.

bitbake -k demmelproducts-image-demo-dbg

The core image is a minimal version of the operating system that includes only essential components necessary for basic functionality. It is designed to be lightweight, efficient, and optimized for use cases where resource constraints or minimalism are prioritized.

bitbake -k demmelproducts-image-core

Deployment - create a bootable sd card#

Navigate to build-ucm-imx8m-plus/tmp/deploy/images/${MACHINE}. This is the directory where the built images are located.

Then follow the instructions in writing images to an SD card.

Troubles with repo#

In case of any troubles with the repo try the following fixes:

Create a bin directory in your home directory.

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x ~/bin/repo

Download the repo tool and make it executable.

python3 ~/bin/repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-linux-kirkstone -m imx-5.15.71-2.2.0.xml

Re-initialize and sync the repo using python3.

wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mp/kirkstone-2.2.0/scripts/meta-bsp-imx8mp.xml

python3 ~/bin/repo sync