bierdaci 发表于 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 不行

bierdaci 发表于 2003-8-18 20:22:30

你能不能说清楚点呀,我不会编译内核,上次我在网上下了个2。6Bate2的内核不会编译能不能告诉我怎么编译,还有2.4.20-8是什么意思?内核版本为什么要加个-8?

Dragonfly 发表于 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

bierdaci 发表于 2003-8-19 20:55:32

我试过 make oldconfig make dep 是不是这样就可以了?可是不行我又试着 make install 我也不知道怎么编译内核就是搞不定有没有谁可以跟我仔细说说我都快急死了,还有尽量别用英文好不好我看着很累

Dragonfly 发表于 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.
页: [1]
查看完整版本: 为什么编个简单的模块不能装