kernel version mismatch error
Hello Friends
I'm using kernel module programming and i tried one typical "hello world" module to insert
and it got inserted but then i recompile the kernel and tried it now i'm getting errror like
hello.o: kernel-module version mismatch
hello.o was compiled for kernel version 2.4.20-8custom
while this kernel is version 2.4.20-8.
i tried in both the kernels.
i also tried the MODVERSIONS in my program but it is not working. My program code is as belows
*********************************Code*****************************************************
#if defined (CONFIG_MODVERSIONS) && ! defined (MODVERSIONS)
#include <linux/modversions.h>
#define MODVERSIONS
#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include<linux/version.h>
#include <linux/init.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("hello kernel");
return 0;
}
void cleanup_module(void)
{
printk("GoodBye Kernel \n");
}
********************************************************************************************
Please help me. also let me know how to compile a module on different linux versions
Thanks in advance
|