The OV5640 has been updated to work on BPI-M64

How do I check to see if was applied? It is in the dts file. Will there be something under /sys/ that I can look at.

Do I need a kernel driver module? There isn’t an ov5640 driver module in compiled with the installed kernel. I have the kernel source tree installed, and there is an ov5640.c file (under /usr/src/linux-source-5.7.15-sunxi64/drivers/media/i2c/ov5640.c), but it looks like there isn’t an ov5640.ko file under /lib/modules/. Can I just compile this module on its own (without having to re-compile the whole kernel)?

If it is compiled as a module you have ov5640.ko, if built-in you don’t have it and you won’t see it in lsmod.

/boot has the kernel config file used to build the kernel, check if you have the following:

CONFIG_VIDEO_OV5640=m (as a module)

or

CONFIG_VIDEO_OV5640=y (built-in)

if not, you need to enable it and re-compile the kernel (only the kernel side).

The beauty of the dt overlays is that you don’t need to setup a kernel to build your dtb, the ugly is… how to debug it.

/sys/firmware/devicetree/base/

grep CONFIG_VIDEO_OV5640 /boot/config-5.7.15-sunxi64 returns nothing, so that suggests that the ov5640 driver is neither compiled in nor built as a module. I guess I need to build it as a module. I’d rather just rebuild it as a module, rather than rebuild the whole kernel.

Is there documentation somewhere on how to do that?

https://docs.armbian.com/Developer-Guide_Build-Options/

OK, I managed to build a kernel with the ov5640 driver built it. Still not working. I guess I might need a 5.8 dev kernel or need to tweek the overlay…