Installing Yocto

From RidgeRun Developer Wiki






NXP Platforms

RidgeRun provides Yocto Support to different NXP Platforms. It is important to mention there are several vendors with different devkits for the SoC. On the following guide we present the usual steps required to install Yocto on the NXP development boards.


Note
For more detailed information you can check i.MX Yocto Project User's Guide


Environment Setup

  1. Install Linux dependencies on the host device
    sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1
  2. Install repo, configure the PATH and give permissions
    mkdir -p ~/bin
    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    PATH=$PATH:~/bin 
    chmod a+x ~/bin/repo
  3. Get the source code
    mkdir imx-yocto-bsp
    cd imx-yocto-bsp
    
    repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.23-2.0.0.xml
    
    repo sync

Select your Machine

By using the script imx-set-up-release.sh with the following structure

DISTRO=<distro name> MACHINE=<machine name> source imx-setup-release.sh -b <build dir>

You can select the <MACHINE> which depends on the embedded device to be configured. Here you can find a summary table with the NXP machines available for IMX6, IMX8 and IMX95.

MACHINES
IMX6 IMX8 IMX95
  • imx6qpsabresd
  • imx6ulevk
  • imx6ulz-14x14-

evk

  • imx6ull14x14evk
  • imx6ull9x9evk
  • imx6dlsabresd
  • imx6qsabresd
  • imx6solosabresd
  • imx6sxsabresd
  • imx6sllevk
  • imx8qmmek
  • imx8qxpc0mek
  • imx8mqevk
  • imx8mm-lpddr4-evk
  • imx8mm-ddr4-evk
  • imx8mn-lpddr4-evk
  • imx8mn-ddr4-evk
  • imx8mp-lpddr4-evk
  • imx8mp-ddr4-evk
  • imx8dxla1-lpddr4-evk
  • imx8dxlb0-lpddr4-evk
  • imx8dxlb0-ddr3l-evk
  • imx8mnddr3levk
  • imx8ulp-lpddr4-evk
  • imx8ulp-9x9-lpddr4-

evk

  • imx95-19x19-verdin
  • imx95-15x15-lpddr4x-evk
  • imx95-19x19-lpddr5-evk
  • imx95evk

Also, you will need to choose a <DISTRO> which will configure the environment. The available distros are listed below.

  • fsl-imx-wayland: Pure Wayland graphics.
  • fsl-imx-xwayland: Wayland graphics and X11. X11 applications using EGL are not supported.
  • fsl-imx-fb: Frame Buffer graphics - no X11 or Wayland. Frame Buffer is not supported on i.MX 8 and i.MX9.

Finally, the <build dir> parameter just specifies the name of the build directory to be created.

Compile with BitBake

To compile the image using the BitBake tool use the following structure.

IMAGE=<IMAGE>
OPTION=<OPTIONS>
bitbake $IMAGE $OPTION

The available options for <IMAGE> are listed and summarized in the next table.

IMAGES
NAME DESCRIPTION
core-image-minimal Small image that only allows a device to boot.
core-image-sato Sato image for mobile devices.
imx-image-core An i.MX image with i.MX test applications to be used for Wayland backends.
fsl-image-machinetest An FSL Community i.MX core image with console environment - no GUI interface.
imx-image-multimedia Builds an i.MX image with a GUI without any Qt content.
imx-image-full Full image with open-source Qt and ML features.

The <OPTIONS> parameters are listed below.

Option Description
-c <task> Execute specific task for the image or recipe. Some examples: fetch, compile, clean, cleansstate, package.
-f Force execution.
-v Verbose mode.
-DDD Enable debug information.
-s Show recipe version.
-g <recipe> Show dependency tree for the recipe.
-c listtasks <image_or_recipe> Show the tasks associated with a recipe or image.
-k Keep running if an error appears.
--help Detailed help information.

With these last steps the image is built.

Flashing the Image

Complete file system images are deployed to <build directory>/tmp/deploy/images. Using an SD card flash the image generated with the following command:

zstdcat <image_name>.wic.zst | sudo dd of=/dev/sd<partition> bs=1M conv=fsync



Note
If you want to learn more topics about NXP platforms check the following links IMX8 and IMX95