Quoting Kashif Rajput <[EMAIL PROTECTED]>: > I have recently upgraded from Redhat Linux 7.1 kernel > version 2.4.2 to 2.4.10.
> I am trying to insert a
> driver module "code.o" in the new Kernel. But on insmod i get
> an error:-
>
> "kernel-module version mismatch. code.o was compiled
> for kernel version 2.4.2-2 while this kernel is
> version 2.4.10"
I assume that's your own module... I have no such thing. But whatever.
> Although i am able to insert the driver module with
> the -f(force) switch. But this results in a faulty
> operation of the driver module.
Which is very likely.
> I have tried
> recompiling the source of gcc in this new kernel but
> that has also not solved this problem.
The gcc does not need to be recompiled. It has nothing to do with your
problem.
Your 'code' module needs to be recompiled with new headers from the new
kernel tree. Usually there are /usr/include/{linux,asm} symlinks that
point to the right places, like /usr/src/linux/include/{linux,asm}.
If you only upgraded the bootable image (vmlinuz) then the old headers
stay and your module gets compiled for the old kernel.
Fix symlinks. You may need to upgrade kernel-headers RPM if you prefer the
RPM way. If you compile your own kernels then it should happen
automagically, as soon as /usr/src/linux symlink is redirected to the new
kernel tree.
Dmitri
--
"By golly, I'm beginning to think Linux really *is* the best thing since
sliced bread."
(By Vance Petree, Virginia Power)
msg01628/pgp00000.pgp
Description: PGP signature
