On Tue, 16 Dec 2003 17:43:47 GMT, Michael Lodman <jlod...@rainbow-networks.com> wrote:
> 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?
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
> On Tue, 16 Dec 2003 17:43:47 GMT, > Michael Lodman <jlod...@rainbow-networks.com> wrote:
>> 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?
> 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
Why would Mandrake ship the product with this problem?
> > On Tue, 16 Dec 2003 17:43:47 GMT, > > Michael Lodman <jlod...@rainbow-networks.com> wrote:
> >> 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?
> > 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
> Why would Mandrake ship the product with this problem?
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.
>> > On Tue, 16 Dec 2003 17:43:47 GMT, >> > Michael Lodman <jlod...@rainbow-networks.com> wrote:
>> >> 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?
>> > 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
>> Why would Mandrake ship the product with this problem?
> 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.
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.
>> > On Tue, 16 Dec 2003 17:43:47 GMT, >> > Michael Lodman <jlod...@rainbow-networks.com> wrote:
>> >> 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?
>> > 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
>> Why would Mandrake ship the product with this problem?
> 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.
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.
>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?
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.
> >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?
> 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.
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.
>>On Tue, 16 Dec 2003 17:43:47 GMT, Michael Lodman >><jlod...@rainbow-networks.com> wrote:
>>>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?
>>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.
> 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
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.
> >>On Tue, 16 Dec 2003 17:43:47 GMT, Michael Lodman > >><jlod...@rainbow-networks.com> wrote:
> >>>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?
> >>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.
> > 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
> 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
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.