现在的位置: 首页 > 综合 > 正文

ldd3编译misc-modules(ubuntu1204LTS)

2014年01月02日 ⁄ 综合 ⁄ 共 470字 ⁄ 字号 评论关闭

新版本的内核编译ldd3的例程会出现一些错误,先将编译记录如下

error1:

fatal error: linux/config.h: No such file or directory

原因:新版内核没有这个文件了

解决办法:注释就可以了。

error2:

implicit declaration of function ‘schedule’

‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)等

原因:没有正确的include头文件

解决办法:#include <linux/sched.h>

error3:

 error: macro "INIT_WORK" passed 3 arguments, but takes just 2

原因:宏定义变了。

解决办法:去掉第三个参数

error4:

error: ‘system_utsname’ undeclared (first use in this function)

原因:定义变了

解决办法:system_utsname.machine

--> init_uts_ns.name.machine

然后就可以了。

抱歉!评论已关闭.