Building software for NVIDIA Jetson devices often presents challenges.
Typically, developers must have physical access to a Jetson board and manage varying JetPack, L4T, and system library versions.
This can make it hard to maintain a consistent, reproducible build environment—especially when supporting multiple Jetson models.
JetsonForge simplifies this by providing scripts and tooling to create cross-compilation Docker images on a standard x86_64 machine.
You can now build Jetson software without owning a Jetson device, enabling faster development and CI/CD workflows.
Before you begin, ensure you have the following installed:
- Ubuntu 22.04 LTS (desktop or server)
- NVIDIA Developer Account — required to access JetPack/L4T downloads
- NVIDIA SDK Manager — for downloading JetPack and preparing the sysroot
- Docker — installed and configured
- ~60 GB+ of free disk space — for images, SDKs, and sysroot data
Optional (but recommended):
- Basic knowledge of Docker, cross-compilation, and CMake
⚠️ Legal Notice:
You must download JetPack and L4T files only via your official NVIDIA Developer Account.
JetsonForge does not distribute proprietary binaries.
Follow these steps to set up your Jetson cross-compile environment.
Set up Ubuntu 22.04 and install:
sudo apt update
sudo apt install -y docker.io nvidia-sdk-managerList available JetPack versions:
sdkmanager --query non-interactive --action downloadonlyTo include archived versions:
sdkmanager --query non-interactive --action downloadonly --archived-versionsExample: Download JetPack 6.0 (r36.3.0) for Jetson Orin Nano 8 GB:
cd ~
mkdir jetpack-r36.3.0
sdkmanager --cli --action downloadonly --download-folder ~/jetpack-r36.3.0 --login-type devzone --exit-on-finish --license accept --product Jetson --archived-versions --version 6.0 --target-os Linux --host --target JETSON_ORIN_NANO_TARGETS💡 This downloads all default JetPack 6.0 components.
To select only specific packages, launchsdkmanagerin interactive mode.
After downloading, install dependencies:
sudo apt update
sudo apt install -y bzip2 zstd xz-utils dpkg-dev qemu-user-static pvmkdir ~/workspace
git clone https://github.com/hackash/JetsonForge.git
cd JetsonForge/scripts
chmod +x make-sys-root.shSet environment variables and generate the sysroot:
export JETSON_FORGE_DL=/home/ubuntu/jetpack-r36.3.0
export JETSON_FORGE_WORK=/home/ubuntu/workspace
export JETSON_FORGE_OUT=/home/ubuntu/workspace/jetpack-6.0-aarch64.tar.zst
./make-sys-root.shOnce complete, copy the generated sysroot archive into JetsonForge:
cp /home/ubuntu/workspace/jetpack-6.0-aarch64.tar.zst JetsonForge/sysrootsFrom the root of the JetsonForge repo:
cd JetsonForge
docker build --network host --build-arg TAR_ZST_NAME=jetpack-6.0-aarch64.tar.zst -t l4t-cross-base:r36.3.0 -f docker/x86-cross/Dockerfile .🏷️ Rename as desired, e.g.
yourorg/l4t-cross:r36.3.0.
The resulting image l4t-cross-base:r36.3.0 replicates a clean JetPack 6.0 environment and can be used to build software for Jetson targets.
Build the example CUDA project:
docker build --network host --build-arg L4T_CROSS_BASE=l4t-cross-base:r36.3.0 --build-arg TARGET_JETPACK_TAG=r36.3.0 -t l4t-cross-example-app:r36.3.0-latest -f examples/cmake-cuda/Dockerfile examples/cmake-cudaYou can now run this image on your Jetson device:
docker run -it --rm --runtime nvidia l4t-cross-example-app:r36.3.0-latestExpected output:
Detected 1 CUDA device(s)
Device 0: Orin
Compute capability: 8.7
Total global memory: 7621 MB
Multiprocessors: 8
Max threads per block: 1024
Clock rate: 624 MHz
🎉 Success!
You’ve cross-compiled a CUDA app on an x86_64 host (no GPU required) and executed it natively on a Jetson board.
| Path | Description |
|---|---|
docker/x86-cross/Dockerfile |
x86_64 build image with AArch64 toolchain & JetPack sysroot |
toolchains/aarch64-jetson.cmake |
CMake toolchain configuration for cross-compiling |
examples/cmake-cuda/ |
Minimal CUDA example and Dockerfile |
scripts/verify-sysroot.sh |
Verifies CUDA/cuDNN/TensorRT compatibility in the sysroot |
.github/workflows/build-cross.yml |
Example GitHub Actions CI pipeline |
- Ensure your sysroot matches the exact JetPack/L4T version of your deployment device.
- If a build step executes target binaries, compile those utilities for x86 or use QEMU emulation.
- Keep sysroots version-controlled and reproducible to prevent inconsistencies across environments.
This project is licensed under the MIT License.
Pull requests and improvements are always welcome!
If you find bugs or want to suggest enhancements, open an issue on GitHub.
For setup questions or contribution discussions, reach out via GitHub Issues or start a Discussion thread.
❤️ Happy Vibe Coding!