I get the following errors when trying to compile the kernel
ld: drivers/media/platform/mxc/capture/mx6s_capture.o: in function `mx6s_csi_open':
mx6s_capture.c:(.text+0x1ccd): undefined reference to `vb2_dma_contig_memops'
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make: *** [Makefile:1255: vmlinux] Error 2
I've added CONFIG_VIDEOBUF2_DMA_CONTIG=y to my .config file, but after running make, that config option is deleted
After some digging, I've narrowed it down to the make -f ./Makefile syncconfig command that gets run very early on in the make process
I believe there must be some dependency issues that are resulting in this being excluded
If I manually change the Makefile at drivers/media/v4l2-core/Makefile to obj-y += videobuf-dma-contig.o it compiles just fine
First, make sure that you included all dependencies for this option, because even though you can compile that driver by hands it hardly worth the risk to break your hardware.
Looking at the picture above (
make menuconfig->/->VIDEOBUF2_DMA_CONTIG) you can see thatVIDEOBUF2_DMA_CONTIGdepends onMEDIA_SUPPORT, so you should enable that first of all and all its dependencies (you can search for them the same way as forVIDEOBUF2_DMA_CONTIG).Once you enabled
MEDIA_SUPPORTyou can see thatVIDEOBUF2_DMA_CONTIGis still disabled. That is because it is notmenuconfigoption, it is just a config (you can check that indrivers/media/common/videobuf2/Kconfig), that means it must be selected by something else and it cannot be enabled just for free, because it will look like you have food (feature), but don't have something (driver/user) to take it.If you see your option (
VIDEOBUF2_DMA_CONTIG) disabled -- enable something that will use it (enumerated bySelected by [y]:list). In my case this can beVIDEO_SOLO6X10and maybe in your case too, (not sure what your driver is) orVIDEO_TW5864, etc.Once, you resolved all those dependencies you will see your config option enabled. I'm not sure if there's some useful tool that can do all this work, anyway I haven't found that yet :(