|

楼主 |
发表于 2004-4-12 02:37:33
|
显示全部楼层
非常感谢各位的帮助!
我重装了系统,改用 linux-mandrake 9.2 了,内核是2.4.22
-------------------------------------------------------------
改写上面头文件的路径为:
#include <linux/kernel.h> /*We'ar doing kernelwork*/
#include <linux/module.h> /*Specifically a module*/
---------------------------------------------------------------
--------------------------------------------------------------
结果是:
[root@localhost myfirewall]# gcc -c helloag.c
[root@localhost myfirewall]# /sbin/insmod helloag.o
helloag.o: couldn't find the kernel version the module was compiled for
[root@localhost myfirewall]#
-------------------------------------------------------------------
我装的是光盘版的mandrake, 系统 /usr/src目录下没有源代码,其他地方也没有, 只有包含头文件的/usr/include/linux 目录.
哪位帮帮忙,按顺序给我讲一下怎样操作才能加载成功?
kj501版主,我按照你的意思重装了系统,然后怎样从头做起啊?...呵呵
libinary版主,非常感谢你的回复,希望你再帮我一次,我现在的内核是2.4.22了
我想要的是顺序的步骤(最好是直接从终端的拷贝),多谢!! 真的非常感谢了!!
版主们真尽责啊!
luoyong兄弟,你的建议如果能够成功就非常省事了,可惜看到贴子时我已经换了系统,但我还是试了一下,把version.h中的2.4.22改成2.4.20和2.4.20-8结果都是
[root@localhost myfirewall]# gcc -c helloag.c
[root@localhost myfirewall]# /sbin/insmod helloag.o
helloag.o: couldn't find the kernel version the module was compiled for
[root@localhost myfirewall]# |
|