Arducam 64MP camera not detected by libcamera-still on Raspberry Pi CM4 after building from source

Hi everyone, I’m trying to get an Arducam 64MP Hawk Eye working on my Raspberry Pi and I’m a bit stuck. I built libcamera and libcamera-apps from source and installed them, but when I run libcamera-still --list-cameras it just returns:

No cameras available!

My environment:

  • Hardware Revision: b03140
  • Kernel Version: 6.1.19-v8+
  • OS codename: bookworm (though I’ve also seen a bullseye-arm64 reference in one of the package errors)
  • ARCH: aarch64
  • uname -a: Linux raspberrypi 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux

I also have the CM4 config sections present in my config. Any idea what I’m missing?

Can you paste your /boot/config.txt and the output of dmesg | grep 64mp? With these Hawk Eye cameras the kernel driver and the device tree overlay both need to line up, so I want to see which overlay you’re actually loading.

Sure. Here’s /boot/config.txt:

dtparam=i2c_arm=on
camera_auto_detect=1
display_auto_detect=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
arm_64bit=1
disable_overscan=1
[cm4]: otg_mode=1; dtoverlay=arducam-64mp; dtoverlay=arducam-64mp,cam1
[all]: dtoverlay=vc4-kms-v3d,cma-512
[all]: dtoverlay=arducam_64mp

And dmesg | grep 64mp gives:

[    0.079870] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/arducam_64mp@1a
[    7.147610] arducam_64mp 10-001a: Device found Arducam 64MP.
[    7.159263] arducam_64mp 10-001a: Consider updating driver arducam_64mp to match on endpoints

So the hardware is at least being seen by the kernel, but libcamera still reports no cameras.

I see the problem. In your [all] section you wrote dtoverlay=arducam_64mp with an underscore. The correct overlay name uses a hyphen: dtoverlay=arducam-64mp. The underscore version doesn’t match the actual overlay, which is why libcamera can’t enumerate the camera even though dmesg shows Device found Arducam 64MP.

The Consider updating driver arducam_64mp to match on endpoints line is a warning, not the main blocker here. Also, did you try running the extra kernel driver install script? That’s usually not needed if the driver is already present.

Yeah, I did try that. I ran:

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
/install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver

and got:

Cannot find the corresponding package, please send the following information to [email protected]
Hardware Revision: b03140
Kernel Version: 6.1.19-v8+
Package: 64mp_pi_hawk_eye_kernel_driver – bullseye-arm64
You are using an unsupported kernel version, please install the official SD Card image(do not execute rpi-update)

An earlier attempt to install libcamera_apps also failed with:

Package: libcamera_apps_new -- bookworm-arm64-v5 (unsupported kernel version)

So I wasn’t sure whether I’m actually on an unsupported kernel or what.

That unsupported kernel version message is a bit of a red herring for your situation. The 64MP driver is already loaded — that’s exactly what the arducam_64mp 10-001a: Device found Arducam 64MP. dmesg line is telling you. So you don’t need to run install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver at all; don’t run that extra driver install.

What you do need:

  1. Fix the overlay line in /boot/config.txt to dtoverlay=arducam-64mp (hyphen) under [all].
  2. Reboot the Pi.
  3. Make sure you have the Arducam libcamera build for the 64MP camera, not a plain build from upstream repos.

That last point matters a lot: if you built libcamera from the official libcamera repository and libcamera-apps from the raspberrypi repository, that’s the wrong source for this camera. You need to build from ArduCAM’s GitHub source instead.

Ah, that explains a lot. I did build from the official libcamera repo and the raspberrypi repo, so I’ll switch to the ArduCAM source. Let me fix the overlay first: add dtoverlay=arducam-64mp under [all], reboot, then compile and install libcamera/libcamera-apps from the ArduCAM GitHub repos.

That’s the right plan. To summarize the conclusion so far:

  • The blocker was dtoverlay=arducam_64mp in /boot/config.txt. The correct name is dtoverlay=arducam-64mp (hyphen, not underscore). Add it under [all].
  • Do not run /install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver — the driver is already present, and the unsupported kernel version error for 6.1.19-v8+ isn’t relevant to this setup.
  • You still need the Arducam libcamera/libcamera-apps built from ArduCAM’s GitHub source for the 64MP camera; upstream official repos won’t detect it.

Steps:

sudo nano /boot/config.txt
# add under [all]: dtoverlay=arducam-64mp
# save and reboot

Then build/install from the ArduCAM source and run libcamera-still --list-cameras again. The Consider updating driver arducam_64mp to match on endpoints dmesg warning can stay on your radar, but the overlay fix is what should make libcamera detect the camera.