Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

insmod error

4 views
Skip to first unread message

Michael Lodman

unread,
Dec 16, 2003, 12:43:47 PM12/16/03
to

I need help with an insmod of a driver in Mandrake 9.2:

I get the following error:

driver.o: kernel-module version mismatch
driver.o was compiled for kernel version 2.4.22
while this kernel is version 2.4.22-10mdk.

What is going on and how do I correct this?

Dan Anderson

unread,
Dec 16, 2003, 2:07:47 PM12/16/03
to
Michael Lodman <jlo...@rainbow-networks.com> writes:

Try compiling a 2.4.22 kernel for your machine, install it as MyKernel
under LILO, and insmod into that. 2.4.22 != 2.4.22-10mdk.

-Dan

Robert Hallgren

unread,
Dec 16, 2003, 4:00:05 PM12/16/03
to

Try using the insmod -f flag.

If you compile this module yourself, against kernel 2.4.22 source
you should have a look in the kernel source top Makefile. It might
contain something like this:

EXTRAVERSION = -10mdk

Try changing this to just plain:

EXTRAVERSION =

You might need to reconfigure your kernel source after this change

BR/ Robert

Michael Lodman

unread,
Dec 16, 2003, 4:01:56 PM12/16/03
to
Robert Hallgren <sand...@lipogram.com> wrote in
news:slrnbtusik....@poetry.lipogram:

Why would Mandrake ship the product with this problem?

Dan Anderson

unread,
Dec 16, 2003, 4:23:36 PM12/16/03
to
Michael Lodman <jlo...@rainbow-networks.com> writes:

If you're compiling the kernel module yourself then,
technically speaking, Mandrake didn't ship the product with this
problem. Remember to install the *mandrake* kernel sources. I would
be you're probably making a mistakes and not getting something right.

Mandrake did, FWIW, ship 9.2 early because everyone wanted
things from the RC badly (and plus they're not exactly in a great
financial situation), so if you run Mandrake Update on a fresh 9.2
distribution you'll find a hundred patches or something similarly
obscene.

-Dan

Dave Lister

unread,
Dec 16, 2003, 4:36:05 PM12/16/03
to
Dan Anderson <d...@mathjunkies.com> wrote in news:m28ylc5uej.fsf@syr-24-59-
76-83.twcny.rr.com:

I didn't recompile the kernel module. This is a straight load of 9.2, and
then compiling the little driver. Whatever errors exist are in the
distribution. I will try the update and see if that helps.

--
Un-elect Dubya in 2004

Michael Lodman

unread,
Dec 16, 2003, 4:37:52 PM12/16/03
to
Dan Anderson <d...@mathjunkies.com> wrote in news:m28ylc5uej.fsf@syr-24-59-
76-83.twcny.rr.com:

> Michael Lodman <jlo...@rainbow-networks.com> writes:

I didn't recompile the kernel module. This is a straight load of 9.2, and

blah

unread,
Dec 18, 2003, 5:00:56 PM12/18/03
to
On Tue, 16 Dec 2003 17:43:47 GMT, Michael Lodman
<jlo...@rainbow-networks.com> wrote:

All distributions(well I can't say all, at least the ones that I have
used) ship with the kernel configured to only load modules compiled at
the same time as that kernel. If you want to have no problems
recompile the kernel. I can't remember the exact wording but it's one
of the first options when you do a make config/menuconfig/xconfig.

Ravi

unread,
Dec 26, 2003, 6:03:52 PM12/26/03
to
blah <h...@nospam.net> wrote in message news:<uj84uvoj2of2sucd1...@4ax.com>...

hi all,
I also have the same kind of problem, but I am using RedHat 9.0 and
kernel is 2.4.20-8, I get error message saying

module is compiled for 2.4.20 and your kernel is 2.4.20-8. If i
recompile the
kernel how can I specify the new kernel in GRUB. And is there any
other way to solve this problem instead of recompiling it.

I have tried specifing -I option with path in gcc while compiling
module.

Thank you,
Ravi

Ross Axe

unread,
Dec 27, 2003, 11:00:52 AM12/27/03
to

I have only limited Mandrake experience (and *no* RH) but it looks like
your modules were compiled for a vanilla kernel but you're both using
MDK/RH specific kernels (specifically, the EXTRAVERSION variable has
been bet in the kernels makefile). I guess you could try getting any
updates that are available for the modules on the MDK/RH sites, making
sure the update matches your kernel. Otherwise, compile a kernel, it's
not hard.

cd /usr/src/linux-2.4.18(or whatever)
make oldconfig
make dep
make install modules modules_install

Then you just reboot and you're done. If you want to reconfigure
anything in the kernel, them use `make menuconfig' instead of `make
oldconfig'. Also, note that the `make dep' stage only needs to be done
when you compile a kernel for the first time, or after an upgrade or patch.

HTH,
Ross

mayur24

unread,
Jan 5, 2004, 4:45:23 AM1/5/04
to
Ross Axe <ross...@blueyonder.co.uk> wrote in message news:<Z0iHb.51$Jy5...@news-binary.blueyonder.co.uk>...

This should work on any distro
gcc -O2 -DMODULE -D__KERNEL__ -isystem /lib/modules/`uname -r`/build/include
-W -Wall -c <module_name.c>
bye,mayur.

0 new messages