Problems with modversions.h while installing device driver - Redhat

This is a discussion on Problems with modversions.h while installing device driver - Redhat ; Hello, I have been trying to install ByteBlaster (a parallel port device for FPGA programming) driver on my CentOS 3.9 machine (it uses kernel 2.4.21-50.EL). Initially when I used ./configure, it could not find modversions.h file. I found that the ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Problems with modversions.h while installing device driver

  1. Problems with modversions.h while installing device driver

    Hello,

    I have been trying to install ByteBlaster (a parallel port device for
    FPGA programming) driver on my CentOS 3.9 machine (it uses kernel
    2.4.21-50.EL). Initially when I used ./configure, it could not find
    modversions.h file. I found that the modeversions.h file is in /usr/
    src/linux-2.4.21-50.EL.asp/include/linux and included it in the search
    options in the ./configure.

    Following this './configure' yielded following messages:
    ---------------------------------------------------
    [root@c109-02a byteblaster]# ./configure
    Using kernel headers from /usr/src/linux-2.4.21-50.EL.asp/include/
    Installing ByteBlasterMV module into /lib/modules/2.4.21-50.EL/
    ---------------------------------------------------

    Next, I executed 'make':
    ---------------------------------------------------
    [root@c109-02a byteblaster]# make
    cc -D__KERNEL__ -DMODULE -D__SMP__ -O3 -Wall -I/usr/src/
    linux-2.4.21-50.EL.asp/include/ -DMODVERSIONS -include /usr/src/
    linux-2.4.21-50.EL.asp/include//linux/modversions.h -c -o
    byteblaster.o byteblaster.c
    ---------------------------------------------------

    All this seemed to work ok. However when I executed 'make install', I
    received the error which says there was a kernel version mismatch:
    ---------------------------------------------------
    [root@c109-02a byteblaster]# make install
    install -d /lib/modules/2.4.21-50.EL/kernel/misc/
    install -c byteblaster.o /lib/modules/2.4.21-50.EL/kernel/misc/
    byteblaster.o
    install -c jtagd-init /etc/rc.d/init.d/jtagd
    /sbin/chkconfig --add jtagd
    /sbin/depmod -aq
    /etc/rc.d/init.d/jtagd start
    Starting ByteBlaster driver: Warning: kernel-module version mismatch
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o was
    compiled for kernel version 2.4.21-50.EL.asp
    while this kernel is version 2.4.21-50.EL
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: unresolved symbol
    register_chrdev_Racfca4b4
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod /lib/
    modules/2.4.21-50.EL/kernel/misc/byteblaster.o failed
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod
    byteblaster failed
    mknod: wrong number of arguments
    Try `mknod --help' for more information.
    mknod: wrong number of arguments
    Try `mknod --help' for more information.
    mknod: wrong number of arguments
    Try `mknod --help' for more information.
    ---------------------------------------------------

    What could be the problem here? Please help.

    Kumar Vijay Mishra.

  2. Re: Problems with modversions.h while installing device driver

    Hello,

    A further update from my side. I also tried following steps but it
    still yielded errors:

    a. Edited "Makefile" in the kernel source directory (/usr/src/
    linux-2.4.21-50.EL.asp/) and changed the line 4 from

    EXTRAVERSION = 50.EL.aspcustom

    to

    EXTRAVERSION = 50.EL

    b. Above didn't help. I also changed the UTS_RELEASE in /usr/src/
    linux-2.4/include/linux/version.h to match the output of "uname -r" on
    the command line (it was 2.4.21-50.EL).

    But this didn't help either.

    Any help would be appreciated.

    Kumar Vijay Mishra.

  3. Re: Problems with modversions.h while installing device driver

    I had forgotten to do a 'make clean' after doing the changes in
    MakeFile and version.h
    So, after 'make clean' and installing from scratch, make install
    didn't yield any version mismatch. But it now gave following errors:

    [root@c109-02a byteblaster]# make install
    install -d /lib/modules/2.4.21-50.EL/kernel/misc/
    install -c byteblaster.o /lib/modules/2.4.21-50.EL/kernel/misc/
    byteblaster.o
    install -c jtagd-init /etc/rc.d/init.d/jtagd
    /sbin/chkconfig --add jtagd
    /sbin/depmod -aq
    /etc/rc.d/init.d/jtagd start
    Starting ByteBlaster driver: /lib/modules/2.4.21-50.EL/kernel/misc/
    byteblaster.o : unresolved symbol register_chrdev_Racfca4b4
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod /lib/
    modules/2.4.21- 50.EL/kernel/misc/byteblaster.o failed
    /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod
    byteblaster failed
    mknod: wrong number of arguments
    Try `mknod --help' for more information.
    mknod: wrong number of arguments
    Try `mknod --help' for more information.
    mknod: wrong number of arguments
    Try `mknod --help' for more information.

    I think I have fallen in some vicious circle. Any help will be
    appreciated.

    Kumar Vijay Mishra.

  4. Re: Problems with modversions.h while installing device driver

    viz wrote:

    Snip, snip...

    >
    > I think I have fallen in some vicious circle. Any help will be
    > appreciated.
    >
    > Kumar Vijay Mishra.


    Hello Viz:

    I have read your posts on the AlteraForum also.

    It pains me to write the following! I love my RHEL 5.2

    I wonder if you should cut your losses and try to make everything work
    under Microsoft Windows XP? CentOS 3.9 of course is a subset of Red
    Hat's Enterprise Linux (RHEL 3). Maybe ByteBlaster II developers did
    their work under a more compatible version of Linux. Maybe yet another
    much older Linux distro. Perhaps the Altera folks could relate what
    Linux distro they had their success with.

    Best wishes to you sir.

    --
    1PW

    @?6A62?FEH9E=6o2@=]4@> [r4o7t]

  5. Re: Problems with modversions.h while installing device driver

    Hi 1PW,


    > Snip, snip...


    Thank God! There is some sympathy for me somewhere :P

    > It pains me to write the following! *I love my RHEL 5.2
    > I wonder if you should cut your losses and try to make everything work
    > under Microsoft Windows XP? *CentOS 3.9 of course is a subset of Red
    > Hat's Enterprise Linux (RHEL 3). *


    I, too, love them all: Windows XP, RHEL 5.2 and USB Blaster. But our
    university environment has only these things available to us: Free
    Linux Distros as CentOS, Altera License for Unix and ByteBlasterII.
    Since the license is for Unix, I can't shift to Windows XP. Altera
    Support is callously unsupportive as I am not using their favorite
    RHEL. And since most of the people have shifted to USBBlaster while
    retaining unsupported distros, nobody wants to talk about BBII
    installation. All this really frustrated me.

    > Maybe ByteBlaster II developers did
    > their work under a more compatible version of Linux. *Maybe yet another
    > much older Linux distro. *

    This was another headache. I shifted to CentOS (which they say is
    99-100% compatible with RHEL) and was using v5.2. While Quartus gladly
    got installed on it, BBII didn't work as BBII is ported only on kernel
    2.4. It gave me shudders when I thought I will have to work on kernel
    2.4 (you know how antediluvian you feel while working on those
    kernels).

    > Perhaps the Altera folks could relate what
    > Linux distro they had their success with.

    They just don't care if you are not following their black-board type
    class and not using the distros they support.

    > Best wishes to you sir.


    But well, well, well I solved the problem finally. Although I am going
    to contribute details in Altera Forums, here is a summary of what I
    did:
    1. Shifted to CentOS 5.2
    2. Installed VMWare virtual machine of CentOS 3.9 (with permissions
    for parallel port).
    3. Installed Quartus II 8.0 in CentOS 3.9
    4. Installed kernel-source corresponding to BBII device driver.
    5. Installed BBII device driver (usual installation procedure).

    And lo! It worked. End of ordeal

    Kumar Vijay Mishra.

  6. Re: Problems with modversions.h while installing device driver

    viz wrote:
    > Hi 1PW,
    >
    >
    >> Snip, snip...

    >

    It gave me shudders when I thought I will have to work on kernel
    > 2.4 (you know how antediluvian you feel while working on those
    > kernels).
    >


    That's how I feel when I awake in the morning... ;-)

    > And lo! It worked. End of ordeal
    >
    > Kumar Vijay Mishra.


    In all seriousness, you are to be applauded for your tenacity and
    resourcefulness. Well done Viz! Well done indeed!

    --
    1PW

    @?6A62?FEH9E=6o2@=]4@> [r4o7t]

  7. Re: Problems with modversions.h while installing device driver


    > In all seriousness, you are to be applauded for your tenacity and
    > resourcefulness. *Well done Viz! *Well done indeed!
    >
    > --

    Thanks 1PW

    Kumar Vijay Mishra.

+ Reply to Thread