Driver Installation Ubuntu kernel 2.6.17 Basic Help
ahuguet at cttc.es
ahuguet at cttc.es
Thu Apr 5 07:47:28 EDT 2007
make -C /usr/src/linux-source-2.6.17 SUBDIRS=`pwd` modules
this seems to work much faster and go to the point of the modified files
for the module, thank you.
Now, even if I use the make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ clean
doesn't seem to make any difference.
So, as it seems, I'll just stick with the command you provided.
Substituting SUBDIRS=./ with SUBDIRS=`pwd` was the key.
Could you explain what the `pwd` order differs with ./ so that it now works?
I was afraid the compiled modules would not be portable. Somehow I
expected something similar to a java applet, as if the modules would need
a "java virtual machine" ("module virtual machine" :) ) that ends the job.
I guess there should be no problem taking the code and compiling the
sources on another Linux.
To load the newly compiled modules, I just remove the old ones in use with
rmmod and load the module anew with modprobe, right?
I'll review too the link you provided, thanks for all the information :)
> ahuguet at cttc.es wrote:
>>> maybe add a
>>> 2.5 'make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ clean'
>> If I do this, I get:
>> CLEAN .
>> CLEAN .//.tmp_versions
>> Then: make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules
>> I get:
>> CC arch/i386/kernel/asm-offsets.s
>> GEN include/asm-i386/asm-offsets.h
>> Building modules, stage 2.
> That's not right. It should have "CC (M)"'ed a bunch of files too.
> Does it work any differently if you use SUBDIRS="`pwd`" instead of "./"?
>> Once I have compiled the hostap modules, that are then stored at:
>> and that are hostap.ko, hostap_cs.ko, hostap_pci.ko, hostap_plx.ko
>> Could I simply copy this modules, and paste them in another linux
>> distribution computer, inside its modules folder, and load them with
> Absolutely not. The internal kernel interfaces are explicitly *not*
> stable. (See  -- the relevant parts there are under the "Binary
> Kernel Interface" section. That document doesn't address what you're
> trying to do exactly, but much of the information is still relevant).
> Modules can *not* be moved from one kernel version to another, because
> there is no stable binary interface in the kernel. Even changing some
> options in .config changes the module interface (e.g. regparm,
> 4K-stacks, SMP, etc.). If the gcc version changes, that's also a
> But it's a problem with all kernel modules, not just hostap.
>> If I can't I guess I'll have to port the code (hostap .c and .h files)
>> compile anew there, make modules, and use them, but I wondered if I
>> skip the compilation process there.
> Can't skip it, sorry.
>  http://www.kroah.com/log/linux/stable_api_nonsense.html
More information about the HostAP