C programming problem
Results 1 to 3 of 3

Thread: C programming problem

  1. #1
    Join Date
    Aug 2000
    Location
    Johor Bahru,Johor,Malaysia
    Posts
    46

    C programming problem

    I have a problem loading module,when I run the 'insmod' command,I get the message "Kernel-module version mismatch , hello.o was comoiled for 2.4.0-0.26 while this kernel version is 2.2.16-22". I use RedHat Linux 7.0 ,gcc 2.96. Please help!!!
    Thanks in advance!

    [This message has been edited by sujita (edited 02-07-2001).]

  2. #2
    Join Date
    Mar 2000
    Location
    Elyria, Ohio - USA
    Posts
    2,075
    I assume that you have recently upgraded your kernel from 2.2 to 2.4. It could be that your system depends, to some extent, the /boot/System.map, and the System.map file being used is still from the 2.2 kernel. Copy /usr/src/kernel-source-2.4.(whatever)/System.map to /boot. This should fix your problem. -mk

    ------------------
    If it ain't broke, fix it till it is.
    If it ain't broke,
    Fix it till it is.

  3. #3
    Join Date
    Aug 2000
    Location
    Johor Bahru,Johor,Malaysia
    Posts
    46
    Hi,
    no,I did not upgrade my kernel,I just installed Red Hat 7.0 from scratch,no previously existing Linux on my pc.So what do I do?CAn I get the System.map file from any site?
    I went thro the header files,came to the conclusion that 2 constants, __KERNEL__ and
    __NO_VERSION__ determined the which kernel version ,so I redefined them in my pgm,with the lines, #define __KERNEL__ and #define __NO_VERSION__ and the pgm works,except that the o/p doesn't appear on the terminal and I have to check /var/log/messages for the o/p.
    Thank you!
    Sujita

    ps .. I found another solution, the -f option for insmod to 'force' loading onto a diff version..
    Thanks !!

    [This message has been edited by sujita (edited 02-07-2001).]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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