LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2005, 12:43 AM   #1
Pratik H Pandya
LQ Newbie
 
Registered: Jun 2005
Location: India
Distribution: RedHat 9.0,Fedora core 3
Posts: 22

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel version Source Version mismatch after recompile chuckleberry Linux - Software 1 06-20-2005 06:37 PM
Can't load module :error kernel version mismatch garv Linux - Software 1 04-05-2004 12:47 PM
kernel-module version mismatch louai Linux - General 2 01-08-2004 11:22 AM
Error "Kernel version mismatch" when nic driver will be loaded grubjo Linux - Networking 1 10-03-2003 04:12 AM
kernel version mismatch jimo Linux - Software 3 10-29-2001 01:58 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration