n.b. This repository is a mashup of the out-of-tree (OOT) kernel module build structure from Allied Vision Alvium CSI Driver for Jetpack 6 with the AVT kernel module removed; and the Vision Components MIPI driver added.
Following the pattern from the AVT driver package, the four Nvidia OOT kernel packages are included as submodules:
nvidia-hwpm
,nvidia-nvethernetrm
, andnvidia-nvgpu
use the upstream repos from Nvidia's git server.nvidia-oot
points to my nvidia-oot repo which contains the Nvidia OOT module source with the VC patches applied.
The vc-mipi-driver
contain copies the VC module sources from their repo, rearranged for this build system.
-
Clone this repository including all submodules
git clone --recurse-submodules https://github.com/apl-ocean-engineering/vc-jetson-driver-release.git
or:
git clone https://github.com/apl-ocean-engineering/vc-jetson-driver-release.git git submodule update --init
-
Download the Jetson Linux driver package (BSP) and cross compiler (registration with Nvidia required). The driver package / BSP must match your version of Jetpack:
-
Extract the driver package in this directory:
tar -xvf Jetson_Linux_r36*.tbz2
-
Extract the kernel headers from the driver package in the
Linux_for_Tegra/kernel
directory:cd Linux_for_Tegra/kernel/ tar -xvf kernel_headers.tbz2
-
Extract the cross compiler in this directory:
cd ../../ tar -xvf aarch64--glibc--stable-2022.08-1.tar.bz2
-
Set the appropriate environment variables:
source setup.sh
-
Build everything:
make all
-
Build a distributable package
install.tar.bz2
:make package
At this point the rebuilt kernel modules -- including both the new VC modules and a few customized versions of NVidia camera handler modules -- and additional device tree overlays can be installed onto a Jetson.
This can be done either by building a new set of images and flashing them to the device (essentially replacing the install process done through SDK Manager), or by installing them on an already-running module. For simplicity, my focus is the latter ....
-
Copy
install.tar.bz2
to the device (called 'nano' in this case):scp -r install.tar.bz2 nano:~
-
Log into the device, and run the install script:
ssh nano tar xvf install.tar.bz2 cd install && ./install.sh
-
Instruct the bootloader to apply the device tree overlay on startup. This can be done manually by editing the
/boot/extlinux/extlinux.conf
file, though thejetson-io
wrapper can be used to automated the process, either graphically with:sudo /opt/nvidia/jetson-io/jetson-io.py
or
sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="Camera VCMIPI Dual"
Which instructs the scripts to install the overlay "Camera VCMIPI Dual" (this name is baked into the overlay file
tegra234-p3767-camera-p3768-vc_mipi-dual-imx.dtbo
) for header "2" (the CSI Camera header).- Confirm the changes have created a new entry in
/boot/extlinux/extlinux.conf
A new entry something likethe following should exist (the args may vary)
LABEL extlinux MENU LABEL Vision Components cameras LINUX /boot/Image INITRD /boot/initrd FDT /boot/tegra234-p3767-camera-p3768-vc_mipi-dual-imx.dtbo APPEND ${cbootargs} root=PARTUUID=6b929ca4-a2b3-4d61-b7e3-47cffb186889 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
- Reboot
- Confirm the changes have created a new entry in
Please be aware that all code revisions not explicitly listed in the Github Release section are considered a Beta Version.
For Beta Versions, the following applies in addition to the GPLv2 License:
THE SOFTWARE IS PRELIMINARY AND STILL IN TESTING AND VERIFICATION PHASE AND IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS AND IS BELIEVED TO CONTAIN DEFECTS. THE PRIMARY PURPOSE OF THIS EARLY ACCESS IS TO OBTAIN FEEDBACK ON PERFORMANCE AND THE IDENTIFICATION OF DEFECTS IN THE SOFTWARE, HARDWARE AND DOCUMENTATION.