I finally got the camera working!
I cloned and followed all instructions in all 4 github repos in order: https://github.com/intel/ipu6-drivers
And in the first repo I chose option 3 to patch the kernel via dkms. Moreover, whenever I had to decide between ipu6 and ipu6ep, I picked ipu6ep.
Caveats:
After cloning https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api you need to checkout the branch icamerasrc_slim_api
And when following the instructions in this last repo
rpm -ivh --force --nodeps icamerasrc-*.rpm
did not work, as the rpm file was found in a subfolder:
rpm -ivh --force --nodeps rpm/icamerasrc-*.rpm
Also I created a file called runcamera.sh
in ~/bin
and added execution rights (chmod +x ./runcamera.sh
) with the final instructions copied from the zip file that is flying around in the lenovo forum:
sudo modprobe v4l2loopback card_label="Intel MIPI Camera" exclusive_caps=1
export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0/ && rm -rf ~/.cache/gstreamer1.0
DEVICE=$(v4l2-ctl --list-devices | grep platform:v4l2loopback -A 1 | tail -n 1 | xargs echo)
sudo -E gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov2740-uf ! video/x-raw,format=NV12,width=1280,height=720 ! v4l2sink device=${DEVICE}
This, of course, now needs to be run after each and every startup before any camera app is started.