Skip to content

Commit c895f0a

Browse files
committed
JP7.x build
1 parent 8a9cc45 commit c895f0a

68 files changed

Lines changed: 6350 additions & 1389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-jp502.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: setup workspace
2121
run: yes | ./setup_workspace.sh 5.0.2
2222
- name: apply patches
23-
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh 5.0.2
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
2424
- name: build
25-
run: ./build_all.sh 5.0.2
25+
run: ./build_all.sh

.github/workflows/build-jp512.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: setup workspace
2121
run: yes | ./setup_workspace.sh 5.1.2
2222
- name: apply patches
23-
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh 5.1.2
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
2424
- name: build
25-
run: ./build_all.sh 5.1.2
25+
run: ./build_all.sh

.github/workflows/build-jp6.1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: setup workspace
2121
run: yes | ./setup_workspace.sh 6.1
2222
- name: apply patches
23-
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh 6.1
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
2424
- name: build
25-
run: ./build_all.sh 6.1
25+
run: ./build_all.sh

.github/workflows/build-jp6.2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: setup workspace
2121
run: yes | ./setup_workspace.sh 6.2
2222
- name: apply patches
23-
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh 6.2
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
2424
- name: build
25-
run: ./build_all.sh 6.2
25+
run: ./build_all.sh

.github/workflows/build-jp6.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: setup workspace
2121
run: yes | ./setup_workspace.sh 6.0
2222
- name: apply patches
23-
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh 6.0
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
2424
- name: build
25-
run: ./build_all.sh 6.0
25+
run: ./build_all.sh

.github/workflows/build-jp7.1.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build JP 7.1
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-latest
17+
18+
steps:
19+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3
20+
- name: setup workspace
21+
run: yes | ./setup_workspace.sh 7.1
22+
- name: apply patches
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
24+
- name: build
25+
run: ./build_all.sh

.github/workflows/build-jp7.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build JP 7.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-latest
17+
18+
steps:
19+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3
20+
- name: setup workspace
21+
run: yes | ./setup_workspace.sh 7.0
22+
- name: apply patches
23+
run: git config --global user.email "builder@example.com" && git config --global user.name "builder" && ./apply_patches.sh
24+
- name: build
25+
run: ./build_all.sh

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# D457 MIPI on NVIDIA® Jetson AGX Xavier™ and AGX Orin™
1313
The RealSense™ MIPI platform driver enables the user to control and stream RealSense™ 3D MIPI cameras.
1414
The system shall include:
15-
* NVIDIA® Jetson platform (Currently Supported JetPack versions are: 6.2.1, 6.2, 6.1, 6.0, 5.1.2, 5.0.2, 4.6.1)
15+
* NVIDIA® Jetson platform (Currently Supported JetPack versions are: 7.1, 7.0, 6.2.1, 6.2, 6.1, 6.0, 5.1.2, 5.0.2, 4.6.1)
1616
* RealSense™ De-Serialize board
1717
* 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/)
1818
* RS MIPI camera (e.g. https://store.realsenseai.com/buy-intel-realsense-depth-camera-d457.html)
@@ -24,6 +24,7 @@ The system shall include:
2424

2525
# Documentation
2626

27+
- NVIDIA® Jetson AGX Orin™ board setup - AGX Orin™ [JetPack 7.x](./README_JP7.md) setup guide
2728
- NVIDIA® Jetson AGX Orin™ board setup - AGX Orin™ [JetPack 6.0](./README_JP6.0.md) setup guide
2829
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 5.x.2](./README_JP5.md) setup guide
2930
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 4.6.1](./README_JP4.md) setup guide
@@ -38,8 +39,9 @@ Please follow the [instruction](https://docs.nvidia.com/sdk-manager/install-with
3839

3940
# JetPack build
4041

41-
- [JetPack 6.0](./README_JP6.0.md#build-environment-prerequisites)
42+
- [JetPack 7.x](./README_JP7.md#build-environment-prerequisites)
4243
- [JetPack 6.2](./README_JP6.2.md#build-environment-prerequisites)
44+
- [JetPack 6.0](./README_JP6.0.md#build-environment-prerequisites)
4345
- [JetPack 5.x.2](./README_JP5.md#build-kernel-dtb-and-d457-driver)
4446
- [JetPack 4.6.1](./README_JP4.md#build-kernel-dtb-and-d457-driver)
4547

README_JP7.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
# RealSense™ camera driver for GMSL* interface
2+
3+
# D457 MIPI on NVIDIA® Jetson AGX Orin™ JetPack 7.x
4+
The RealSense™ MIPI platform driver enables the user to control and stream RealSense™ 3D MIPI cameras.
5+
The system shall include:
6+
* NVIDIA® Jetson™ platform Supported JetPack versions are:
7+
- 7.1 production release
8+
- 7.0 production release
9+
* RealSense™ De-Serialize board
10+
* 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/)
11+
* RS MIPI camera [D457](https://store.realsenseai.com/buy-intel-realsense-depth-camera-d457.html)
12+
13+
![orin_adapter](https://github.com/dmipx/realsense_mipi_platform_driver/assets/104717350/524e3eb6-6e6b-41cf-9562-9c0f920dd821)
14+
15+
16+
> Note: This MIPI reference driver is based on RealSense™ de-serialize board. For other de-serialize boards, modification might be needed.
17+
18+
### Links
19+
- RealSense™ camera driver for GMSL* interface [Front Page](./README.md)
20+
- NVIDIA® Jetson AGX Orin™ board setup - AGX Orin™ [JetPack 6.0](./README_JP6.0.md) setup guide
21+
- NVIDIA® Jetson AGX Orin™ board setup - AGX Orin™ [JetPack 6.2](./README_JP6.2.md) setup guide
22+
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 5.x.2](./README_JP5.md) setup guide
23+
- NVIDIA® Jetson AGX Xavier™ board setup - AGX Xavier™ [JetPack 4.6.1](./README_JP4.md) setup guide
24+
- Build Tools manual page [Build Manual page](./README_tools.md)
25+
- Driver API manual page [Driver API page](./README_driver.md)
26+
27+
## NVIDIA® Jetson AGX Orin™ board setup
28+
29+
Please follow the [instruction](https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html) to flash JetPack to the NVIDIA® Jetson AGX Orin™ with NVIDIA® SDK Manager or other methods NVIDIA provides. Make sure the board is ready to use.
30+
31+
## Build environment prerequisites
32+
```
33+
sudo apt-get install -y build-essential bc wget flex bison curl libssl-dev xxd tar
34+
```
35+
## Build NVIDIA® kernel drivers, dtb and D457 driver
36+
37+
These are descriptiver steps. Bash commands to be issued follow:
38+
1. Clone [realsense_mipi_platform_driver](https://github.com/realsenseai/realsense_mipi_platform_driver.git) repo.
39+
2. Checkout dev branch.
40+
3. The developers can set up build environment, ARM64 compiler, kernel sources and NVIDIA's Jetson git repositories by using the setup script.
41+
4. Apply patches for kernel drivers, nvidia-oot module and tegra devicetree.
42+
5. Build project
43+
6. Apply build results to target (Jetson).
44+
7. Configure target.
45+
46+
Assuming building for 7.1. One can also build for 7.0 just replace the last parameter.
47+
Build version can be specified only once. It will be written to jetpack_version.txt file and used for later steps.
48+
You can display the current version cating the file jetpack_version. It will be show at the beginning of each script.
49+
```
50+
git clone --branch dev --single-branch https://github.com/realsenseai/realsense_mipi_platform_driver.git
51+
cd realsense_mipi_platform_driver
52+
./setup_workspace.sh 7.1
53+
./apply_patches.sh
54+
./build_all.sh
55+
```
56+
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.
57+
```
58+
./build_all.sh --dev-dbg
59+
```
60+
61+
## Install kernel drivers, extra modules and device-tree to Jetson AGX Orin
62+
63+
Following steps required:
64+
65+
1. Copy build artifacts:
66+
If you build locally (native build on Jetson) use the following bash commands:
67+
```
68+
sudo cp -r ./images/7.1/rootfs/lib/modules/6.8.12-tegra /lib/modules/
69+
sudo cp ./images/7.1/rootfs/boot/tegra264-camera-d4xx-*.dtbo /boot/dev/
70+
sudo mv -f /boot/dev/Image /boot/dev/Image.old
71+
sudo cp ./images/7.1/rootfs/boot/Image /boot/dev/
72+
```
73+
In case of crossbuild on host prepare a tarball to ssh copy to Jetson target.
74+
Example user 'nvidia' on Jetson with host name 'jetson.domain'
75+
```
76+
tar czf rootfs.tar.gz -C images/7.1/rootfs boot lib
77+
scp rootfs.tar.gz nvidia@jetson.domain:
78+
```
79+
Log in into Jetson target, extract the tarball and install extracted files:
80+
```
81+
tar xf rootfs.tar.gz
82+
sudo cp -r ./lib/modules/6.8.12-tegra /lib/modules/
83+
sudo cp ./boot/tegra264-camera-d4xx-overlay-Advantech.dtbo /boot/
84+
sudo cp ./boot/Image /boot/dev/
85+
```
86+
2. Run $ `sudo /opt/nvidia/jetson-io/jetson-io.py`, to exit choose save & reboot:
87+
1. Configure Jetson AGX CSI Connector
88+
2. Configure for compatible hardware
89+
3. Choose appropriate configuration:
90+
i. Jetson RealSense Camera D457
91+
ii. Jetson RealSense Camera D457 dual
92+
5. Choose to save & reboot
93+
94+
3. Enable and run depmod scan for "extra" & "kernel" modules
95+
```
96+
# enable extra & kernel modules
97+
# original file content: cat /etc/depmod.d/ubuntu.conf -- search updates ubuntu built-in
98+
sudo sed -i 's/search updates/search extra updates kernel/g' /etc/depmod.d/ubuntu.conf
99+
# update driver cache
100+
sudo depmod
101+
```
102+
4.
103+
Verify bootloader configuration
104+
```
105+
cat /boot/extlinux/extlinux.conf
106+
----<CUT>----
107+
LABEL JetsonIO
108+
MENU LABEL Custom Header Config: <CSI Jetson RealSense Camera D457>
109+
LINUX /boot/dev/Image
110+
FDT /boot/dtb/kernel_tegra264-p4071-0000+p3834-0008-nv.dtb
111+
APPEND ${cbootargs} root=PARTUUID=bbb3b34e-......
112+
OVERLAYS /boot/tegra264-camera-d4xx-overlay.dtbo
113+
----<CUT>----
114+
```
115+
On Jetson target (user home folder) assuming backup step was followed:
116+
117+
118+
### Verify driver loaded - on Jetson:
119+
- Driver API manual page [Driver API page](./README_driver.md)
120+
121+
```
122+
nvidia@ubuntu:~$ sudo dmesg | grep tegra-capture-vi
123+
[ 9.357521] platform 13e00000.host1x:nvcsi@15a00000: Fixing up cyclic dependency with tegra-capture-vi
124+
[ 9.419926] tegra-camrtc-capture-vi tegra-capture-vi: ep of_device is not enabled endpoint.
125+
[ 9.419932] tegra-camrtc-capture-vi tegra-capture-vi: ep of_device is not enabled endpoint.
126+
[ 10.001170] tegra-camrtc-capture-vi tegra-capture-vi: subdev DS5 mux 9-001a bound
127+
[ 10.025295] tegra-camrtc-capture-vi tegra-capture-vi: subdev DS5 mux 12-001a bound
128+
[ 10.040934] tegra-camrtc-capture-vi tegra-capture-vi: subdev DS5 mux 13-001a bound
129+
[ 10.056151] tegra-camrtc-capture-vi tegra-capture-vi: subdev DS5 mux 14-001a bound
130+
[ 10.288088] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e00000.host1x:nvcsi@15a00000- bound
131+
[ 10.324025] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e00000.host1x:nvcsi@15a00000- bound
132+
[ 10.324631] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e00000.host1x:nvcsi@15a00000- bound
133+
[ 10.325056] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e00000.host1x:nvcsi@15a00000- bound
134+
135+
nvidia@ubuntu:~$ sudo dmesg | grep d4xx
136+
[ 9.443608] d4xx 9-001a: Probing driver for D45x
137+
[ 9.983168] d4xx 9-001a: ds5_chrdev_init() class_create
138+
[ 9.989521] d4xx 9-001a: D4XX Sensor: DEPTH, firmware build: 5.15.1.0
139+
[ 10.007813] d4xx 12-001a: Probing driver for D45x
140+
[ 10.013899] d4xx 12-001a: D4XX Sensor: RGB, firmware build: 5.15.1.0
141+
[ 10.025787] d4xx 13-001a: Probing driver for D45x
142+
[ 10.029095] d4xx 13-001a: D4XX Sensor: Y8, firmware build: 5.15.1.0
143+
[ 10.041282] d4xx 14-001a: Probing driver for D45x
144+
[ 10.044759] d4xx 14-001a: D4XX Sensor: IMU, firmware build: 5.15.1.0
145+
146+
```
147+
148+
### Known issues
149+
- Camera not recognized
150+
Verify I2C MUX detected. If "probe failed" reported, replace extension board adapter (LI-JTX1-SUB-ADPT).
151+
```
152+
nvidia@ubuntu:~$ sudo dmesg | grep pca954x
153+
[ 3.933113] pca954x 2-0072: probe failed
154+
```
155+
156+
- Configuration with jetson-io tool system fail to boot with message "couldn't find root partition"
157+
Verify bootloader configuration
158+
`/boot/extlinux/extlinux.conf`
159+
Sometimes configuration tool missing APPEND parameters. Duplicate `primary` section `APPEND` line to `JetsonIO` `APPEND` section, verify it's similar.
160+
161+
Example Bad:
162+
```
163+
LABEL primary
164+
MENU LABEL primary kernel
165+
LINUX /boot/Image
166+
INITRD /boot/initrd
167+
APPEND ${cbootargs} root=PARTUUID=634b7e44-aacc-4dd9-a769-3a664b83b159 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
168+
169+
LABEL JetsonIO
170+
MENU LABEL Custom Header Config: <CSI Jetson RealSense Camera D457 dual>
171+
LINUX /boot/Image
172+
FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0000-nv.dtb
173+
INITRD /boot/initrd
174+
APPEND ${cbootargs}
175+
OVERLAYS /boot/tegra234-camera-d4xx-overlay-dual.dtbo
176+
```
177+
Example Good:
178+
```
179+
LABEL primary
180+
MENU LABEL primary kernel
181+
LINUX /boot/Image
182+
INITRD /boot/initrd
183+
APPEND ${cbootargs} root=PARTUUID=634b7e44-aacc-4dd9-a769-3a664b83b159 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
184+
185+
LABEL JetsonIO
186+
MENU LABEL Custom Header Config: <CSI Jetson RealSense Camera D457 dual>
187+
LINUX /boot/dev/Image
188+
FDT /boot/dtb/kernel_tegra264-p4071-0000+p3834-0008-nv.dtb
189+
INITRD /boot/initrd
190+
APPEND ${cbootargs} root=PARTUUID=634b7e44-aacc-4dd9-a769-3a664b83b159 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
191+
OVERLAYS /boot/tegra264-camera-d4xx-overlay.dtbo
192+
```
193+
- Configuration tool jetson-io terminates without configuration menu.
194+
verify that `/boot/dtb` has only one dtb file
195+
```
196+
nvidia@ubuntu:~$ ls /boot/dtb/
197+
kernel_tegra264-p4071-0000+p3834-0008-nv.dtb
198+
```

0 commit comments

Comments
 (0)