Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-16-2003, 08:59 AM   #1
LQ Newbie
Registered: Sep 2003
Posts: 18

Rep: Reputation: 0
creating a simple module(device driver)

Iam getting an error while linking the following module to my kernel......


#define MODULE

int init_module()
printk("<1> HEllo my boss\n");
return 0;

void cleanup_module()

printk("<1> good bye my boss");

i can able to compile success fully...

# gcc -c module.c

but when iam trying to insert this module....
# insmod ./module.o

Iam getting this erro..
your kernel is mismatched..
your kernel version is 2.4.0-20.this is compiled for
2.4.0 on linux 9.0...

even i tried on linux 7.0 here also iam getting same error..
your kernel is mismatched..
your kernel version is 2.....this is compiled for
2.4.0 on linux 7.0...

can any one help for this experts..
Old 09-16-2003, 12:34 PM   #2
LQ Newbie
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian, Slackware, RedHat
Posts: 7

Rep: Reputation: 0
Why don't trying the force switch
insmod -f module.o


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
C++ or pure C for Linux kernel module, Linux device driver development. What to use? Igor007 Programming 91 07-19-2014 12:55 PM
Problem in inserting a device driver module rajesh_b Programming 5 05-10-2007 01:20 AM
problems creating a simple bootable cd to perform a simple task czarherr Linux - Software 1 11-11-2004 06:22 AM
simple hello.c device driver for 2.6 kernel blavo Programming 29 06-30-2004 06:42 AM
Installing a device driver as a Module lehumphr Linux - Newbie 1 04-28-2004 12:31 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:35 PM.

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