Click to See Complete Forum and Search --> : Problems inserting a newly compiled module


T2F
07-01-2004, 02:57 PM
I am presently running a homemade box with a Gigabyte motherboard that has a 'GigaRaid' (ITE 8212F IDE raid) chip onboard. I downloaded the linux driver from the ITE website several months ago and compiled it when I was using Fedora Core 1. All worked well. I was not booting from the raid array, only using it for backup. Later, I moved from FC1 to Slackware 9.1. Again, the driver compiled and worked fine. After several weeks, I decided to repartition hda on this box and move up to Slackware current. After getting -current installed and working, the ITE raid driver would no longer work. It would compile OK, but when I tried to load it, it gave an error like, “Cannot locate kernel version this module was compiled for”, and would not load. ITE had updated the driver by this time. I downloaded and compiled it and got the same results. Skip forward to Tuesday, 20040629. I downloaded and did a fresh install of Slackware 10.0. Just for giggles, I compiled the raid driver and tried it. Lo and behold, it worked. Something in the upgrade from 9.1 to current caused the newly compiled module not to work with kernel 2.4.26 that came with current. (I haven't had the intestinal fortitude to try a 2.6 series kernel, yet. That may be next.) My questions are: 1) What programs/packages do I NOT upgrade in order to ensure that I can compile modules that will work with the kernel I am now using? 2) Would a solution have been to compile the kernel, then the module, so that all would be complied with the same compiler, or whatever?
Oh, thanks for all the previous help. I haven't posted much, but I've done a lot of searching and lurking!
Regards,
Bill

bwkaz
07-01-2004, 06:36 PM
I'm guessing the issue was CONFIG_MODVERSIONS ("Enable versioning information in modules", or something like that, is the menuconfig description). But I'm not really sure.

MMYoung
07-01-2004, 07:20 PM
It was probably the upgrade of gcc 3.2.x in Slackware 9.1 to gcc 3.3.x in current. After you download and install the next major release of gcc you would have to recompile the kernel in order to compile any new modules for it. Or at least that was my experience anyway.

Later,
MMYoung

kevinalm
07-01-2004, 11:35 PM
Gcc version can and frequently does cause problems, but I suspect not in this case. Since the error was a kernel version error, and because he was upgrading the kernel and compiling a seperate module from source, the most likely cause was not having rebooted into the new kernel before compiling the custom module. I've done that myself. It's surprisingly easy to lose track of which kernel is actually running, and since custom module source does the equivalent of uname -r to setup for kernel version you can easily end up compiling a module for the wrong kernel version. Just my 2 cents. ;)

T2F
07-06-2004, 10:56 AM
Thanks for the input. I appreciate it. I will check out all the suggestions. Of course, now I have also safely tucked away a copy of the compiled module, referenced to the kernel version number and date.
Regards,
Bill