Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > regarding kernel version ........

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 05-04-2005   #1 (permalink)
Just Joined!
 
Join Date: Feb 2005
Posts: 25
regarding kernel version ........

Hi all !
I'm trying to create a kernel module. So I follow the steps below:

1. create my mod.c file
2. compile the file to generate the object (mod.o) file
3. next up the module by: insmod mod

But at the last step I got an error message saying :
mod.o : kernel_module version mismatch
mod.o is compiled for kernel version 2.4.20
while this kernel version is 2.4.20-8bigmem

OK... what I've found that the name of my kernel image file is 'vmlinuz2.4.20-8bigmem'. So is it due to that ?

At the time of compilation I have not specified any kernel version. So from where does this object file get the value ? Lets suppose I've an object file. Now I want to know which kernel version it is compiled for ?
Is there any way to know this ?

Thanx for any help ...
avk_ady is offline  



Reply With Quote
Old 05-04-2005   #2 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
You need to compile the module against the same source tree as the kernel which you are running. (that is, you should either build a new kernel from the virgin 2.4.20 tree or download the 2.4.20-8bigmem tree, which doesn't sound feasible as 2.4.20-8bigmem sounds like a binary kernel provided by a distro.)
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 05-05-2005   #3 (permalink)
Just Joined!
 
Join Date: Feb 2005
Posts: 25
Thanx for your help.
my problem get solved when i cimpile with the option "-isystem <PATH>".
But I get stuck into other .....
I want to give port access permission in kernel level. So I cant use
ioperm(). I have used sys_ioperm(). But when i am doing insmod it display an error like "unresolved symbol : init_tss". Then I include a file called "/arch/i386/kernel/init_task.c". Now it can resolve the symbol init_tss. But gives some other errors like ......
unresolve symbol : default_exec_domain
unresolve symbol : root_user
unresolve symbol : swapper_pg_dir
etc etc....
So these keep on going. So how to solve this problem ? is there any
function instead of sys_ioperm() for giving port access permission in
kernel level?
avk_ady is offline   Reply With Quote
Old 05-05-2005   #4 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
/me checks his copy of Linux Device Drivers
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:31 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1