On Tue, 2003-02-18 at 07:54, tim schofield wrote:
--- Anders Johansson <andjoh@rydsbo.net> wrote: > On Mon, 2003-02-17 at 23:50, tim schofield wrote:
Dear All
While trying to compile and install a driver i get the following messages during modprobe:
"Using /lib/modules/2.4.19-64GB-SMP/net/hostap_plx.o /lib/modules/2.4.19-64GB-SMP/net/hostap_plx.o: kernel-module mismatch /lib/modules/2.4.19-64GB-SMP/net/hostap_plx.o was compiled for kernel version 2.4.19 while this kernel is version 2.4.19-64GB-SMP"
I am using the 2.4.19-64GB-SMP kernel - an updated one "k_smp-2.4.19-163.rpm"
I have installed the kernel sources from the SuSE 8.1 cd - i guess this is causing the error message.
To solve this do i install the k_smp-2.4.19-163.src.rpm (in /usr/src) or am i missing the point of this?
Before you compile your module you must prepare the sources, so they reflect the running kernel
cd /usr/src/linux make mrproper make cloneconfig make dep touch /usr/src/linux/include/linux/modversions.h
After that you can compile yor module, and it will fit nicely into the running kernel
Anders
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Anders
Thanks very much for that - worked like a dream
Could you tell me a couple of things:
1. Where shouuld i have gone to RTFM - i couldn't find anyting related to this on the web ?
I'm not sure, actually. This list has been a huge source of information for me, but I'm sure there are tonnes of web sites as well. I'll leave that question for others. However, a lot of information can be found in /usr/src/linux/Documentation
2. If there isn't a RTFM could you explain what the make steps do ?
cd /usr/src/linux
self explanatory :)
make mrproper
Cleans out the source tree, removing bits from previous compiles that may be in there. Also removes old config files.
make cloneconfig
This is a SuSE hack, as far as I'm aware. This reads the configuration from the running kernel, using the dynamic file /proc/config.gz, and uses that to create an identical configuration for the sources. This ensures that you can compile a kernel identical to the one SuSE supplies. Most people use that as a starting point for experimenting with kernel options.
make dep
Standard kernel compilation command. It creates dependency files which determine the order in which things are to be compiled. It also creates various header files with information from the configuration.
touch /usr/src/linux/include/linux/modversions.h
I'm not actually sure if this is necessary. The SuSE kernels don't use module versioning so that header file is never created by "make dep". But a lot of compiles, notably the nvidia graphics driver, fail if that file isn't present. The command creates an empty file of that name, which seems to be all that's needed. As I say, I'm not sure about this one, but it's worked for me so far. Anders