LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-03-2005, 04:49 PM   #1
hetzme
LQ Newbie
 
Registered: May 2005
Posts: 21

Rep: Reputation: 15
insmod problem


I am using redhat 9.

I copiled a module "test.o". When tried to insert it by calling

"insmod test.o"

it is complaining. Below is the error message:

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



Could anyone help me with this issue and guide me so that I can test these module.

Tahnks.
 
Old 07-03-2005, 04:52 PM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
you can force the module to load with the -f option
 
Old 07-12-2005, 11:44 PM   #3
hetzme
LQ Newbie
 
Registered: May 2005
Posts: 21

Original Poster
Rep: Reputation: 15
I tried it. I did not get expected result. When I ran "insmod" I expected to see "Hello, World" and when I ran "rmmod" I expected to see "Goodbye cruel world". I did not see these messages. Could you please tell me whats happening there.


Below is my program:
==================
#define MODULE
#include <linux/module.h>

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



Below is what I tried:
=================

[root@localhost devicedrivers]# ls
test1.c test1.o
[root@localhost devicedrivers]# insmod test1.o
test1.o: kernel-module version mismatch
test1.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8.
[root@localhost devicedrivers]# insmod -f test1.o
Warning: kernel-module version mismatch
test1.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8
Warning: loading test1.o will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Warning: loading test1.o will taint the kernel: forced load
Module test1 loaded, with warnings
[root@localhost devicedrivers]#
[root@localhost devicedrivers]# rmmod test1
[root@localhost devicedrivers]#
 
  


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
[insmod problem] help!! AK prince Slackware 1 08-23-2005 02:01 AM
fedora 2 + insmod problem abhay7182 Linux - Software 1 09-07-2004 10:13 AM
Help with insmod. I have a problem with insmod. RJARRRPCGP Linux - Newbie 5 08-24-2004 08:23 PM
insmod problem i810_rng salahuddin_66 Slackware 4 05-04-2004 08:32 PM
insmod/modprobe Problem Compuholic Linux - General 19 12-24-2002 10:39 AM

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

All times are GMT -5. The time now is 01:05 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