Scull在2.6.35-30内核中的编译解决方案
reported only once /media/orientation/driver/ldd3/examples/scull/pipe.c:131: error: for each function it appears in.)
/media/orientation/driver/ldd3/examples/scull/pipe.c:131: error: implicit declaration of function ‘signal_pending’/media/orientation/driver/ldd3/examples/scull/pipe.c:131: error: implicit declaration of function ‘schedule’/media/orientation/driver/ldd3/examples/scull/pipe.c: In function ‘scull_getwritespace’:/media/orientation/driver/ldd3/examples/scull/pipe.c:168: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/media/orientation/driver/ldd3/examples/scull/pipe.c: In function ‘scull_p_write’:/media/orientation/driver/ldd3/examples/scull/pipe.c:219: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/media/orientation/driver/ldd3/examples/scull/pipe.c:223: error: ‘SIGIO’ undeclared (first use in this function)
/media/orientation/driver/ldd3/examples/scull/pipe.c:223: error: ‘POLL_IN’ undeclared (first use in this function)
make[2]: *** [/media/orientation/driver/ldd3/examples/scull/pipe.o] Error 1 make[1]: *** [_module_/media/orientation/driver/ldd3/examples/scull] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-28-generic' make: *** [modules] Error 2 6、根据提示,TASK_INTERRUPTIBLE没有声明,我们在源码里面搜索,发现该宏定义在linux/sched.h>中,故在pipe.c中加入该头文件,接着make:
make -C /lib/modules/2.6.35-30-generic/build M=/media/orientation/driver/ldd3/examples/scull LDDINC=/media/orientation/driver/ldd3/examples/scull/……/include modules make[1]: Entering directory `/usr/src/linux-headers-2.6.35-30-generic' CC [M] /media/orientation/driver/ldd3/examples/scull/pipe.o CC [M] /media/orientation/driver/ldd3/examples/scull/access.o /media/orientation/driver/ldd3/examples/scull/access.c: In function ‘scull_u_open’:/media/orientation/driver/ldd3/examples/scull/access.c:106: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c:107: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c:114: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c: In function ‘scull_w_available’:/media/orientation/driver/ldd3/examples/scull/access.c:165: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c:166: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c: In function ‘scull_w_open’:/media/orientation/driver/ldd3/examples/scull/access.c:179: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/media/orientation/driver/ldd3/examples/scull/access.c:179: error: (Each undeclared identifier is reported only once /media/orientation/driver/ldd3/examples/scull/access.c:179: error: for each function it appears in.)
/media/orientation/driver/ldd3/examples/scull/access.c:179: error: implicit declaration offunction ‘signal_pending’/media/orientation/driver/ldd3/examples/scull/access.c:179: error: implicit declaration offunction ‘schedule’/media/orientation/driver/ldd3/examples/scull/access.c:184: error: dereferencing pointer to incomplete type /media/orientation/driver/ldd3/examples/scull/access.c: In function ‘scull_w_release’:/media/orientation/
解决方案 编译 内核 2 6 35-30 Scull 相关文章:
- SN2005学习系统 数字语音室解决方案(05-19)
- 以可编程DSP架构应对TD-SCDMA以及TD-LTE带来的设计挑战 (02-14)
- 基于DSP的电源解决方案(06-13)
- FPGA PCIe 视频采集(Video Capture)解决方案分析(06-06)
- 大联大友尚集团推出基于Realtek的智能插座解决方案(10-22)
- Wind River携手Cavium推出新的多核软件解决方案(09-12)
