当前位置: 技术问答>linux和unix
如何在内核里面编译的时候添加设备驱动
来源: 互联网 发布时间:2016-11-16
本文导语: 我用的是DM368的板子,现在我要添加一个基于tvp5146的驱动,程序里面已经有这个模块的了,我只要把这个模块编译到内核里面去就可以了,Kconfig如下所示: config VIDEO_TVP5146 tristate "TVP5146 video decoder" depends ...
我用的是DM368的板子,现在我要添加一个基于tvp5146的驱动,程序里面已经有这个模块的了,我只要把这个模块编译到内核里面去就可以了,Kconfig如下所示:
config VIDEO_TVP5146
tristate "TVP5146 video decoder"
depends on I2C
help
Support for I2C bus based TVP5146 configuration.
To compile this driver as a module, choose M here: the
module will be called tvp5146.
我把i2c的所有驱动都编译到内核里面去了,把 VIDEO_TVP5146也放到内核里面去了,编译的时候报错了,错误信息如下:
不知道这个是为什么 ,请高手指点,是不是我还有什么操作没有做?????
root@ubuntu:/home/xiaotao/DM368/IPNetCam/ipnc/ti-davinci# make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CHK include/linux/compile.h
GEN .version
CHK include/linux/compile.h
LD .tmp_vmlinux1
drivers/built-in.o: In function `tvp514x_setcontrol':
davinci-mmc.c:(.text+0x3bdd0): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_querystd':
davinci-mmc.c:(.text+0x3c018): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_setstd':
davinci-mmc.c:(.text+0x3c2d0): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_getcontrol':
davinci-mmc.c:(.text+0x3c6ec): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_getinput':
davinci-mmc.c:(.text+0x3cbcc): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o:davinci-mmc.c:(.text+0x3cd60): more undefined references to `tvp514x_set_input_mux' follow
drivers/built-in.o: In function `tvp514x_i2c_init':
davinci-mmc.c:(.text+0x3d618): undefined reference to `tvp514x_get_evm_chan_config'
davinci-mmc.c:(.text+0x3d624): undefined reference to `tvp514x_get_evm_chan_config'
davinci-mmc.c:(.text+0x3d87c): undefined reference to `vpif_register_decoder'
davinci-mmc.c:(.text+0x3d8c4): undefined reference to `vpif_unregister_decoder'
drivers/built-in.o: In function `tvp514x_i2c_cleanup':
davinci-mmc.c:(.text+0x3da68): undefined reference to `vpif_unregister_decoder'
make: *** [.tmp_vmlinux1] Error 1
config VIDEO_TVP5146
tristate "TVP5146 video decoder"
depends on I2C
help
Support for I2C bus based TVP5146 configuration.
To compile this driver as a module, choose M here: the
module will be called tvp5146.
我把i2c的所有驱动都编译到内核里面去了,把 VIDEO_TVP5146也放到内核里面去了,编译的时候报错了,错误信息如下:
不知道这个是为什么 ,请高手指点,是不是我还有什么操作没有做?????
root@ubuntu:/home/xiaotao/DM368/IPNetCam/ipnc/ti-davinci# make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CHK include/linux/compile.h
GEN .version
CHK include/linux/compile.h
LD .tmp_vmlinux1
drivers/built-in.o: In function `tvp514x_setcontrol':
davinci-mmc.c:(.text+0x3bdd0): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_querystd':
davinci-mmc.c:(.text+0x3c018): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_setstd':
davinci-mmc.c:(.text+0x3c2d0): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_getcontrol':
davinci-mmc.c:(.text+0x3c6ec): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o: In function `tvp514x_getinput':
davinci-mmc.c:(.text+0x3cbcc): undefined reference to `tvp514x_set_input_mux'
drivers/built-in.o:davinci-mmc.c:(.text+0x3cd60): more undefined references to `tvp514x_set_input_mux' follow
drivers/built-in.o: In function `tvp514x_i2c_init':
davinci-mmc.c:(.text+0x3d618): undefined reference to `tvp514x_get_evm_chan_config'
davinci-mmc.c:(.text+0x3d624): undefined reference to `tvp514x_get_evm_chan_config'
davinci-mmc.c:(.text+0x3d87c): undefined reference to `vpif_register_decoder'
davinci-mmc.c:(.text+0x3d8c4): undefined reference to `vpif_unregister_decoder'
drivers/built-in.o: In function `tvp514x_i2c_cleanup':
davinci-mmc.c:(.text+0x3da68): undefined reference to `vpif_unregister_decoder'
make: *** [.tmp_vmlinux1] Error 1
|
makfile,Kconfig都要改