Yocto Support for NVIDIA® Jetson™ with JetPack 7 Integration - Setting Up Yocto
| Yocto Support for NVIDIA®Jetson™ with JetPack 7 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 are based on the setup explained at Tegra Demo Distro.
If you run into any issues, please check the Yocto community tutorial as well.
Select your Machine
This version of JetPack introduces support for the Jetson AGX Thor development kit, and supports only AGX Thor targets. Machine configurations for the Orin family remain as an option on the meta-tegra code, but they are not usable and not supported. Taking this into consideration, the MACHINE variable that is used in yocto to describe the target platform can only be jetson-agx-thor-devkit
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. Clone Tegra Demo Distro repository
git clone git@github.com:OE4T/tegra-demo-distro.git
4. Switch to the supported branch:
cd tegra-demo-distro git checkout master-l4t-r38.2.x
5. Initialize git submodules:
git submodule update --init
Compile Yocto image
1. Source the setup-env script to create a build directory
. ./setup-env --machine jetson-agx-thor-devkit
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>"
IMAGE_CLASSES += "image_types_tegra"
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, here you can make sure that the meta-tegra layer is added to build/conf/bblayers.conf file to load the provided recipes. There are other useful layers automatically added by tegra demo distro setup script.
3. Build the image
Build a basic image that can be flashed into the Jetson AGX Thor with this command:
bitbake core-image-minimal
Or you can choose a different image from the following table
| <IMAGE> | Description |
|---|---|
| core-image-minimal | minimally bootable image (no demo apps, no graphics) |
| demo-image-base | basic image with no graphics |
| demo-image-egl | basic image with DRM/EGL, no window manager |
| demo-image-sato | X11 image with 'sato' UI |
| demo-image-weston | Wayland with Weston compositor |
| demo-image-full | X11/sato UI plus docker, openCV, VPI, TensorRT and multimedia
API samples |