Quick Setup NVIDIA maintained Yocto integration
Quick Setup
This section prepares the development workspace required to build NVIDIA Jetson images using NVIDIA maintained Yocto integration.
The workspace includes the Yocto layer stack, build environment, local BSP mirror, configuration files, and tooling required to generate and deploy Jetson images.
This guide assumes a Linux based development host. Native Linux installations are recommended, but virtual machines, containers, and WSL based environments may also be used if they provide the required Yocto dependencies and USB access for flashing.
Follow these steps in order to initialize the workspace, prepare the NVIDIA local mirror, configure the target platform, and verify the build environment.
Step 1: Define Workspace Variables
Define the variables used throughout the setup:
export WORKSPACE=$HOME/jetson-yocto-workspace export NVIDIA_MIRROR=$HOME/nvidia-mirror export MACHINE=jetson-agx-orin-devkit
Variable overview:
WORKSPACEdefines the root directory used for the Yocto workspace.NVIDIA_MIRRORdefines the local directory containing NVIDIA BSP assets and package feeds used during builds.MACHINEselects the target Jetson platform configuration used by Yocto.
The selected MACHINE must match one of the supported machine definitions available in the workspace.
Please go back to check on the list of Supported Platforms.
These variables are used to keep the commands consistent across this guide. They are intended for the current shell session.
Step 2: Get the Workspace
There are two common ways to prepare the workspace.
Option 1: Use the provided demo distribution
If you are new to the platform and don't have a specific set of layers you plan to use with meta-tegra, or if you are just interested in trying meta-tegra for the first time as quickly as possible, tegra-demo-distro is highly recommend
Clone it and enter the workspace:
git clone https://github.com/OE4T/tegra-demo-distro $WORKSPACE cd $WORKSPACE
This option is the recommended starting point for this guide because it already includes the expected layer structure and project configuration.
Option 2: Set Up a Yocto Workspace Manually
This option consists of assembling a Yocto/OpenEmbedded build environment and adding the OE4T-maintained meta-tegra BSP layer for NVIDIA Jetson support. You manage the repositories, compatible release branches, enabled layers, target machine, distribution, and image configuration.
Choose this option when you already have a Yocto project and need to add Jetson support, or when you want to manage your own layer selection and build configuration. Manual setup is not required simply to customize an image; Option 1 also supports customization.
Use the following official references:
- Yocto Project: Setting Up Poky Manually explains the base build environment. Use the documentation version matching your chosen Yocto release. This guide does not cover Jetson integration.
- meta-tegra README identifies supported Jetson platforms and layer dependencies. Consult the README on your selected branch.
- meta-tegra Branch Selection explains which branches match your board and JetPack/L4T release.
A Jetson build environment needs:
- BitBake and OpenEmbedded-Core
- The meta-tegra BSP layer and its dependencies
- Build configuration files specifying the enabled layers, target machine, distribution, and image
Depending on your project, you may also add community extension layers and project customization layers.
The following setup-env and demo-image-* instructions apply to Option 1. For Option 2, use the initialization procedure and image recipes provided by your chosen build environment.
Step 3: Initialize Submodules
If the selected workspace uses Git submodules, synchronize all required Yocto layers:
cd $WORKSPACE git submodule update --init --recursive
This step initializes the complete layer stack required by the build system.
It synchronizes the Yocto core metadata, BSP layers, community layers, and project components referenced by the workspace.
Step 4: Configure the Environment
Initialize the Yocto environment and select the target platform:
cd $WORKSPACE . ./setup-env --machine $MACHINE
The setup-env script configures the Yocto build environment by:
- Creating the build directory
- Configuring the selected
MACHINE - Initializing the BitBake environment
- Generating build configuration files
- Preparing the shell for builds
The generated build directory can be reused across development sessions, but the setup script must normally be sourced again when opening a new shell.
To list all available machines and setup options:
. ./setup-env --help
You can verify that the environment was initialized successfully by checking the active build directory:
echo $BUILDDIR
Step 5: Verify the Environment
Confirm that the environment was initialized correctly:
command -v bitbake bitbake-layers show-layers bitbake -e | grep '^MACHINE='
Expected results:
command -v bitbakeshould return the BitBake executable path.bitbake-layers show-layersshould display the initialized Yocto layer stack.bitbake -e | grep '^MACHINE='should show the selected target platform.
Example output:
MACHINE="jetson-agx-thor-devkit
The displayed MACHINE value will vary depending on the platform selected during setup.
At this point, the workspace is ready to build Jetson images.
To build and deploy your first image, continue with the
next
→
pages.