当前位置: 技术问答>linux和unix
求助!!急!!EXPORT_SYMBOL_GPL 无效问题!!请各位高手入!!
来源: 互联网 发布时间:2016-12-15
本文导语: 本帖最后由 cityofgod 于 2010-04-28 18:11:22 编辑 问题:移植spidriver时编译内核出现 ERROR: "s3c_gpio_setpull" [drivers/spi/spi_sam.ko] undefined! ERROR: "s3c_gpio_cfgpin" [drivers/spi/spi_sam.ko] undefined!错误,请问如何解? 平台:s3c6410,Linux...
ERROR: "s3c_gpio_setpull" [drivers/spi/spi_sam.ko] undefined!
ERROR: "s3c_gpio_cfgpin" [drivers/spi/spi_sam.ko] undefined!错误,请问如何解?
平台:s3c6410,Linux version 2.6.27,Android1.5
起因移植Samsung的SPIdriver spi_sam.c 和 spi_sam.h 过来时,将内核Meuconfig的SPIdriver配置成,将要移植的spi_sam.c,spi_sam.h copy到/drivers/spi 下后,并在spi_sam.c 中添加#include
进行make
出现如下信息:
root@ubuntu:/usr/src/android-1.5# make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
:1097:2: warning: #warning syscall fadvise64 not implemented
:1265:2: warning: #warning syscall migrate_pages not implemented
:1321:2: warning: #warning syscall pselect6 not implemented
:1325:2: warning: #warning syscall ppoll not implemented
:1365:2: warning: #warning syscall epoll_pwait not implemented
CHK include/linux/compile.h
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 8 modules
ERROR: "s3c_gpio_setpull" [drivers/spi/spi_sam.ko] undefined!
ERROR: "s3c_gpio_cfgpin" [drivers/spi/spi_sam.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
请问以上两个错误是什么原因?
其中s3c_gpio_setpull,s3c_gpio_cfgpin,都在gpio-config.c中定义(编译时生成了.o档),并添加了代码
EXPORT_SYMBOL_GPL(s3c_gpio_setpull);
EXPORT_SYMBOL_GPL(s3c_gpio_cfgpin);
请各位帮忙看看是什么问题,多谢,多谢啦~~
menuconfig:
--- SPI support
[*] Debug support for SPI drivers
*** SPI Master Controller Drivers ***
{M} Bitbanging SPI master
Parallel port adapter for AVR Butterfly (DEVELOPMENT)
Parallel port adapter for LM70 eval board (DEVELOPMENT)
S3C6410 SPI Driver
SPI Source Clock (PCLK) --->
*** SPI Protocol Masters ***
SPI EEPROMs from most vendors
User mode SPI device driver support
Infineon TLE62X0 (for power switching)
|
你看看gpio-config.c中是否有 #include
没有这个头文件,EXPORT_SYMBOL_GPL是没有定义的,但是编译不会报错,我前几天修改驱动的时候就是这样的情况
没有这个头文件,EXPORT_SYMBOL_GPL是没有定义的,但是编译不会报错,我前几天修改驱动的时候就是这样的情况