Libcamera/kernel driver install error for AR0234 on Raspberry Pi

Hi all, I’m trying to get an Arducam AR0234 (B0353) working with libcamera on a Raspberry Pi. I started from a fresh Raspberry Pi OS image, ran sudo apt update && sudo apt -y upgrade, and rebooted before touching the Arducam scripts. I ran sudo ./install_pivariety_pkgs.sh -p libcamera and sudo ./install_pivariety_pkgs.sh -p libcamera_apps, and those seemed to finish without warnings or errors. But when I ran sudo ./install_pivariety_pkgs.sh -p kernel_driver, it fails with an error. I’ve attached a screenshot of the error. Any idea what’s going on?

Thanks for the details. Just to confirm: your camera is the AR0234 (B0353)? And when you ran the libcamera and libcamera_apps steps, did they complete cleanly, or did they only appear to? The kernel_driver step is separate from those packages, so it’s useful to know exactly where the error appears. If you can, paste the text from the error or tell us what the script says right before it stops.

Yes, it’s the AR0234 (B0353). I did the update/upgrade and reboot before running any of the Arducam scripts. sudo ./install_pivariety_pkgs.sh -p libcamera and sudo ./install_pivariety_pkgs.sh -p libcamera_apps both completed with no warnings or errors. Only the sudo ./install_pivariety_pkgs.sh -p kernel_driver step errors out. The screenshot I attached shows where it fails.

Okay, that matches what I expected. The B0353/AR0234 camera driver is already built into the Raspberry Pi kernel, so the separate kernel_driver installer is not needed and it errors because it’s trying to install a driver that’s already present or conflicts. You can skip that step entirely. Instead, add the device tree overlay manually:

  1. Run sudo nano /boot/config.txt
  2. Scroll to the bottom and add this line under the [all] section: dtoverlay=arducam-pivariety
  3. Save and reboot (sudo reboot).

After the reboot, libcamera should pick up the camera without the kernel_driver package. Let me know how it goes.

Okay so I tried it, but I think I only added dtoverlay=arducam (without the -pivariety part). It works now? I can see the camera with libcamera and I don’t get the install warnings anymore. Should I leave it as dtoverlay=arducam or change it to the full line?

Good to hear it’s working, but for the B0353 I’d still change it to dtoverlay=arducam-pivariety. The dtoverlay=arducam line may load a different or older overlay, and using the full pivariety overlay is the intended setting for this camera. Edit /boot/config.txt, set the line to dtoverlay=arducam-pivariety, save, and reboot again. Then run the libcamera/libcamera_apps install steps once more to confirm they complete cleanly.

Changed it to dtoverlay=arducam-pivariety and rebooted. sudo ./install_pivariety_pkgs.sh -p libcamera and sudo ./install_pivariety_pkgs.sh -p libcamera_apps both install without warnings or errors now. The sudo ./install_pivariety_pkgs.sh -p kernel_driver step still gives an error, but I’m skipping it like you said. Camera is working.

Perfect, that’s the expected behavior. For the B0353/AR0234, the kernel_driver step will keep erroring because the driver is already part of the Raspberry Pi kernel, so just ignore or skip it. The important part is the dtoverlay=arducam-pivariety line in /boot/config.txt plus a reboot. That’s the current workaround, and your libcamera/libcamera_apps installs are clean. There’s a related discussion here if you want more context: Libcamera-vid w/IMX462 doesn't adjust negative ev values - #27 by goam