免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4294 | 回复: 2
打印 上一主题 下一主题

求模块化驱动编译问题~~~! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-23 23:50 |只看该作者 |倒序浏览
[root@localhost lulu_linux]# make
gcc   -D_KERNEL_ -D_MODULE -I  -O2 -Wall -O -c lulu.c -o lulu.o
In file included from /usr/include/linux/sched.h:13,
                 from lulu.c:5:
/usr/include/linux/times.h:7: error: syntax error before "clock_t"
/usr/include/linux/times.h:9: error: syntax error before "tms_cutime"
/usr/include/linux/times.h:10: error: syntax error before "tms_cstime"
In file included from /usr/include/linux/sched.h:14,
                 from lulu.c:5:
/usr/include/linux/timex.h:148: error: field `time' has incomplete type
In file included from /usr/include/linux/signal.h:4,
                 from /usr/include/linux/sched.h:25,
                 from lulu.c:5:
/usr/include/asm/signal.h:107: error: syntax error before "sigset_t"
/usr/include/asm/signal.h:110: error: syntax error before '}' token
In file included from /usr/include/linux/signal.h:5,
                 from /usr/include/linux/sched.h:25,
                 from lulu.c:5:
/usr/include/asm/siginfo.h:26: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:38: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:41: error: syntax error before '}' token
/usr/include/asm/siginfo.h:45: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:48: error: syntax error before "_utime"
/usr/include/asm/siginfo.h:49: error: syntax error before "_stime"
/usr/include/asm/siginfo.h:62: error: syntax error before '}' token
/usr/include/asm/siginfo.h:63: error: syntax error before '}' token
In file included from /usr/include/linux/sched.h:65,
                 from lulu.c:5:
/usr/include/linux/time.h:10: error: syntax error before "time_t"
/usr/include/linux/time.h:12: error: syntax error before '}' token
/usr/include/linux/time.h:18: error: syntax error before "time_t"
/usr/include/linux/time.h:44: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:45: error: field `it_value' has incomplete type
/usr/include/linux/time.h:49: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:50: error: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:67,
                 from lulu.c:5:
/usr/include/linux/resource.h:22: error: field `ru_utime' has incomplete type
/usr/include/linux/resource.h:23: error: field `ru_stime' has incomplete type
lulu.c:10: warning: "struct file" declared inside parameter list
lulu.c:10: warning: its scope is only this definition or declaration, which is probably not what you want
lulu.c:10: warning: "struct inode" declared inside parameter list
lulu.c:11: warning: "struct file" declared inside parameter list
lulu.c:11: warning: "struct inode" declared inside parameter list
lulu.c:12: error: syntax error before "lulu_read"
lulu.c:12: error: syntax error before "loff_t"
lulu.c:12: warning: type defaults to `int' in declaration of `lulu_read'
lulu.c:12: warning: data definition has no type or storage class
lulu.c:13: warning: "struct file" declared inside parameter list
lulu.c:13: warning: "struct inode" declared inside parameter list
lulu.c:19: error: variable `lulu_fops' has initializer but incomplete type
lulu.c:20:28: token "=" is not valid in preprocessor expressions
lulu.c:23: error: unknown field `llseek' specified in initializer
lulu.c:23: warning: excess elements in struct initializer
lulu.c:23: warning: (near initialization for `lulu_fops')
lulu.c:24: error: unknown field `read' specified in initializer
lulu.c:24: warning: excess elements in struct initializer
lulu.c:24: warning: (near initialization for `lulu_fops')
lulu.c:25: error: unknown field `write' specified in initializer
lulu.c:25: error: `lulu_write' undeclared here (not in a function)
lulu.c:25: warning: excess elements in struct initializer
lulu.c:25: warning: (near initialization for `lulu_fops')
lulu.c:26: error: unknown field `ioctl' specified in initializer
lulu.c:26: warning: excess elements in struct initializer
lulu.c:26: warning: (near initialization for `lulu_fops')
lulu.c:27: error: unknown field `open' specified in initializer
lulu.c:27: warning: excess elements in struct initializer
lulu.c:27: warning: (near initialization for `lulu_fops')
lulu.c:28: error: unknown field `release' specified in initializer
lulu.c:28: error: `lulu_release' undeclared here (not in a function)
lulu.c:28: warning: excess elements in struct initializer
lulu.c:28: warning: (near initialization for `lulu_fops')
lulu.c: In function `lulu_init':
lulu.c:35: warning: implicit declaration of function `register_chrdev'
lulu.c:37: warning: implicit declaration of function `printk'
lulu.c:37: error: `KERN_CRIT' undeclared (first use in this function)
lulu.c:37: error: (Each undeclared identifier is reported only once
lulu.c:37: error: for each function it appears in.)
lulu.c:37: error: syntax error before string constant
lulu.c:47:2: invalid preprocessing directive #indef
lulu.c: At top level:
lulu.c:49: error: syntax error before string constant
lulu.c:49: warning: type defaults to `int' in declaration of `MODULE_DESCRIPION'lulu.c:49: warning: data definition has no type or storage class
lulu.c:51:49: macro "MODULE_PARM" requires 2 arguments, but only 1 given
lulu.c:51: warning: type defaults to `int' in declaration of `MODULE_PARM'
lulu.c:51: warning: data definition has no type or storage class
lulu.c: In function `cleanuo_module':
lulu.c:58: warning: implicit declaration of function `lulu_cleanup'
lulu.c: At top level:
lulu.c:19: error: storage size of `lulu_fops' isn't known
lulu.c:10: warning: 'lulu_open' declared `static' but never defined
lulu.c:11: warning: 'lulu_close' declared `static' but never defined
lulu.c:13: warning: 'lulu_ioctl' declared `static' but never defined
lulu.c:14: warning: 'lulu_clean' declared `static' but never defined
make: *** [lulu.o] 错误 1

论坛徽章:
5
2 [报告]
发表于 2007-04-24 12:51 |只看该作者
内核版本和GCC匹配的问题

论坛徽章:
0
3 [报告]
发表于 2007-04-24 23:51 |只看该作者
是不匹配吗?
我装版本的是FC3  gcc是默认安装的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP