Jump to content

NVIDIA Jetson Orin - JetPack 7.2 - Building the Kernel, OoT Modules and DTBs

From RidgeRun Developer Wiki



Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page

🚧 Documentation is under development

The NVIDIA Jetson Orin guide is currently under active development. Some sections may be incomplete or change without notice.

Questions? Contact RidgeRun or email to support@ridgerun.com.






Follow these steps to compile the kernel, device tree, and out-of-tree (OoT) modules for JetPack 7.2 (L4T r39.2). This process produces the updated binaries that can later be deployed and flashed to your Jetson AGX Orin.

Install the Toolchain

The Jetson kernel must be cross-compiled on the host PC using the reference toolchain. Download NVIDIA's Crosstool-NG GCC 13.2.0 toolchain (x-tools.tbz2) from the JetPack 7.2 / Jetson Linux 39.2 release downloads and save it in ~/Downloads/:

mkdir -p $HOME/l4t-gcc
cd $HOME/l4t-gcc
tar xf "$HOME/Downloads/x-tools.tbz2"

Export Environment Variables

Export the variables that will be used during the build process. Replace the example DEVDIR path with your Jetson Linux 39.2 BSP directory. Obtain the sources and install the build dependencies as described in Obtaining Sources.

export DEVDIR="/absolute/path/to/Linux_for_Tegra"
export CROSS_COMPILE="$HOME/l4t-gcc/x-tools/aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-"
export INSTALL_MOD_PATH="$DEVDIR/rootfs/"
export KERNEL_HEADERS="$DEVDIR/source/kernel/kernel-noble"
export kernel_name=noble

Build, Install and Copy Outputs

1. Go to the build directory:

cd "$DEVDIR/source"

2. (Optional) If you are building the real-time kernel, enable the RT configuration:

./generic_rt_build.sh "enable"

3. Build the kernel and in-tree modules:

make -C kernel

4. Install the kernel and in-tree modules:

sudo -E make install -C kernel
cp kernel/kernel-noble/arch/arm64/boot/Image "$DEVDIR/kernel/Image"

5. Build the NVIDIA Out-of-Tree modules. For a real-time kernel, first set the display-driver variable:

export IGNORE_PREEMPT_RT_PRESENCE=1

Then build the modules:

make modules

6. Install the OoT modules into the rootfs:

sudo -E make modules_install

7. Build the device tree blobs (DTBs):

make dtbs

8. Copy the DTBs into the expected directory:

cp kernel-devicetree/generic-dts/dtbs/* "$DEVDIR/kernel/dtb/"

9. Update the initramfs so the new modules are included:

cd "$DEVDIR"
sudo ./tools/l4t_update_initrd.sh


Note
If building natively on the Jetson, you can instead run:


sudo nv-update-initrd

After these steps, the updated kernel, DTBs, and modules will be ready in the Linux_for_Tegra tree for flashing.





Cookies help us deliver our services. By using our services, you agree to our use of cookies.