Installing Yocto
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.
Environment Setup
- 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
- 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
- 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.
IMX6 | IMX8 | IMX95 |
---|---|---|
evk
|
evk |
|
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.
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