Jump to content

Yocto Environment Setup for NXP i.MX95 Verdin

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page




To set up a Yocto build environment for NXP i.MX95 on a Toradex Verdin module, prepare a Linux host, select a Toradex BSP release, initialize the Toradex manifest with repo, synchronize its repositories, and source the export script. These steps are for Verdin i.MX95; NXP EVK and FRDM boards use NXP’s separate Yocto manifest and setup procedure.

Scope and prerequisites

This page prepares the Toradex Yocto/OpenEmbedded workspace for Verdin i.MX95. The Toradex manifest selects the OpenEmbedded, Toradex BSP, NXP, and dependency repositories that match the chosen Toradex BSP release. The manifest and release determine the compatible layer revisions.

Before starting, choose the Toradex BSP release you intend to build and check its supported host configuration in the Toradex BSP Reference Documentation and Embedded Linux Release Matrix. RidgeRun's documented setup uses Ubuntu 22.04.

Known-good build record

RidgeRun tested the yocto build for the tdx-reference-minimal-image and tdx-reference-multimedia-image images with a Ubuntu 22.04 machine with 8 GB of RAM, and using these environment setup steps, both images booted on the Verdin i.MX95. The documented source setup selects Toradex BSP 7.6.0 with the tdxref/default.xml manifest. See the image build procedure and the board flashing and boot instructions for the image and deployment steps.

If you are setting up an NXP i.MX95 EVK or FRDM board, use the NXP i.MX Yocto Project User's Guide instead of the Toradex manifest steps below.

Install Yocto host dependencies

You must install essential host packages on your build host. First make sure your host PC is up to date (on a Ubuntu distribution):

sudo apt-get update

Then, install the following required packages:

sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping libsdl1.2-dev xterm libyaml-dev libssl-dev

sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev sed cvs subversion coreutils texi2html docbook-utils help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev bc rename zstd libgnutls28-dev

sudo apt-get install python3-git liblz4-tool python3-jinja2 python3-subunit locales libacl1

# For Ubuntu 20.04 and earlier
sudo apt-get install python python-pysqlite2

# For Ubuntu 22.04 and newer
sudo apt-get install python-is-python3

Install Repo and configure Git

Toradex uses the repo tool to manage the multiple Git repositories listed in its BSP manifest. Install it in ~/bin and add that directory to PATH:

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

Add the following line to the .bashrc file to ensure the ~/bin folder is in the PATH variable:

export PATH=~/bin:$PATH

Configure Git with your name and email address if you have not already done so:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Initialize the Verdin i.MX95 Yocto workspace

The following manifest initialization is the tested RidgeRun setup for Toradex BSP version 7.6.0. Check the Toradex release documentation when intentionally selecting a different release; use the setup instructions for that release consistently.

mkdir ${HOME}/oe-core
cd ${HOME}/oe-core

VERSION=7.6.0
repo init -u git://git.toradex.com/toradex-manifest.git \
-b refs/tags/${VERSION} \
-m tdxref/default.xml
repo sync

The manifest defines the repositories and revisions for the selected Toradex BSP. repo sync downloads the layers and their dependencies; it may take time and requires access to the configured repositories and source mirrors.

After synchronization, initialize the OpenEmbedded build environment:

. export

The first time you source export, it prepares the build directory and its initial configuration. Source this file again in every new terminal that you use for the build:

Continue to build a Yocto image for Verdin i.MX95.

Troubleshoot common setup problems

Common Yocto environment setup problems
Symptom Check
repo: command not found Confirm ~/bin is in PATH in the current shell. Add the export line to ~/.bashrc for new shells.
repo init cannot find the requested revision Check that the release tag exists in the Toradex release matrix and that the manifest name is tdxref/default.xml.
repo sync fails or stalls Check internet access, firewall or proxy rules for the Git repositories and source mirrors, and available disk space. After fixing the cause, run repo sync again from the workspace directory.
bitbake: command not found Change to the OpenEmbedded workspace directory and source . export in the same terminal.

Next steps

After the environment is initialized:

For help with BSP customization or embedded Linux integration, see RidgeRun's embedded Linux engineering services or contact RidgeRun.

FAQ

Does this setup guide apply to every NXP i.MX95 board?
No. It uses the Toradex manifest for the Verdin i.MX95. NXP EVK and FRDM boards require the NXP BSP manifest and machine configuration described in NXP's Yocto guide.
Which Toradex BSP version should I use?
Select a release supported for your module from the Toradex Embedded Linux Release Matrix, then use its release tag with tdxref/default.xml. Record the selected version so the build can be reproduced.
Why must I source export in every terminal?
The script configures environment variables for the current shell. Source it again whenever you open a new terminal for BitBake work.

References






Cookies help us deliver our services. By using our services, you agree to our use of cookies.