Driver Installation Ubuntu kernel 2.6.17 Basic Help

ahuguet at cttc.es ahuguet
Wed Apr 4 03:17:20 PDT 2007


Thank you Jouni and Bob.

I found out I needed to compile the kernel sources at least one time
before using your recipe Bob, so I did compile the kernel sources, and
installed the .deb resulting packages to have the kernel (which is now
2.6.17-14)

I'm trying then to edit some files of the driver.

So I do:
gedit
/usr/src/linux-source-2.6.17/drivers/net/wireless/hostap/hostap_80211_rx.c

in order to edit the .c file and add code to it. (I previously became
superuser with the su command)

I make my changes to the file, then exit the editor.
After that, I try to use your recipe, Bob.
So:

make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules

it then says it enters into /usr/src/linux-source-2.6.17
and I get this:

 Building modules, stage 2.
  MODPOST

Then it says it exits /usr/src/linux-source-2.6.17

After I keep with your recipe:

make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules_install

I get, enters into directory then:
DEPMOD  2.6.17.14-ubuntu1
then exits directory.

I keep with:

depmod -ae

that returns no message.

The point is, how is it that I've not been notified of any error or
warning at all? I even purposedly added a garbage line there, in order to
try if when doing the make command, the errors were showed to me, but no.

I'll list you the content of:

/usr/src/linux-source-2.6.17/drivers/net/wireless/hostap# ls

built-in.o          hostap_config.h    hostap_ioctl.o    hostap_plx.c
hostap_80211.h      hostap_cs.c        hostap.ko         hostap_plx.ko
hostap_80211.h~     hostap_cs.ko       hostap_main.c     hostap_plx.mod.c
hostap_80211_rx.c   hostap_cs.mod.c    hostap_main.o     hostap_plx.mod.o
hostap_80211_rx.c~  hostap_cs.mod.o    hostap.mod.c      hostap_plx.o
hostap_80211_rx.o   hostap_cs.o        hostap.mod.o      hostap_proc.c
hostap_80211_tx.c   hostap_download.c  hostap.o          hostap_proc.o
hostap_80211_tx.o   hostap.h           hostap_pci.c      hostap_wlan.h
hostap_ap.c         hostap_hw.c        hostap_pci.ko     Kconfig
hostap_ap.h         hostap_info.c      hostap_pci.mod.c  Makefile
hostap_ap.o         hostap_info.o      hostap_pci.mod.o
hostap_common.h     hostap_ioctl.c     hostap_pci.o

I notice that files "hostap_80211.h" and "hostap_80211_rx.c" have a copy
with a ~ on them, as if they were temporary files. Those two, the ones
ending with .c and .h have been the ones I've tried to modify.
I saved the changes in the editor, and closed the editor program.
The only thing I've opened right now is Firefox to compose this mail.
Could it be that no errors are being shown, because the files have not yet
been properly saved?
If so, what am I doing wrong?

Thank you again for all your cooperation.




> On 3/21/07, Jouni Malinen <j at w1.fi> wrote:
>>
>> On Wed, Mar 21, 2007 at 12:01:14PM +0100, ahuguet at cttc.es wrote:
>>
>> > Reading it, seems that the only way to make use of that HostAP driver
>> > (with modified code lines on .c and .h files) is to compile the kernel
>> > anew?
>> >
>> > Couldn't be a way to just tell the system to compile HostAP, and use
>> that
>> > "new" version, without need of recompiling the whole kernel?
>
>
> My "secret recipe" for compiling just an individual driver is
>  approximately this:
>
> 1 - cd to the hostap directory, /usr/src/linux-source-2.6.17
> /drivers/net/wireless/hostap
> 2 - make your changes and save them
> 3 - 'make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules'
> 4 - 'make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules_install'
> 5 - 'depmod -ae'
>
> Then do the rest of what Jouni says; reload (the new) modules, and try it
> out.
>
> If you build Host AP driver as a kernel module, you can just rebuild it
>> and reload the modules to update the driver without having to
>> rebuild or reboot the full kernel.
>>
>>
>
> I hope this is helpful, (and anyone who finds an error, please correct
> me!)
>
> Bob Beers
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>






More information about the Hostap mailing list