-
Notifications
You must be signed in to change notification settings - Fork 14
Pre‐Compiled on Raspberry Pi ZeroW2 Installation Guide
What is annoying on RPI Zero W2 is that there is not enough memory to compile the entire libcamera, such that the original setup guide won't work well enough (you can increase the swap and lower the parallel compile number but it is going to take ages to finish). So here is the guide with precompiled package. Note that this is still in beta.
sudo apt update
sudo apt install -y git libevent-2.1-7 libevent-pthreads-2.1-7 libqt6core6 libqt6gui6 libqt6opengl6 libqt6openglwidgets6 libqt6widgets6 libsdl2-2.0-0
wget https://archive.raspberrypi.org/debian/pool/main/r/rpicam-apps/rpicam-apps-lite_1.6.0-2_arm64.deb
wget https://github.com/will127534/libcamera/releases/download/IMX294/libcamera-ipa_0.4.0+rpt20250213-1_arm64.deb
wget https://github.com/will127534/libcamera/releases/download/IMX294/libcamera-tools_0.4.0+rpt20250213-1_arm64.deb
wget https://github.com/will127534/libcamera/releases/download/IMX294/libcamera0.4_0.4.0+rpt20250213-1_arm64.deb
wget https://github.com/will127534/libcamera/releases/download/IMX294/python3-libcamera_0.4.0+rpt20250213-1_arm64.deb
sudo dpkg -i ./*.deb
First, install the necessary tools (linux-headers
, dkms
, and git
):
sudo apt install -y linux-headers dkms git
Clone the repository to your local pi, navigate to the cloned directory and install it:
cd ~
git clone https://github.com/will127534/imx585-v4l2-driver.git
cd imx585-v4l2-driver/
./setup.sh
Edit the boot configuration file using the following command:
sudo nano /boot/firmware/config.txt
In the opened editor, locate the line containing camera_auto_detect
and change its value to 0
. Then, add the line dtoverlay=imx585,2lane
. So, it will look like this:
camera_auto_detect=0
dtoverlay=imx585,2lane
Run the following command to reboot the Raspberry Pi:
sudo reboot
Once the Raspberry Pi has rebooted, open a terminal window and run the following command to test the camera:
rpicam-still -r -o test.jpg -f -t 0
If you want to run it through SSH terminal and see the preview on a HDMI monitor like me, you can use:
export DISPLAY=:0; rpicam-still -r -o test.jpg -f -t 0
Enable I2C in raspi-config with sudo raspi-config
Install smbus python package with sudo apt install python3-smbus
Check the following page for IR filter control script: https://github.com/will127534/StarlightEye/blob/main/software/README.md
Note that you need to append the cmd with --i2c-bus 10