Skip to content

Commit 99b1e24

Browse files
authored
R/1.0.1.23 (#322)
1 parent db6472e commit 99b1e24

25 files changed

Lines changed: 1495 additions & 342 deletions
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI
1+
name: Build JP 5.0.2
22

33
on:
44
push:
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
branches: ['**']
1010

11+
permissions: read-all
12+
1113
jobs:
1214
build:
1315

.github/workflows/build-jp512.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build JP 5.1.2
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches: ['**']
10+
11+
permissions: read-all
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: setup workspace
21+
run: yes | ./setup_workspace.sh 5.1.2
22+
- name: apply patches
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh apply 5.1.2
24+
- name: build
25+
run: ./build_all.sh 5.1.2

.github/workflows/build-jp6.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build JP 6.0
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches: ['**']
10+
11+
permissions: read-all
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-22.04
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: setup workspace
21+
run: yes | ./setup_workspace.sh 6.0
22+
- name: apply patches
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh apply 6.0
24+
- name: build
25+
run: ./build_all.sh 6.0

README.md

Lines changed: 20 additions & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -1,231 +1,41 @@
11
# Intel® RealSense™ camera driver for GMSL* interface
22

3-
# D457 MIPI on Jetson AGX Xavier
4-
The RealSense MIPI platform driver enables the user to control and stream RealSense 3D MIPI cameras.
3+
# D457 MIPI on NVIDIA® Jetson AGX Xavier™ and AGX Orin™
4+
The RealSense MIPI platform driver enables the user to control and stream RealSense 3D MIPI cameras.
55
The system shall include:
6-
* Jetson platform (Currently Supported JetPack versions are: 6.0, 5.1.2, 5.0.2, 4.6.1)
6+
* NVIDIA® Jetson platform (Currently Supported JetPack versions are: 6.0, 5.1.2, 5.0.2, 4.6.1)
77
* RealSense De-Serialize board (https://store.intelrealsense.com/buy-intel-realsense-des457.html)
8+
* NVIDIA® Jetson AGX Orin™ Passive adapter board from [Leopard Imaging LI-JTX1-SUB-ADPT](https://leopardimaging.com/product/accessories/adapters-carrier-boards/for-nvidia-jetson/li-jtx1-sub-adpt/)
89
* RS MIPI camera (e.g. https://store.intelrealsense.com/buy-intel-realsense-depth-camera-d457.html)
910

1011
> Note: This MIPI reference driver is based on RealSense de-serialize board. For other de-serialize boards, modification might be needed.
1112
1213
![image](https://user-images.githubusercontent.com/64067618/216807681-ed679a79-71d6-43ab-bfde-e0abb019b72d.png)
1314

1415

15-
## Jetson AGX Xavier board setup
16+
# Documentation
1617

17-
Please follow the [instruction](https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html) 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.
18-
19-
## Build kernel, dtb and D457 driver
20-
21-
The developers can set up the source code with NVIDIA's Jetson git repositories by using the provided setup script:
22-
23-
```
24-
# Using setup script, recommended for developers. If JetPack version is not given, default version will be chosen.
25-
./setup_workspace.sh [JetPack_version]
26-
```
27-
28-
Or download Jetson Linux source code tarball from
29-
- [JetPack 6.0-DP BSP sources](https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/sources/public_sources.tbz2)
30-
- [JetPack 5.1.2 BSP sources](https://developer.nvidia.com/downloads/embedded/l4t/r35_release_v4.1/sources/public_sources.tbz2)
31-
- [JetPack 5.0.2 BSP sources](https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/sources/public_sources.tbz2)
32-
- [JetPack 4.6.1 BSP sources](https://developer.nvidia.com/embedded/l4t/r32_release_v7.1/sources/t186/public_sources.tbz2)
33-
34-
```
35-
# JetPack 6.0
36-
mkdir -p l4t-gcc/6.0
37-
cd ./l4t-gcc/6.0
38-
wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/toolchain/aarch64--glibc--stable-2022.08-1.tar.bz2 -O aarch64--glibc--stable-final.tar.bz2
39-
tar xf aarch64--glibc--stable-final.tar.bz2 --strip-components 1
40-
cd ../..
41-
wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/sources/public_sources.tbz2
42-
tar xjf public_sources.tbz2
43-
cd Linux_for_Tegra/source
44-
tar xjf kernel_src.tbz2
45-
tar xjf kernel_oot_modules_src.tbz2
46-
tar xjf nvidia_kernel_display_driver_source.tbz2
47-
48-
# JetPack 5.1.2
49-
mkdir -p l4t-gcc/5.1.2
50-
cd ./l4t-gcc/5.1.2
51-
wget https://developer.nvidia.com/embedded/jetson-linux/bootlin-toolchain-gcc-93 -O aarch64--glibc--stable-final.tar.gz
52-
tar xf aarch64--glibc--stable-final.tar.gz
53-
cd ../..
54-
wget https://developer.nvidia.com/downloads/embedded/l4t/r35_release_v4.1/sources/public_sources.tbz2
55-
tar xjf public_sources.tbz2
56-
cd Linux_for_Tegra/source/public
57-
tar xjf kernel_src.tbz2
58-
59-
# JetPack 5.0.2
60-
mkdir -p l4t-gcc/5.0.2
61-
cd ./l4t-gcc/5.0.2
62-
wget https://developer.nvidia.com/embedded/jetson-linux/bootlin-toolchain-gcc-93 -O aarch64--glibc--stable-final.tar.gz
63-
tar xf aarch64--glibc--stable-final.tar.gz --strip-components 1
64-
cd ../..
65-
wget https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/sources/public_sources.tbz2
66-
tar xjf public_sources.tbz2
67-
cd Linux_for_Tegra/source/public
68-
tar xjf kernel_src.tbz2
69-
70-
# JetPack 4.6.1
71-
mkdir -p l4t-gcc/4.6.1
72-
cd ./l4t-gcc/4.6.1
73-
wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
74-
tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz --strip-components 1
75-
cd ../..
76-
wget https://developer.nvidia.com/embedded/l4t/r32_release_v7.1/sources/t186/public_sources.tbz2
77-
tar xjf public_sources.tbz2
78-
cd Linux_for_Tegra/source/public
79-
tar xjf kernel_src.tbz2
80-
```
81-
82-
Apply D457 patches and build the kernel image, dtb and D457 driver.
83-
84-
```
85-
# if using setup script
86-
./apply_patches.sh [--one-cam | --dual-cam] apply [JetPack_version]
87-
88-
# or, if using direct download method
89-
# ./apply_patches_ext.sh [--one-cam | --dual-cam] ./Linux_for_tegra/source/public [JetPack_version]
90-
# for JP6.0, source path is ./Linux_for_tegra/source :
91-
# ./apply_patches_ext.sh ./Linux_for_tegra/source 6.0
92-
93-
Note: The `--one-cam` and `--dual-cam` option applies only for JetPack 5.0.2,
94-
compatible with adapter: https://store.intelrealsense.com/buy-intel-realsense-des457.html.
95-
By setting the `--one-cam` option it builds DT with only camera on GMSL link A (default).
96-
By setting the `--dual-cam` option it builds DT with dual cameras on GMSL link A and B.
97-
The default is to single camera configuration for JetPack 5.0.2.
98-
99-
# build kernel, dtb and D457 driver
100-
# install dependencies
101-
sudo apt install build-essential bc flex bison
102-
# method 1: build kernel Debian packages
103-
./build_all_deb.sh [--no-dbg-pkg] [JetPack_version] [JetPack_source_dir]
104-
# method 2: build kernel and modules only
105-
./build_all.sh [JetPack_version] [JetPack_source_dir]
106-
107-
# remove our patches from JetPack kernel source code if using setup script
108-
# ./apply_patches.sh reset [JetPack_version]
109-
```
110-
111-
Debian packages will be generated in `images` folder.
112-
113-
## Install kernel and D457 driver to Jetson Orin
114-
<details>
115-
<summary>JP6.0 build results</summary>
116-
117-
- kernel image (not modified): `images/6.0/rootfs/boot/Image`
118-
- dtb overlay: `images/6.0/rootfs/boot/tegra234-camera-d4xx-overlay.dtbo`
119-
- oot modules: `images/6.0/rootfs/lib/modules/5.15.122-tegra/extra`
120-
121-
Following steps required:
122-
123-
1. Copy entire directory `images/6.0/rootfs/lib/modules/5.15.122-tegra/extra/` from host to `/lib/modules/5.15.122-tegra/extra/` on Orin
124-
2. Copy `tegra234-camera-d4xx-overlay.dtbo` from host to `/boot/tegra234-camera-d4xx-overlay.dtbo` on Orin
125-
3. Run $ `sudo /opt/nvidia/jetson-io/jetson-io.py`
126-
1. Configure Jetson AGX CSI Connector
127-
2. Configure for compatible hardware
128-
3. Jetson RealSense Camera D457
129-
4. $ `sudo depmod`
130-
5. $ `echo "d4xx" | sudo tee /etc/modules-load.d/d4xx.conf`
131-
4. Reboot
132-
133-
Copy them to the right places:
18+
- NVIDIA® Jetson AGX Orin™ board setup - AGX Orin™ [JetPack 6.0](./README_JP6.md) setup guide
19+
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 5.x.2](./README_JP5.md) setup guide
20+
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 4.6.1](./README_JP4.md) setup guide
21+
- Build Tools manual page [Build Manual page](./README_tools.md)
22+
- Driver API manual page [Driver API page](./README_driver.md)
13423

135-
```
136-
scp -r images/6.0/rootfs/boot/tegra234-camera-d4xx-overlay.dtbo nvidia@10.0.0.116:~/
137-
scp -r images/6.0/rootfs/lib/modules/5.15.122-tegra/extra nvidia@10.0.0.116:~/
138-
# RealSense metadata patched kernel modules
139-
scp -r images/6.0/rootfs/lib/modules/5.15.122-tegra/kernel/drivers/media/v4l2-core/videodev.ko nvidia@10.0.0.116:~/
140-
scp -r images/6.0/rootfs/lib/modules/5.15.122-tegra/kernel/drivers/media/usb/uvc/uvcvideo.ko nvidia@10.0.0.116:~/
141-
# Kernel Image with SENSOR_HID support for RealSense USB cameras with IMU
142-
scp -r images/6.0/rootfs/boot/Image nvidia@10.0.0.116:~/
143-
```
24+
## NVIDIA® Jetson AGX Xavier™ and AGX Orin™ board setup
14425

145-
on target:
146-
147-
```
148-
sudo cp ~/tegra234-camera-d4xx-overlay.dtbo /boot/
149-
# backup:
150-
sudo tar -cjf /lib/modules/$(uname -r)/modules_$(uname -r)_extra.tar.bz2 /lib/modules/$(uname -r)/extra
151-
sudo cp -r ~/extra /lib/modules/$(uname -r)/
152-
# enable RealSense metadata:
153-
sudo cp uvcvideo.ko /lib/modules/5.15.122-tegra/kernel/drivers/media/usb/uvc/uvcvideo.ko
154-
sudo cp videodev.ko /lib/modules/5.15.122-tegra/kernel/drivers/media/v4l2-core/videodev.ko
155-
# backup kernel (better to have additional boot entry in extlinux.conf)
156-
sudo cp /boot/Image /boot/Image.orig
157-
sudo cp Image /boot/Image
158-
```
159-
160-
Enable d4xx overlay:
161-
162-
With Jetson-IO tool:
163-
`sudo /opt/nvidia/jetson-io/jetson-io.py`
164-
165-
1. Configure Jetson AGX CSI Connector
166-
2. Configure for compatible hardware
167-
3. Jetson RealSense Camera D457
168-
169-
With command line
170-
171-
`sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="Jetson RealSense Camera D457"`
172-
173-
Expected:
174-
```
175-
nvidia@ubuntu:~$ sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="Jetson RealSense Camera D457"
176-
Configuration saved to /boot/tegra234-camera-d4xx-overlay.dtbo.
177-
Reboot system to reconfigure.
178-
```
179-
Enable d4xx autoload:
180-
181-
`echo "d4xx" | sudo tee /etc/modules-load.d/d4xx.conf`
182-
183-
`sudo depmod`
184-
185-
---
186-
187-
</details>
188-
189-
## Install kernel and D457 driver to Jetson AGX Xavier
190-
191-
1. Install the kernel and modules
192-
193-
1.1 If building with `build_all_deb.sh`
194-
195-
Copy the Debian package `linux-image-5.10.104-d457_5.10.104-d457-1_arm64.deb` to the Jetson AGX Xavier board and install with `sudo dpkg -i linux-image-5.10.104-d457_5.10.104-d457-1_arm64.deb`. The header, libc-dev, dbg and firmware packages are optional.
196-
197-
1.2 If building with `build_all.sh`
198-
199-
The necessary files are:
200-
201-
- kernel image `images/<JetPack_version>/arch/arm64/boot/Image`
202-
- dtb `images/<JetPack_version>/arch/arm64/boot/dts/nvidia/tegra194-p2888-0001-p2822-0000.dtb`, or `images/4.6.1/arch/arm64/boot/dts/tegra194-p2888-0001-p2822-0000.dtb` for JetPack 4.6.1.
203-
- D457 driver `images/<JetPack_version>/drivers/media/i2c/d4xx.ko`
204-
- UVC Video driver `images/<JetPack_version>/drivers/media/usb/uvc/uvcvideo.ko`
205-
- V4L2 Core Video driver `images/<JetPack_version>/drivers/media/v4l2-core/videobuf-core.ko`
206-
- V4L2 VMalloc Video driver `images/<JetPack_version>/drivers/media/v4l2-core/videobuf-vmalloc.ko`
207-
208-
And copy them to the right places:
209-
```
210-
sudo cp Image /boot
211-
sudo cp tegra194-p2888-0001-p2822-0000.dtb /boot/dtb
212-
sudo cp d4xx.ko /lib/modules/5.10.104-tegra/kernel/drivers/media/i2c/
213-
sudo cp uvcvideo.ko /lib/modules/5.10.104-tegra/kernel/drivers/media/usb/uvc/
214-
sudo cp videobuf-core.ko /lib/modules/5.10.104-tegra/kernel/drivers/media/v4l2-core/
215-
sudo cp videobuf-vmalloc.ko /lib/modules/5.10.104-tegra/kernel/drivers/media/v4l2-core/
216-
sudo depmod
217-
```
26+
Please follow the [instruction](https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html) 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.
21827

219-
2. Edit `/boot/extlinux/extlinux.conf` primary boot option's LINUX/FDT lines to use built kernel image and dtb file:
28+
**NOTE** : On Jetsons with modified factory setup modifications to build and deploy steps should be made by developer.
22029

221-
```
222-
LINUX /boot/Image-5.10.104-d457
223-
FDT /usr/lib/linux-image-5.10.104-d457/tegra194-p2888-0001-p2822-0000.dtb
224-
```
30+
# JetPack build
22531

226-
3. Make D457 I2C module autoload at boot time: `echo "d4xx" | sudo tee /etc/modules-load.d/d4xx.conf`
32+
- [JetPack 6.0](./README_JP6.md#build-environment-prerequisites)
33+
- [JetPack 5.1.2](./README_JP5.md#build-kernel-dtb-and-d457-driver)
34+
- [JetPack 5.0.2](./README_JP5.md#build-kernel-dtb-and-d457-driver)
35+
- [JetPack 4.6.1](./README_JP4.md#build-kernel-dtb-and-d457-driver)
22736

228-
After rebooting Jetson, the D457 driver should work.
37+
### Verify driver after installation
38+
- Driver API manual page [Driver API page](./README_driver.md)
22939

23040
**NOTE**
23141

0 commit comments

Comments
 (0)