QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 850|回复: 4

为什么编个简单的模块不能装

[复制链接]
发表于 2003-8-17 16:05:01 | 显示全部楼层 |阅读模式
我照着书的例子编了一个简单的模块不能运行,下面提示这样的错误
'./hello.o': kernel-module version mismatch
./hello.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8

还有我在编译hello.c的时候出现以下提示

warning:implicit declaration of function 'printk'

有人可以告诉这些都是什么意思吗?还有怎么解决这些问题
另外我在网上下载了2。6Bate2版的内核我不知道怎么编译,直接make 不行
 楼主| 发表于 2003-8-18 20:22:30 | 显示全部楼层
你能不能说清楚点呀,我不会编译内核,上次我在网上下了个2。6Bate2的内核不会编译能不能告诉我怎么编译,还有2.4.20-8是什么意思?内核版本为什么要加个-8?
回复

使用道具 举报

发表于 2003-8-18 22:31:55 | 显示全部楼层
insmod -f hello.o

post the commod line or u makefile u used to compile hello.c here

see other post on 2.6.0 compilation
回复

使用道具 举报

 楼主| 发表于 2003-8-19 20:55:32 | 显示全部楼层
我试过 make oldconfig make dep 是不是这样就可以了?可是不行我又试着 make install 我也不知道怎么编译内核就是搞不定有没有谁可以跟我仔细说说我都快急死了,还有尽量别用英文好不好我看着很累
回复

使用道具 举报

发表于 2003-8-19 21:24:17 | 显示全部楼层
no, make oldconfig dep will not change kernel version.

there are many posts here on how to compile kernel. read it.

i always use english here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-18 15:27 , Processed in 0.064905 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表