Driver Installation Ubuntu kernel 2.6.17 Basic Help
Wed Apr 4 11:17:23 PDT 2007
On 4/4/07, ahuguet at cttc.es <ahuguet at cttc.es> wrote:
> If I run:
> make -C /usr/src/linux-source-2.6.17
> without the SUBDIRS=./ modules part, seems that the compilation process is
> Any ideas about why it does so without that?
Leaving out the SUBDIRS= is fine, you'll just build all modules in the
entire tree, could take a little longer is all.
try first removing the old *.ko files in your wireless/hostap/ directory,
or "make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ clean"
> 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
> > 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
see above, maybe compiler didn't think it needed to do anything since .o and
.ko files are already there.
> > 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 220.127.116.11-ubuntu1
> > then exits directory.
> > I keep with:
> > depmod -ae
> > that returns no message.
no news is good news in this case, but maybe this was already done
from modules_install command, which probably just re-installed the same
(previous) *.ko files into /lib/modules/18.104.22.168-ubuntu1/whatever/
> > 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
> > try if when doing the make command, the errors were showed to me, but
> > 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_80211_rx.c hostap_cs.mod.c hostap_main.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
If you list with "ls -ltr" your newest files will be at the bottom of the
you can tell conclusively if the *.ko is newer than your edited *.[ch]'s.
> 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 editor created the *.c~ and *.h~ files, they are backups of the .c and
files from when you opened them with the editor, but not necessarily
the originals. You can always re-install the originals from the tarball,
or manually copy them to something like hostap_80211.c.orig, in case
you want to generate a nice diff.
> 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
> > 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
> >>> > (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
maybe add a
2.5 'make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ clean'
>> 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
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> HostAP mailing list
> HostAP at shmoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Hostap