Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 ...

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    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.)

  3. #3
    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?

  4. $spacer_open
  5. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    /me checks his copy of Linux Device Drivers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts