Skip to content

Commit 3687d77

Browse files
authored
Add arducam overlay
1 parent d0a86ff commit 3687d77

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

docs/100-hardware/raspi5_knowledgebase.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,74 +9,91 @@ This repository contains our knowledge base on Raspberry Pi 5.
99
# Camera firmware issues
1010

1111
For cameras based on `ov9281` connected via the MIPI port, such as the Arducam UC-599 Rev-B, you need to set up explicit firmware overlay. This is set up in `/boot/firmware/config.txt`. You need to disable automatic detection of cameras by commenting out or setting to `0` the line:
12+
1213
```
1314
camera_auto_detect=1
1415
```
16+
1517
and adding the following lines into the `[all]` section:
18+
1619
```
1720
dtoverlay=ov9281
1821
dtoverlay=ov9281,cam0
1922
dtoverlay=ov9281,cam1
2023
```
21-
The `cam#` lines set the camera to be detectable on both the MIPI ports.
24+
25+
The `cam#` lines set the camera to be detectable on both the MIPI ports. The [arducam docs](https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/Global-Shutter/1MP-OV9281-OV9282/#raspberry-pi-5-cm5) specify that `arducam` should also be added, like this:
26+
27+
```
28+
dtoverlay=ov9281,arducam
29+
dtoverlay=ov9281,cam0,arducam
30+
dtoverlay=ov9281,cam1,arducam
31+
```
2232

2333
It may also be necessary to comment out the line
34+
2435
```
2536
dtoverlay=arducam-pivariety
2637
```
2738

2839
## Warning
2940

30-
Do not install the `vcdbg` package - it will remove the overlays needed for MIPI camera use.
31-
It seems that the package is currently only compatible with older versions of the Raspberry Pi.
32-
If you did this, remove all packages that were installed with `vcdbg` and reinstall `raspi-firmware`.
41+
Do not install the `vcdbg` package - it will remove the overlays needed for MIPI camera use. It seems that the package is currently only compatible with older versions of the Raspberry Pi. If you did this, remove all packages that were installed with `vcdbg` and reinstall `raspi-firmware`.
3342

3443
# Using GPU acceleration in Singularity/Apptainer
3544

36-
By default, the Ubuntu 20.04 Singularity image we use to run ROS on the device has older MESA drivers that do not support hardware acceleration on the onboard Broadcom V3D 7.1 GPU.
37-
This can be overcome by manually adding a non-official ppa to upgrade the drivers in Singularity.
45+
By default, the Ubuntu 20.04 Singularity image we use to run ROS on the device has older MESA drivers that do not support hardware acceleration on the onboard Broadcom V3D 7.1 GPU. This can be overcome by manually adding a non-official ppa to upgrade the drivers in Singularity.
3846

3947
First, you need an overlay with enough space - at least 2GB should do it. If you already have an overlay image file that is too small, you can expand it using:
48+
4049
```
4150
e2fsck -f overlay.img
4251
resize2fs overlay.img 2000M
4352
```
53+
4454
Next, load up the Singularity container with root privileges using
55+
4556
```
4657
sudo ./wrapper.sh
4758
```
59+
4860
and when inside do the following:
61+
4962
```
5063
sudo apt-get install software-properties-common # adds the missing add-apt-repository command
5164
chmod 1777 /tmp # necessary, since adding the ppa will be making temporary files here and by default it is not writable in the container
5265
add-apt-repository ppa:kisak/kisak-mesa # press Enter when prompted
5366
sudo apt install libglx-mesa0 libgl1-mesa-dri
5467
```
55-
This should have upgraded the MESA drivers to the newest version.
56-
Lastly, note that the V3D 7.1 GPU only supports GLSL 3.10 - if you are using a shader that explicitly requires a newer version, try manually rewriting the requirement in the code, it may work. If not, you may be out of luck.
68+
69+
This should have upgraded the MESA drivers to the newest version. Lastly, note that the V3D 7.1 GPU only supports GLSL 3.10 - if you are using a shader that explicitly requires a newer version, try manually rewriting the requirement in the code, it may work. If not, you may be out of luck.
5770

5871
# Using WiringPi in Singularity/Apptainer
5972

60-
In order to control the GPIO pins inside of 20.04 Ubuntu Singularity image, you need to install an up-to-date version of the library inside the container.
61-
These steps worked for me:
73+
In order to control the GPIO pins inside of 20.04 Ubuntu Singularity image, you need to install an up-to-date version of the library inside the container. These steps worked for me:
6274

6375
1. Enter the wrapper with `sudo`
6476
2. Download new versions of `autoconf` and `autoconf-archive`:
77+
6578
```
6679
wget ftp.de.debian.org/debian/pool/main/a/autoconf/autoconf_2.71-3_all.deb
6780
wget ftp.de.debian.org/debian/pool/main/a/autoconf-archive/autoconf-archive_20220903-3_all.deb
6881
dpkg -i ./autoconf*deb
6982
```
70-
4. Build and install `libgpiod`:
83+
84+
3. Build and install `libgpiod`:
85+
7186
```
7287
git clone https://github.com/brgl/libgpiod.git
7388
cd libgpiod
7489
./autogen.sh --enable-tools=yes --prefix=/usr
7590
make
7691
make install
7792
```
78-
5. Copy (and replace if there is one already) `libgpoiod/lib/uapi/gpio.h` from the git directory to `/usr/include/linux/`
79-
6. Build and install new `WiringPi`:
93+
94+
4. Copy (and replace if there is one already) `libgpoiod/lib/uapi/gpio.h` from the git directory to `/usr/include/linux/`
95+
5. Build and install new `WiringPi`:
96+
8097
```
8198
git clone https://github.com/WiringPi/WiringPi.git
8299
cd WiringPi

0 commit comments

Comments
 (0)