Yocto Support for NVIDIA® Jetson™ with JetPack 6 Integration - Setting Up Yocto
Yocto Support for NVIDIA®Jetson™ with JetPack 6 Integration |
---|
![]() |
Setting up Yocto |
Flashing Jetson Platform |
Accessing the Board |
Adding NVIDIA Packages |
DeepStream |
Additional Topics |
FAQ |
Contact Us |
Purpose of this tutorial
![]() | Verify this tutorial meets your requirements. |
The goal of this wiki guide is to provide the instructions to configure, build, and install Yocto in NVIDIA platforms based in previous experience of the RidgeRun engineers. We hope this provides some light to new people using Yocto in Jetson. The tutorial uses the meta-tegra layer for Yocto.
These instructions provide a more manual and raw Yocto approach that can be very useful and configurable. However, if you just want an automatic full setup experience without much control; the project and instructions over at Tegra Demo Distro do just that by abstracting the configuration into scripts and are a good starting point.
If you run into any issues, please check the Yocto community tutorial as well.
Select your Machine
You can apply the instructions in this wiki for multiple devices, so, whenever you see <MACHINE>, replace it (with the <> symbols included) with your target platform. Below you will find the possible <MACHINE> substitutions.
Device | <MACHINE> | ||||||
---|---|---|---|---|---|---|---|
ORIN NANO/NX | jetson-orin-nano-devkit-nvme | jetson-orin-nano-devkit* | p3509-a02-p3767-0000* | p3737-0000-p3701-0004* | p3737-0000-p3701-0005* | p3768-0000-p3767-0001* | p3768-0000-p3767-0004* |
ORIN AGX | jetson-agx-orin-devkit * | jetson-agx-orin-devkit-industrial* | |||||
Note: the machines with * have NOT been tested by RidgeRun yet |
Install Yocto Dependencies
1. Use the following command to install Yocto dependencies on Ubuntu.
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm zstd
2. Create a working directory for Yocto
YOCTO_DIR=/home/$USER/yocto-tegra mkdir $YOCTO_DIR
3. Select the latest stable branch (as of June 2023)
export BRANCH="scarthgap"
![]() | NOTE: This works for platforms supported in L4T R36.3.0, for platforms supported in L4T R35.5.0 use branch scarthgap-l4t-r35.x from meta-tegra. |
4. Download Yocto's Poky base meta-layer
cd $YOCTO_DIR git clone -b ${BRANCH} git://git.yoctoproject.org/poky.git poky
5. Download meta-tegra (contains L4T 36.3.0 as of June 2024)
git clone -b ${BRANCH} https://github.com/OE4T/meta-tegra.git
Compile Yocto image
1. Initialize the build environment
cd $YOCTO_DIR source poky/oe-init-build-env build
2. Setup the required settings
local.conf
- Open the file $YOCTO_DIR/build/conf/local.conf with your favorite text editor and append the following lines to the end of the file.
- Setup the SSTATE and DOWNLOADS directories with a custom path to avoid re-downloading and re-compiling in the future.
- Add the name of your target platform <MACHINE>.
- Set IMAGE_CLASSES and IMAGE_FSTYPES to easily flash the target board.
![]() | Note: Replace <MACHINE> with your selected machine (don't delete the quotes ""). |
MACHINE ?= "<MACHINE>" DISTRO_FEATURES = "x11 opengl " IMAGE_CLASSES += "image_types_tegra" IMAGE_FSTYPES = "tegraflash" SSTATE_DIR ?= "/home/${USER}/Yocto/sstate_dir" DL_DIR ?= "/home/${USER}/Yocto/downloads"
Optional: By default, Yocto uses all the available cores and threads of the computer. If you want to limit the resources used on the build, you can add the following lines to your $YOCTO_DIR/build/conf/local.conf file. Change the parameters according to your needs and to your host machine specification.
BB_NUMBER_THREADS = '6' PARALLEL_MAKE = '-j6'
bblayers.conf
Open the file $YOCTO_DIR/build/conf/bblayers.conf with your favorite text editor and add the meta-tegra layer to the build/conf/bblayers.conf file to load the provided recipes:
BBLAYERS ?= " \ /home/${USER}/yocto-tegra/meta-tegra \ /home/${USER}/yocto-tegra/poky/meta \ /home/${USER}/yocto-tegra/poky/meta-poky \ /home/${USER}/yocto-tegra/poky/meta-yocto-bsp \ "
3. Build the image
Use an image with developer tools such as GStreamer, NVIDIA plugins, etc
bitbake core-image-sato-dev
Or you can choose a different image from the following table
<IMAGE> | ||
---|---|---|
core-image-sato-dev | ||
core-image-weston | ||
core-image-base |
Legacy instructions
Please visit the following links for older versions of Jetpack.
Known issues
gtk4 Dependency Not Found
It has been seen that gtk4 generates an error when building the core-image-sato-dev
image.
../gtk-4.14.1/meson.build:631:13: ERROR: Dependency "libdrm" not found, tried pkgconfig
To fix it, simply add drm to the DEPENDS
variable in the file $YOCTO_DIR/poky/meta/recipes-gnome/gtk+/gtk4_4.14.1.bb
:
DEPENDS = " \ ... tiff \ + drm \ "