Including custom camera driver and libcamera in yocto image for raspberry pi 4 raspberrypi


Dear Yocto community

I have a custom camera driver and device tree that I include in my Yocto build for a raspberry pi 4 along with Libcamera.

The camera module has been tested on a RPi with Raspbian OS and it works fine there. I have a custom camera_helper and tuning file, that also works as intended (tested using the Libcamera cam app to stream to display).

The camera module seems to be loaded correctly through the Yocto image on the raspberry pi 4, as it is listed using "lsmod" and video0 is also there using v4l2-ctl commands.

But using the cam app "cam -l" to list camera modules, it returns no camera modules are found. I include Libcamera as such:

IMAGE_INSTALL += "libcamera"

And I use an append file to copy my meson build file for the camera helper and tuning file along with the files themselves:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "file://camHelper/cam_helper_myCam.cpp \
file://camHelper/ \
file://tuningFile/myCam.json \

do_configure:append() {
cp ${WORKDIR}/camHelper/cam_helper_myCam.cpp ${S}/src/ipa/raspberrypi/
cp ${WORKDIR}/camHelper/ ${S}/src/ipa/raspberrypi/
cp ${WORKDIR}/tuningFile/myCam.json ${S}/src/ipa/raspberrypi/data/
cp ${WORKDIR}/tuningFile/ ${S}/src/ipa/raspberrypi/data/

I see that the files appear in the correct location in my build, but for some reason Libcamera doesn't find my camera device. Is there something I am missing in my configuration file?

Kind regards