红联Linux门户
Linux帮助

ubuntu 内核版本2.6.32-21-generic下ldd examples中sbull模块驱动编译不过

发布时间:2011-01-07 11:10:16来源:红联作者:hyl_lynn
目前我在ubuntu 下,内核版本为2.6.32-21-generic,下载了ldd examples中最新的代码(支持内核版本到2.6.31.13)中的sbull模块的例子程序,
编译时报错,打印如下:
root@lynn-desktop:/home/work/ldd-examples/examples/sbull# make
make -C /lib/modules/2.6.32-21-generic/build M=/home/work/ldd-examples/examples/sbull modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-21-generic'
CC [M] /home/work/ldd-examples/examples/sbull/sbull.o
/home/work/ldd-examples/examples/sbull/sbull.c: In function ‘sbull_request’:
/home/work/ldd-examples/examples/sbull/sbull.c:107: error: implicit declaration of function ‘elv_next_request’
/home/work/ldd-examples/examples/sbull/sbull.c:107: warning: assignment makes pointer from integer without a cast
/home/work/ldd-examples/examples/sbull/sbull.c:111: error: ‘struct request’ has no member named ‘current_nr_sectors’
/home/work/ldd-examples/examples/sbull/sbull.c:118: error: ‘struct request’ has no member named ‘sector’
/home/work/ldd-examples/examples/sbull/sbull.c:118: error: ‘struct request’ has no member named ‘current_nr_sectors’
/home/work/ldd-examples/examples/sbull/sbull.c:120: error: ‘struct request’ has no member named ‘current_nr_sectors’
/home/work/ldd-examples/examples/sbull/sbull.c: In function ‘sbull_xfer_bio’:
/home/work/ldd-examples/examples/sbull/sbull.c:137: error: implicit declaration of function ‘bio_cur_sectors’
/home/work/ldd-examples/examples/sbull/sbull.c: At top level:
/home/work/ldd-examples/examples/sbull/sbull.c:175: error: expected ‘)’ before ‘*’ token
/home/work/ldd-examples/examples/sbull/sbull.c:321: warning: initialization from incompatible pointer type
/home/work/ldd-examples/examples/sbull/sbull.c:322: warning: initialization from incompatible pointer type
/home/work/ldd-examples/examples/sbull/sbull.c:326: warning: initialization from incompatible pointer type
/home/work/ldd-examples/examples/sbull/sbull.c: In function ‘setup_device’:
/home/work/ldd-examples/examples/sbull/sbull.c:366: error: ‘sbull_full_request’ undeclared (first use in this function)
/home/work/ldd-examples/examples/sbull/sbull.c:366: error: (Each undeclared identifier is reported only once
/home/work/ldd-examples/examples/sbull/sbull.c:366: error: for each function it appears in.)
/home/work/ldd-examples/examples/sbull/sbull.c:381: error: implicit declaration of function ‘blk_queue_hardsect_size’
make[2]: *** [/home/work/ldd-examples/examples/sbull/sbull.o] Error 1
make[1]: *** [_module_/home/work/ldd-examples/examples/sbull] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-21-generic'
make: *** [default] Error 2
root@lynn-desktop:/home/work/ldd-examples/examples/sbull#

请问大家有没有适合ubuntu 内核版本2.6.32-21-generic下ldd examples中sbull模块的驱动?急!谢谢!
文章评论

共有 0 条评论