Yocto Build Setup#
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.
Yocto Releases#
Board support packages (BSPs) are currently provided for the following Yocto LTS versions. Please select the tab that meets your requirements.
Yocto Scarthgap 5.0 (recommended)
Yocto Kirkstone 4.0
Yocto 5.0 Scarthgap Board Support Package
The repository of the BSP is located at bitbucket.org/imx8mp/meta-demmelproducts/src/scarthgap. This BSP is based on nxp release imx/scarthgap-6.6.52-2.2.0 and Yocto Project Long Term Release Scarthgap (5.0).
Please consult the Release Notes.
Dependencies
URL: compulab-yokneam/meta-bsp-imx8mp
branch: ucm-imx8m-plus-r4.1
Patches
Please submit any patches against the meta-demmelproducts layer to the maintainer:
Christian Rödlach, c.roedlach@demmel.com
Requirements
It is recommended to build Yocto Scarthgap 5.0 on Ubuntu 22.04 or 24.04. Additional supported distributions are listed in the Yocto System Requirements manual. The possible system setup includes
A computer running a supported Linux distribution natively.
A supported Linux distribution running on a virtual environment, such as
WSL2 on Windows 10 or 11
A Docker container
Please install all required packages by following the Yocto System Requirements documentation.
Setting up the build environment
The layer meta-demmelproducts is based on compulab’s and NXP’s BSP found here under this branch: ucm-imx8m-plus-r4.1
Create and navigate to the project directory.
mkdir iLCD-bsp && cd iLCD-bsp
Initialize the Repo Manifests
The source files are pulled using the Repo tool. Before fetching the repositories, the Repo Manifests must be initialized.
Download the Repo tool
Create a bin directory in your home directory. Download the repo tool, make it executable and add it to $PATH.
mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
# set up git
git config --global user.name "Your Name"
git config --global user.email "Your Email"
git config --list
Download the repositories
Subsequently, download and execute the setup script, which downloads the required manifest files and synchronizes the included repositories.
# Download the setup script
curl -L https://api.bitbucket.org/2.0/repositories/imx8mp/meta-demmelproducts/src/scarthgap/tools/bsp-setup -o bsp-setup
# Execute the setup script
source bsp-setup
Set up the build environment
Source the environment setup script for the build configuration with a specified build directory.
The MACHINE variable is set within the setup script according to the Machine Table.
When building for the
DPP-LMB-8P, the script asks for the attached display panel according to the Display Options Table.Finally, the script asks for installed DRAM size according to the DRAM Configuration Table. The according variable
DRAM_CONFis set in thelocal.conffile.
source dp-setup-env <build-directory>
# e.g. source dp-setup-env build-mydevice
Build the image
You can choose either an image file containing the iLCD demo application, chromium browser, flutter, Embedded Wizard and NXP demos by building the demmelproducts-image-demo image.
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-directory>/tmp/deploy/images/<MACHINE>. This is the directory where the built images are located. The SD card image is named <IMAGE_NAME>-<MACHINE>.rootfs.wic.zst (e.g. demmelproducts-image-demo-dpp-lmb-8p.rootfs.wic.zst).
Then follow the instructions in writing images to an SD card.
Re-Initialize the Build Environment
Each time a new terminal is opened, the build environment must be reinitialized by calling the BSP directory. Subsequently, open-embedded commands such as bitbake can be executed.
cd iLCD-bsp
source dp-setup-env <build-directory>
# e.g. source dp-setup-env build-mydevice
Update the BSP
To fetch the latest BSP changes, navigate to the BSP directory, download and execute the setup script. The build-directory and configuration files are not touched.
# Download the setup script
curl -L https://api.bitbucket.org/2.0/repositories/imx8mp/meta-demmelproducts/src/scarthgap/tools/bsp-setup -o bsp-setup
# Execute the setup script
source bsp-setup
Download a specific version
Starting from version 1.0.1, the source code of the corresponding version listed in the Release Notes can be downloaded and set up using the respective <git tag>, such as v1.0.1. For version 1.0.0, please follow the instructions in the repository.
# Download the setup script
export GIT_TAG="<git tag>"
# e.g. export GIT_TAG="v1.0.1"
curl -L https://api.bitbucket.org/2.0/repositories/imx8mp/meta-demmelproducts/src/${GIT_TAG}/tools/bsp-setup -o bsp-setup
# Execute the setup script
source bsp-setup
Machine Table
The Machine Table shows the required value for the MACHINE variable to build the yocto images depending on the specific device. The setup script asks for the device and weakly sets the MACHINE variable in the local.conf file.
Panel Name |
MACHINE (in local.conf) |
|---|---|
DPP-LMB-8P |
dpp-lmb-8p |
DPP-LHC70-8P |
dpp-lhc70-8p |
DPP-LHC101-8P |
dpp-lhc101-8p |
DPP-LHC121-8P |
dpp-lhc121-8p |
Display panel options Table for DPP-LMB-8P
To set up the correct dispay settings for the bootloader and splash screens, the variable DPP_LMB_8P_XBOARD must be set in local.conf. This is done automatically by issuing the setup script.
Display Panel |
DPP_LMB_8P_XBOARD (in local.conf) |
|---|---|
DPP-XHC50 |
dpp-xhc50 |
DPP-XHC70 |
dpp-xhc70 |
DPP-XHC80 |
dpp-xhc80 |
DPP-XHC101 |
dpp-xhc101 |
DPP-XHC121 |
dpp-xhc121 |
HDMI Panel |
hdmi |
DRAM Configuration Table
To set up your product’s correct DRAM size for U-Boot SPL, the variable DRAM_CONF must be set in local.conf. This is done automatically by issuing the setup script.
DRAM Size |
DRAM_CONF (in local.conf) |
|---|---|
1 GB |
d1d8 |
2 GB |
d2 |
4 GB |
d4 |
8 GB |
d1d8 |
Board Support Package
The repository of the BSP is located in bitbucket.org/imx8mp/meta-demmelproducts/src/kirkstone. This BSP is based on Kernel version 5.15.71 and Yocto Project Long Term Release Kirkstone (4.0).
Please consult the Release Notes.
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.
Machine 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, see table
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=<MACHINE> # e.g. export MACHINE=dpp-lmb-8p, see table
source compulab-setup-env -b build-${MACHINE}
Add the meta-demmelproducts layer to your build configuration by adding the following line to build-${MACHINE}/conf/bblayers.conf:
BBLAYERS += "${BSPDIR}/sources/meta-demmelproducts"
Set the DRAM configuration parameter by adding the following line to build-${MACHINE}/conf/local.conf:
DRAM_CONF = "d2d4"
Display Option for DPP-LMB-8P
To set up the correct dispay settings for the bootloader and splash screens, the optional DPP_LMB_8P_XBOARD variable should be set to build-${MACHINE}/conf/local.conf corresponding to the following table. e.g. DPP_LMB_8P_XBOARD = "dpp-xhc101"
Display Panel |
|
|---|---|
DPP-XHC50 |
dpp-xhc50 |
DPP-XHC70 |
dpp-xhc70 |
DPP-XHC80 |
dpp-xhc80 |
DPP-XHC101 |
dpp-xhc101 |
DPP-XHC121 |
dpp-xhc121 |
HDMI Panel |
hdmi |
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