Hey Everyone,
So I was digging into the config for the device-tree overlays and legacy settings recently trying to get one of the IMX477 ArduCam modules working with a Pi 4 and 5.
What I came up with after a significant amount of sniffing around and experimenting was this:
Please note; from what I found, it’s essential to perform this in order, otherwise your Pi may boot without a display or crash at boot. You can recover from it, but it’s quite tedious to do so.
-
The first step is to modify your
config.txt
file to change the default overlays that get created in your device-tree at boot time. You need to add the linedtoverlay=imx477
immediately underneath the line currently setting thedtoverlay=
(likely to vn3-kms-… or vn4-… depending on your version and defaults). Don’t remove that line. -
Next, you need to ensure that
camera_auto_detect=0
is in fact 0 and not 1 (else it seems to default to attempt to register cameras with the overlay for the official camera board automatically for any connected cameras), if the setting doesn’t exist, you can add it (within the same level asdisplay_auto_detect
) -
Finally, you need to enable legacy camera mode, it’s unintuitive, but you actually set it to zero to enable legacy on Bookworm, you can’t access this setting within the current
raspi-config
in terminal “GUI”. This is the command you need:sudo raspi-config nonint do_legacy 0
I’d also recommend running a sudo apt update && sudo apt upgrade -y
before rebooting just to ensure everything is up to date, from there you should be able to use it with the various libcamera
commands as usual.
In summary:
sudo nano /boot/firmware/config.txt
- change/add
camera_auto_detect=0
- add
dtoverlay=imx477
- save
-
Then
sudo raspi-config nonint do_legacy 0
-
sudo apt update && sudo apt upgrade -y && reboot
-
libcamera-hello
If you find your config is different (be sure you’re using an imx477, your camera board may well use a different overlay) please mention it here for others to find.