Guessing this is a Redhat system, not sure if other distros do quite the same thing. When you install the kernel source rpm it puts the source in place with a slightly tweeked Makefile. They tack that 'custom' onto the end of the EXTRAVERSION variable so that if you end up recompiling your kernel and installing it, by default it doesn't overwrite the working kernel you started out with. But it also means that if you've installed a kernel from RPM and kernel source from RPM, and then try to compile a module against the source, you get the error you've described. If that's what's happened to you, there are a couple of ways to go here:
-You can simply remove the 'custom' from the EXTRAVERSION in /usr/src/linux-2.4/Makefile and recompile your module and it'll probably work.
- Or you could compile a new kernel from the source you have and boot it, then load the module. Which isn't a bad idea, cause then you know source, config, and binary are in sync.
- Or you could insmod -f your module, which skips the kernel version check. If you have symbol versioning turned on it may still reject the module. But that means your source and binary kernels really are out of sync, and you have to fix that first.
If you didn't install both kernel and kernel source from RPM, you may be having a different issue. Check to make sure that the Makefile at the top level of your kernel source matches the output from 'uname -r', that seems to be what the module tools are complaining about. -- Rev
|