The RealSense™ MIPI platform driver enables the user to control and stream RealSense™ 3D MIPI cameras.
The system shall include:
- NVIDIA® Jetson™ platform (Currently Supported JetPack versions are: 5.1.2, 5.0.2)
- RealSense™ De-Serialize board
- RS MIPI camera (e.g. https://store.realsenseai.com/buy-intel-realsense-depth-camera-d457.html)
Note: This MIPI reference driver is based on RealSense™ de-serialize board. For other de-serialize boards, modification might be needed.
- RealSense™ camera driver for GMSL* interface Front Page
- Jetson AGX Orin™ board setup - AGX Orin™ JetPack 6.x setup guide
- Jetson AGX Xavier™ board setup - AGX Xavier™ JetPack 5.x.2 setup guide
- Jetson AGX Xavier™ board setup - AGX Xavier™ JetPack 4.6.1 setup guide
- Build Tools manual page Build Manual page
- Driver API manual page Driver API page
Please follow the instruction to flash JetPack to the Jetson AGX Xavier™ with NVIDIA® SDK Manager or other methods NVIDIA provides. Make sure the board is ready to use.
JetPack manual build
Download Jetson Linux source code tarball from
mkdir -p l4t-gcc/5.x
cd ./l4t-gcc/5.x
wget https://developer.nvidia.com/embedded/jetson-linux/bootlin-toolchain-gcc-93 -O aarch64--glibc--stable-final.tar.gz
tar xf aarch64--glibc--stable-final.tar.gz
cd ../..
wget https://developer.nvidia.com/downloads/embedded/l4t/r35_release_v4.1/sources/public_sources.tbz2
tar xjf public_sources.tbz2
cd Linux_for_Tegra/source/public
tar xjf kernel_src.tbz2
cd ../../..
mkdir -p l4t-gcc/5.x
cd ./l4t-gcc/5.x
wget https://developer.nvidia.com/embedded/jetson-linux/bootlin-toolchain-gcc-93 -O aarch64--glibc--stable-final.tar.gz
tar xf aarch64--glibc--stable-final.tar.gz --strip-components 1
cd ../..
wget https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/sources/public_sources.tbz2
tar xjf public_sources.tbz2
cd Linux_for_Tegra/source/public
tar xjf kernel_src.tbz2
cd ../../..
# install dependencies
sudo apt install build-essential bc flex bison
# apply patches
./apply_patches_ext.sh 5.1.2 ./Linux_for_Tegra/source/public
# build kernel, dtb and D457 driver
./build_all.sh 5.1.2 ./Linux_for_Tegra/source/public
Note: dev_dbg() log support will not be enabled by default. If needed, run the ./build_all.sh script with --dev-dbg option like below.
./build_all.sh --dev-dbg 5.1.2 ./Linux_for_Tegra/source/public
The developers can set up the source code with NVIDIA's Jetson git repositories by using the provided scripts.
- Prepare build workspace for cross-compile on host
- Apply necessary patches
- Build workspace
- Deploy build results on target Jetson
./setup_workspace.sh 5.1.2
./apply_patches.sh 5.1.2
./build_all.sh 5.1.2
Note: dev_dbg() log support will not be enabled by default. If needed, run the ./build_all.sh script with --dev-dbg option like below.
./build_all.sh --dev-dbg 5.1.2
- Install the kernel and modules (change 5.1.2 to 5.0.2 for 5.0.2 build)
Building with build_all.sh 5.1.2
The necessary files are:
- kernel image
images/5.1.2/arch/arm64/boot/Image - dtb
images/5.1.2/arch/arm64/boot/dts/nvidia/tegra194-p2888-0001-p2822-0000.dtb - D457 driver
images/5.1.2/drivers/media/i2c/d4xx.ko - UVC Video driver
images/5.1.2/drivers/media/usb/uvc/uvcvideo.ko - V4L2 Core Video driver
images/5.1.2/drivers/media/v4l2-core/videobuf-core.ko - V4L2 VMalloc Video driver
images/5.1.2/drivers/media/v4l2-core/videobuf-vmalloc.ko
Copy build results from Host to Jetson target 10.0.0.116 user nvidia
scp ./images/5.1.2/arch/arm64/boot/Image nvidia@10.0.0.116:~/
scp ./images/5.1.2/arch/arm64/boot/dts/nvidia/tegra194-p2888-0001-p2822-0000.dtb nvidia@10.0.0.116:~/
scp ./images/5.1.2/drivers/media/i2c/d4xx.ko nvidia@10.0.0.116:~/
scp ./images/5.1.2/drivers/media/usb/uvc/uvcvideo.ko nvidia@10.0.0.116:~/
scp ./images/5.1.2/drivers/media/v4l2-core/videobuf-core.ko nvidia@10.0.0.116:~/
scp ./images/5.1.2/drivers/media/v4l2-core/videobuf-vmalloc.ko nvidia@10.0.0.116:~/
Copy them to the right places on Jetson target:
sudo mkdir /boot/d457
sudo mkdir /lib/modules/$(uname -r)/updates
sudo cp Image /boot/d457/
sudo cp tegra194-p2888-0001-p2822-0000.dtb /boot/d457/
sudo cp d4xx.ko /lib/modules/$(uname -r)/updates/
sudo cp uvcvideo.ko /lib/modules/$(uname -r)/updates/
sudo cp videobuf-core.ko /lib/modules/$(uname -r)/updates/
sudo cp videobuf-vmalloc.ko /lib/modules/$(uname -r)/updates/
sudo depmod
-
Add a boot option to
/boot/extlinux/extlinux.confby duplicating the existing default option to capture all boot arguments. -
Edit
LINUX/FDTlines to use built kernel image and dtb file:LINUX /boot/d457/Image FDT /boot/d457/tegra194-p2888-0001-p2822-0000.dtb
$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT d457
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/dtb/tegra194-p2888-0001-p2822-0000.dtb
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
LABEL d457
MENU LABEL d457 kernel
LINUX /boot/d457/Image
INITRD /boot/initrd
FDT /boot/d457/tegra194-p2888-0001-p2822-0000.dtb
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
LABEL d457_calib
MENU LABEL d457_calib kernel
LINUX /boot/d457/Image
INITRD /boot/initrd
FDT /boot/d457/tegra194-p2888-0001-p2822-0000.calib.dtb
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
- Make D457 I2C module autoload at boot time:
echo "d4xx" | sudo tee /etc/modules-load.d/d4xx.conf
After rebooting Jetson, the D457 driver should work.
- It's recommended to save the original kernel image as backup boot option in
/boot/extlinux/extlinux.conf. - With the introduction of meta data support for depth IR starting from release r/1.0.1.27, calibration format streaming requires a separate DTB that disables meta data. If calibration is needed, it's recommended to add
d457_calibboot option as shown below.
$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT d457
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/dtb/tegra194-p2888-0001-p2822-0000.dtb
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
LABEL d457
MENU LABEL d457 kernel
LINUX /boot/d457/Image
INITRD /boot/initrd
FDT /boot/d457/tegra194-p2888-0001-p2822-0000.dtb
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
LABEL d457_calib
MENU LABEL d457_calib kernel
LINUX /boot/d457/Image
INITRD /boot/initrd
FDT /boot/d457/tegra194-p2888-0001-p2822-0000.calib.dtb
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4
-
To generate
tegra194-p2888-0001-p2822-0000.calib.dtbon the Host build system, replace the contents of the below files:tegra194-camera-d4xx-dual.dtsiby the contents oftegra194-camera-d4xx-dual.calib.dtsitegra194-camera-d4xx-single.dtsiby the contents oftegra194-camera-d4xx-single.calib.dtsi -
Reset and reapply patches and rebuild driver:
./apply_patches.sh 5.1.2 reset
./apply_patches.sh 5.1.2
./build_all.sh 5.1.2
- Deploy one DTB file on the Jetson:
- In
./images/5.1.2/arch/arm64/boot/dts/nvidia/folder, locate and rename the follwing file:tegra194-p2888-0001-p2822-0000.dtbtotegra194-p2888-0001-p2822-0000.calib.dtb
- Copy
tegra194-p2888-0001-p2822-0000.calib.dtbfrom Host to/boot/d457/on the Jetson.