Results 1 to 4 of 4
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) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-04-2005 #1Just Joined!
- Join Date
- Feb 2005
- Posts
- 28
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 ...
- 05-04-2005 #2
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.)
- 05-05-2005 #3Just Joined!
- Join Date
- Feb 2005
- Posts
- 28
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?
- 05-05-2005 #4
/me checks his copy of Linux Device Drivers


Reply With Quote
