Build TechNexion Camera Drivers for JetPack 7.x
Introduction
This document provides the instructions to build and port NVIDIA Jetson camera drivers using the JetPack 7.x SDK. The currently validated releases are JetPack 7.2 with Linux for Tegra R39.2.0 and JetPack 7.2.1 with Linux for Tegra R39.2.1. Both releases use kernel 6.8.
TechNexion has currently validated this build guide only with JetPack 7.2 and 7.2.1. If you want to port the driver to JetPack 6.x, follow the JetPack 6.x guide.
Preparation
First, you need to setup the environments on your host PC.
- Download toolchain for JetPack 7.2.x.
wget -O x-tools-gcc-13.2.tbz2 https://developer.nvidia.com/downloads/embedded/L4T/r38_Release_v2.0/release/x-tools.tbz2
sudo mkdir -p /opt/l4t-gcc-13.2
sudo tar xf x-tools-gcc-13.2.tbz2 -C /opt/l4t-gcc-13.2/
- Download JetPack BSP for your interested version.
- JetPack 7.2
- JetPack 7.2.1
wget https://developer.nvidia.com/downloads/embedded/L4T/r39_Release_v2.0/release/Jetson_Linux_R39.2.0_aarch64.tbz2
tar xf Jetson_Linux_R39.2.0_aarch64.tbz2
wget https://developer.nvidia.com/downloads/embedded/L4T/r39_Release_v2.1/release/Jetson_Linux_R39.2.1_aarch64.tbz2
tar xf Jetson_Linux_R39.2.1_aarch64.tbz2
Build Camera Drivers with Jetson BSP
The following example builds TechNexion camera drivers for JetPack 7.2.x on T23x-based Jetson platforms. The artifact example at the end of this guide is the TEVS camera driver and overlay for Jetson Orin Nano Developer Kit.
We can download BSP sources by source_sync.sh:
cd Linux_for_Tegra/source/
./source_sync.sh -k -t jetson_39.2_GA
JetPack 7.2 and 7.2.1 both use NVIDIA's jetson_39.2_GA source tag. There is no jetson_39.2.1_GA tag. Both versions also use the same TechNexion R39.2 camera-driver and T23x device-tree branches below, but each build must start from its matching R39.2.0 or R39.2.1 BSP.
After download the kernel source codes by source_sync.sh, you will see that:
source/
|-- dtc-src
|-- hardware
|-- kernel
|-- nvbuild.sh
|-- nvidia-oot
|-- nvgpu
`-- source_sync.sh
Then we need to clone TechNexion camera driver, follow the steps:
pushd nvidia-oot
git submodule add -b tn_l4t-r39.2.ga_kernel-6.8 https://github.com/TechNexion-Vision/tn-jetson-camera-driver.git drivers/media/i2c/technexion
if ! grep -qxF 'obj-m += technexion/' drivers/media/i2c/Makefile; then
echo 'obj-m += technexion/' >> drivers/media/i2c/Makefile
fi
popd
Then we need to modify device tree:
pushd hardware/nvidia/t23x/nv-public/
git remote add technexion https://github.com/TechNexion-Vision/tn-jetson-device-tree.git
git fetch technexion
git checkout tn_l4t-r39.2.ga_kernel-6.8_t23x
popd
Finally, we can run nvbuild.sh to build the BSP.
compiler="$(find /opt/l4t-gcc-13.2 -maxdepth 6 \( -type f -o -type l \) -name 'aarch64*-gcc' -print -quit)"
if [ -z "${compiler}" ]; then
echo "No aarch64 gcc found under /opt/l4t-gcc-13.2" >&2
exit 1
fi
export CROSS_COMPILE="${compiler%gcc}"
export KERNEL_HEADERS="${PWD}/build/kernel/kernel-noble"
./nvbuild.sh -o build
After a successful build, the following artifacts will be generated:
TEVS Driver Module:
./build/nvidia-oot/drivers/media/i2c/technexion/tevs/tevs.ko
Device Tree Overlay (DTBO):
./build/build/nvidia-public/devicetree/generic-dtbs/tegra234-p3767-camera-p3768-tevs-dual.dtbo