Need help in enable configuration when compile Kernel module

耗尽温柔 提交于 2019-12-12 00:27:56

问题


I am using 3.10.x kernel tree. My kernel module needs config VIDEOBUF2.

That is defined in drivers/media/v4l2-core/Kconfig:

# Used by drivers that need Videobuf2 modules
config VIDEOBUF2_CORE
    select DMA_SHARED_BUFFER
    tristate

So I put 'CONFIG_VIDEOBUF2_CORE=y' in my Kernel config file and compile. From the Kconfig it has CONFIG_VIDEOBUF2_CORE has no dependency and I think adding CONFIG_VIDEOBUF2_CORE=y to my kernel config should work. I am modify the right kernel config file since I set other flags like CONFIG_VIDEO_DEV=y and that works.

The generated .config does not contain 'CONFIG_VIDEOBUF2_CORE=y'

and the compilation fails with a bunch of

undefined reference to `vb2_buffer_done'
undefined reference to `vb2_buffer_done'
undefined reference to `vb2_buffer_done'
undefined reference to `vb2_buffer_done'

I really appreciate if someone can help me with this.

Thank you.


回答1:


I cant directly comment on the subject as it requires 50 reputations to have this privilege. You can do : make ARCH = target_architecture CROSS_COMPILE = toolchain defconfig_file. This command execution will create a .config file in home directory of your kernel source. This file would contain default configuration for the peripherals on your target SOC ( I assume you have knowledge pertaining to defconfig files). Now if you wish to manipulate it and want to add your device support to it do : make menuconfig and you could add your device support by selecting configuration say like VIDEOBUF2_CORE in your case and then your kernel soure is ready to be compiled/cross-compiled. PS: Avoid editing .config file manually.



来源:https://stackoverflow.com/questions/21035150/need-help-in-enable-configuration-when-compile-kernel-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!