When building for the NX5 IO, the camera returns a dark image.
The same issue arises in the official Radxa OS image: docs.radxa.com/nx5/downloads
The IMX219 returns a dark image for the 5.10 kernel but this is solved in the 6.1 kernel.
To make the camera work with this yocto meta-layer, 3 changes were made:
- Change the device tree by adding the device tree overlay radxa-nx5-io-rpi-camera-v2-cam1.dts to the nx5 dts (0001-add-nx5-io-rpi-cam1.patch.txt)
- Revert the IMX219 driver: the driver in linux-6.1-stan-rkr4.1-buildroot does not work but the one in linux-6.1-stan-rkr1 does work which is the branch Radxa OS uses and where the camera works properly (0001-revert-imx219-driver.patch.txt)
- Kernel configuration changes: the same configuration is applied as the ones described in Radxa BSP - rk2312 which can be found in rk2312/0001-common/kconfig.conf, rk2312/0002-rockchip/kconfig.conf and rk2312/kconfig.conf and are applied in that order (note that these configs are set for linux-6.1-stan-rkr1 but here I use them for linux-6.1-stan-rkr4.1-buildroot)
This might be an issue with the rockchip ISP and/or how it connects to the camera?
Where should I begin trying to solve this? What resources can I consult?
Github issue: https://github.com/radxa/meta-rockchip/issues/25
Yocto build (kernel 6.1.84: linux-6.1-stan-rkr4.1-buildroot))
Radxa OS (kernel 6.1.43: presumably linux-6.1-stan-rkr1 as this is what the rk2312 build from the Radxa BSP uses, this version/branch does not properly build with Yocto)