- 论坛徽章:
- 0
|
我也是这个问题 不过我的内核是2.4.20-8 很多人应该见过这个版本的哈。。
是redhat9的。。
不过我每次都是报 “couldn't find the kernel version the module was compiled for”
这个错误。
我在网上搜索了N多,有让加头文件的,有让说许可证的。。 我通通都加了 可是就是有问题。。
这里给出我的程序
#include <linux/module.h>
#include <linux/kernel.h>
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
MODULE_LICENSE("GPL");
int init_module()
{
printk("load the module\n");
return 0;
}
void cleanup_module()
{
printk("end the module\n");
return 0;
}
最后用gcc -c -I /usr/src/linux-2.4.20-8/include编译没有错误并通过,但当我用insmod挂载的时候,却出现
“couldn't find the kernel version the module was compiled for”
这个错误..
已经一整天了,我头都快大了.. 高手们.. 救救我吧...
[ 本帖最后由 duguowei 于 2007-9-29 13:30 编辑 ] |
|