LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2004, 04:24 AM   #1
garv
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Angry Can't load module :error kernel version mismatch


I am a newbie device writer thus from ' Linux Device Writers' I took the first code

#define MODULE
#include <linux/module.h>

int init_module(void) { printk("<1>Hello, world\n"); return 0;}
void cleanup_module(void) {printk("<1>Good bye cruel world\n");}

compiled it with gcc(storing this as test.c) and then ran the command: insmod ./test.o

but instead of Hello,world I got the following message:

insmod ./test.o
./test.o: kernel-module version mismatch
./test.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8

System:AMD Athlon 1800+,128MB ,etc

i don't want to use -f option. Rubini suggests to compile own kernel without version support,
but how do i do it.



thank you

Last edited by garv; 04-05-2004 at 04:26 AM.
 
Old 04-05-2004, 12:47 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
cd to /usr/src/linux-2.4.20-8

type make menuconfig

in the kernel options it will say
loadable module support blah blah.

enable module informnation on all modules. set this to no.

Otherwise get the right kernel sources and when compiling specify those sources.
 
  


Reply



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-module Version Mismatch !!! lionking_x Linux - Networking 1 02-02-2004 02:07 PM
Kernel-module Version Mismatch !!! lionking_x Linux - Software 1 02-02-2004 02:06 PM
Kernel-module Version Mismatch !!! lionking_x Linux - Newbie 1 02-02-2004 01:01 PM
kernel-module version mismatch louai Linux - General 2 01-08-2004 11:22 AM
Module won't load due to Kernel version mismatch salukibob Programming 0 03-31-2001 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:49 PM.

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