Skip to content

Commit fb01641

Browse files
authored
Merge pull request #153 from intel/update-branch
feat: gmsl d4xx with ipu6 support for mtl (#402)
2 parents bba280b + 4bb2366 commit fb01641

File tree

15 files changed

+291
-0
lines changed

15 files changed

+291
-0
lines changed

platforms/coreultra/mtluh/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Refer to the available use cases and examples below
4848
1. [Intel® Distribution of OpenVINO™ Toolkit](usecases/openvino/README.md)
4949
2. [Intel® Edge Software Hub](https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/edge-solutions/overview.html)
5050
3. [Ollama with Open WebUI on Intel® Discrete GPU](../../../usecases/ai/openwebui-ollama/README.md)
51+
4. [D457 GMSL Camera Enablement on Intel® Core™ Ultra Processor (Products formerly Meteor Lake-UH)](gmsl/d457/README.md)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Camera Hardware Setup
2+
3+
Refer to the image below for the GMSL AIC connection to the RSD457 camera and the platform.
4+
The connection and setup below are based on the Seavo* PIR-1014A AIoT Developer Kit.
5+
6+
- BIOS Version: M791A010
7+
8+
9+
<img src="images/GMSL_connection.png" alt="GMSL connection" width="300" height="200" align="left">
10+
11+
<br clear="left"/>
12+
13+
## BIOS Configuration
14+
15+
In your system’s BIOS, navigate to the **Advanced Settings** tab to start configuring the required settings.
16+
17+
**Step 1: Access MIPI Camera Settings**
18+
19+
In your system’s BIOS, navigate to the **System Agent (SA) Configuration**.
20+
Enable **IPU Device** and tab into **MIPI Camera Configuration**.
21+
22+
<img src="images/1.png" alt="BIOS Setting 1" width="300" height="200" align="left">
23+
24+
<br clear="left"/>
25+
26+
**Step 2: Enable Camera 1 Settings**
27+
28+
Locate the **Camera1** and **Camera2** section and click **Enabled**.
29+
30+
<img src="images/2.png" alt="BIOS Setting 2" width="300" height="200" align="left">
31+
32+
<br clear="left"/>
33+
34+
Go to the **Link options** of Camera1 section and adjust the settings as shown in the image below to enable the first camera.
35+
36+
<img src="images/3.png" alt="BIOS Setting 3" width="300" height="200" align="left">
37+
38+
<br clear="left"/>
39+
40+
<img src="images/4.png" alt="BIOS Setting 4" width="300" height="200" align="left">
41+
42+
<br clear="left"/>
43+
44+
**Step 3: Enable Camera 2 Settings**
45+
46+
Go to the **Link options** of Camera2 section and adjust the settings as shown in the image below to enable the second camera.
47+
48+
<img src="images/2.png" alt="BIOS Setting 2" width="300" height="200" align="left">
49+
50+
<br clear="left"/>
51+
52+
<img src="images/5.png" alt="BIOS Setting 5" width="300" height="200" align="left">
53+
54+
<br clear="left"/>
55+
56+
<img src="images/6.png" alt="BIOS Setting 6" width="300" height="200" align="left">
57+
58+
<br clear="left"/>
59+
60+
**Step 4: Save and Exit**
61+
62+
Once all settings are configured correctly, navigate to the **Save & Exit** tab and select **Save Changes and Reset** to apply the new BIOS settings.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# D457/GMSL Camera Enablement
2+
3+
#### Validated Hardware
4+
- [Seavo* PIR-1014A AIoT Developer Kit](https://www.seavo.com/en/pir_devkit/) with [Intel® RealSense™ Depth Camera D457](https://www.intelrealsense.com/depth-camera-d457/)
5+
- [Advantech AFE-R360](https://www.advantech.com/en/products/8d5aadd0-1ef5-4704-a9a1-504718fb3b41/afe-r360/mod_1e4a1980-9a31-46e6-87b6-affbd7a2cb44) with [Advantech MIOe-GMSL](https://www.advantech.com/en/products/8d5aadd0-1ef5-4704-a9a1-504718fb3b41/mioe-mipi/mod_3c2c8e79-1891-4d38-83f7-8c6e209e7aab) with [Intel® RealSense™ Depth Camera D457](https://www.intelrealsense.com/depth-camera-d457/)
6+
7+
8+
## Prerequisites
9+
10+
- Camera hardware and BIOS configured. Refer to [BIOS Setup for MTL GMSL D457](./BIOS_README.md)
11+
- Ubuntu* 22.04 or Ubuntu 24.04* installed.
12+
13+
## Quick Start
14+
15+
The steps below are tested for Ubuntu 24.04*.
16+
17+
If you are using Ubuntu 22.04* refer to [ECI 3.3 Release for GMSL on MTL](https://eci.intel.com/docs/3.3/development/tutorials/enable-gmsl.html#intel-gmsl-intel-ipu6-debian-kernel-modules-dkms) to get started.
18+
19+
1. Download the [GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB](https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB) and [GPG-PUB-KEY-INTEL-ECI.gpg](https://eci.intel.com/repos/gpg-keys/GPG-PUB-KEY-INTEL-ECI.gpg)
20+
21+
2. Run below script to install IPU6 DKMS via ECI.
22+
```
23+
cd edge-developer-kit-reference-scripts/platforms/coreultra/mtluh/camera/d457
24+
./gmsl.sh
25+
```
26+
27+
3. Run below command after installation completed.
28+
```
29+
source /opt/ros/jazzy/setup.bash
30+
```
31+
4. Ensure camera enumerated successfully. In this case only 1 camera connected.
32+
```
33+
sudo rs-enum.sh -n
34+
```
35+
![rs-enum](./images/rs-enum.png)
36+
37+
5. Change mux link frequency to 720 MHz for the connected camera by referring to 'RS LINK' from above command.
38+
```
39+
sudo v4l2-ctl --set-ctrl v4l2_cid_link_freq=6 -d $(media-ctl -e "DS5 mux e")
40+
sudo dmesg | grep V4L2_CID_LINK_FREQ
41+
v4l2-ctl -l -d $(media-ctl -e "DS5 mux e")
42+
```
43+
![dlink](./images/dlink.png)
44+
45+
6. Manually bind V4L2 Media Controller on all Intel® RealSense™ Depth Camera D457 GMSL muxes available on the system.
46+
```
47+
rs_ipu6_d457_bind.sh -n -m e
48+
rs-enum.sh -n -m e
49+
```
50+
![binded](./images/binded.png)
51+
52+
7. Run rs-multicam for streaming.
53+
```
54+
rs-multicam
55+
```
56+
![stream](./images/stream.png)
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/bin/bash
2+
# Copyright (C) 2025 Intel Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
set -e
6+
7+
test(){
8+
rm -rf wget*
9+
sudo rm /usr/share/keyrings/oneapi-archive-keyring.gpg
10+
sudo rm /etc/apt/sources.list.d/oneAPI.list
11+
sudo rm /etc/apt/preferences.d/oneapi
12+
sudo rm /usr/share/keyrings/ros-archive-keyring.gpg
13+
lsmod | grep intel_ipu6
14+
sudo rmmod intel_ipu6 intel_ipu6_psys intel_ipu6_isys
15+
sudo apt purge ros-jazzy-librealsense2-tools
16+
}
17+
18+
verify_os() {
19+
echo -e "\n# Verifying operating system"
20+
if [ ! -e /etc/os-release ]; then
21+
echo "Error: /etc/os-release file not found"
22+
exit 1
23+
fi
24+
VERSION_CODENAME=$(grep -E '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2- | tr -d '"')
25+
}
26+
27+
setup_eci_ros() {
28+
echo -e "Setting up ECI apt repository..."
29+
sudo gpg --output /etc/apt/trusted.gpg.d/oneapi-archive-keyring.gpg --dearmor GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
30+
sudo gpg --output /usr/share/keyrings/eci-archive-keyring.gpg --dearmor GPG-PUB-KEY-INTEL-ECI.gpg
31+
verify_os
32+
echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/${VERSION_CODENAME} isar main" | sudo tee /etc/apt/sources.list.d/eci.list
33+
echo "deb-src [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/${VERSION_CODENAME} isar main" | sudo tee -a /etc/apt/sources.list.d/eci.list
34+
sudo bash -c 'echo -e "Package: *\nPin: origin eci.intel.com\nPin-Priority: 1000" > /etc/apt/preferences.d/isar'
35+
sudo bash -c 'echo -e "\nPackage: libflann*\nPin: version 1.19.*\nPin-Priority: -1\n\nPackage: flann*\nPin: version 1.19.*\nPin-Priority: -1" >> /etc/apt/preferences.d/isar'
36+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
37+
sudo bash -c 'echo -e "Package: intel-oneapi-runtime-*\nPin: version 2024.1.*\nPin-Priority: 1001" > /etc/apt/preferences.d/oneapi'
38+
# add signed entry to APT sources and configure the APT client to use OpenVINO repository:
39+
sudo bash -c 'echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/openvino/2023 ubuntu22 main" > /etc/apt/sources.list.d/intel-openvino-2023.list'
40+
sudo bash -c 'echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/openvino/2024 ubuntu22 main" > /etc/apt/sources.list.d/intel-openvino-2024.list'
41+
echo -e "Setting up ROS Humble apt repository..."
42+
# download the key to system keyring
43+
sudo -E wget -O- https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo tee /usr/share/keyrings/ros-archive-keyring.gpg > /dev/null
44+
# add signed entry to APT sources and configure the APT client to use ROS repository:
45+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu ${VERSION_CODENAME} main" | sudo tee /etc/apt/sources.list.d/ros2.list
46+
echo "Setting up ROS Humble apt repository..."
47+
sudo apt update
48+
}
49+
50+
enable_igc() {
51+
# Update GRUB configuration
52+
sudo sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/"$/ i915.enable_guc=3"/' /etc/default/grub.d/09_eci-default.cfg
53+
sudo update-grub
54+
# Install linux-firmware
55+
sudo apt install -y linux-firmware
56+
# Prompt to reboot the system
57+
echo "Please reboot the system and rerun the script."
58+
59+
# Check for i915 messages in dmesg after reboot
60+
if dmesg | grep -q 'i915.*GUC: submission enabled'; then
61+
echo "i915 messages found, no need to reboot."
62+
else
63+
# Reinstall linux-firmware and prompt to reboot again
64+
sudo apt install -y linux-firmware
65+
echo "Please reboot the system and rerun the script."
66+
fi
67+
}
68+
69+
install_ipu6() {
70+
echo -e "\n Install Linux headers and intel_ipu6 DKMS Debian packages.."
71+
sudo apt install linux-firmware
72+
sudo apt install -y pahole "linux-headers-$(uname -r)" intel-ipu6-dkms
73+
74+
# Check DKMS status
75+
DKMS_STATUS="$(dkms status | grep 'ipu6-drivers')" # Quote the assignment
76+
77+
if echo "$DKMS_STATUS" | grep -q 'installed'; then
78+
echo "DKMS driver installed successfully."
79+
sudo usermod -a -G video "$USER"
80+
sudo usermod -a -G render "$USER"
81+
else
82+
echo "DKMS driver install incomplete. Attempting to force install the DKMS driver."
83+
# Force install the DKMS driver
84+
sudo dkms install --force ipu6-drivers/20240118+iotgipu6-0eci*
85+
86+
# Re-check DKMS status
87+
DKMS_STATUS="$(dkms status | grep 'ipu6-drivers')" # Quote again
88+
89+
if echo "$DKMS_STATUS" | grep -q 'installed'; then
90+
echo "DKMS driver installed successfully after force install."
91+
sudo usermod -a -G video "$USER"
92+
sudo usermod -a -G render "$USER"
93+
else
94+
echo "DKMS driver install failed. Please check the installation logs and try again."
95+
return 1
96+
fi
97+
fi
98+
}
99+
100+
ros2_setup() {
101+
echo "Enable ROS2 Intel® RealSense™ Depth Camera D457 GMSL"
102+
echo "Installing ROS2 Jazzy Jalisco for Ubuntu 24.04"
103+
104+
# Install ros-jazzy-librealsense2-tools
105+
if sudo apt install -y ros-jazzy-librealsense2-tools; then
106+
echo "ros-jazzy-librealsense2-tools installed successfully."
107+
return
108+
fi
109+
110+
echo "Encountered dependency issue. Attempting to resolve..."
111+
check_available_versions
112+
install_highest_version
113+
114+
# Retry installing ros-jazzy-librealsense2-tools
115+
if ! sudo apt install -y ros-jazzy-librealsense2-tools; then
116+
echo "Failed to install ros-jazzy-librealsense2-tools. Please check the dependencies and try again."
117+
exit 1
118+
fi
119+
120+
echo "Ensure system-udevd daemon Intel® RealSense™ ROS2 rules exist"
121+
# cat /lib/udev/rules.d/99-realsense-d4xx-mipi-dfu.rules
122+
}
123+
124+
check_available_versions() {
125+
echo "Checking available versions of ros-jazzy-librealsense2..."
126+
apt-cache policy ros-jazzy-librealsense2
127+
}
128+
129+
install_highest_version() {
130+
REQUIRED_VERSION=$(apt-cache madison ros-jazzy-librealsense2 | awk '{print $3}' | sort -V | tail -n 1)
131+
echo "Highest available version of ros-jazzy-librealsense2 is $REQUIRED_VERSION"
132+
133+
echo "Installing ros-jazzy-librealsense2 version $REQUIRED_VERSION..."
134+
if ! sudo apt install -y "ros-jazzy-librealsense2=$REQUIRED_VERSION"; then
135+
echo "Failed to install ros-jazzy-librealsense2 version $REQUIRED_VERSION. Please check the repository and try again."
136+
exit 1
137+
fi
138+
139+
verify_installation
140+
}
141+
142+
verify_installation() {
143+
if dpkg -l | grep -q "ros-jazzy-librealsense2.*$REQUIRED_VERSION"; then
144+
echo "ros-jazzy-librealsense2 version $REQUIRED_VERSION installed successfully."
145+
else
146+
echo "Failed to install ros-jazzy-librealsense2 version $REQUIRED_VERSION. Please check the repository and try again."
147+
exit 1
148+
fi
149+
}
150+
151+
kernel_print () {
152+
sudo dmesg -n 7
153+
sudo modprobe intel-ipu6-isys
154+
sudo dmesg | grep -e ipu6 -e d4xx -e max929
155+
# Check dmesg for IPU6 errors
156+
if sudo dmesg | grep -q -e "FW authentication failed(-5)"; then
157+
echo "FW authentication failed(-5) error found. Please replace firmware..."
158+
exit 1
159+
# Define the directory for cloning the repository
160+
else
161+
echo "No FW authentication error found in dmesg."
162+
fi
163+
}
164+
165+
main() {
166+
#test
167+
setup_eci_ros
168+
install_ipu6
169+
ros2_setup
170+
kernel_print
171+
}
172+
main
717 KB
Loading
612 KB
Loading
713 KB
Loading
744 KB
Loading
710 KB
Loading
740 KB
Loading

0 commit comments

Comments
 (0)