List Info

Thread: Driver Installation Ubuntu kernel 2.6.17 Basic Help




Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-03-19 06:35:18
I'm fairly new to Linux OS usage, and I'd need some help
with the HostAP
driver installation.

I tried using the search functionality of this mailing list,
but it
returns me an error every time I try to enter a query and
search for it.

The first thing I noticed is that now HostAP is bundled with
Linux kernel,
where the updates to the driver are done, thus it's not
recommended to use
standalone driver packages (aka version 0.4.9)

I've read the readme file available from the HostAP website,
and I've
found out there are three installing methods depending on
the card to use.

Either way, in all cases, there's a Makefile to be found and
edited. The
KERNEL_PATH should be edited to point to the kernel path of
my system, if
I understood correctly.

I've installed Ubuntu, and updated it as soon as I was
prompted to.

I went then to find the folder in my system that holds said
Makefile, to
install the driver.

I went to:

/usr/src/

There I've four folders:

1) linux-headers-2.6.17-10
2) linux-headers-2.6.17-10-generic
3) linux-headers-2.6.17-11
4) linux-headers-2.6.17-11-generic

Seems that the latter two belong to the updated kernel.
1&3 have the same amount of files (same happens with
2&4) so I assume 1&2
are safe copies of the "old" kernel. I'm not aware
if they can be deleted
right away, though.

In any case, entering any of said folders (for instance 3)
and going to:
/usr/src/linux-headers-2.6.17-11/drivers/net/wireless/hostap


is where I find two files, Kconfig and Makefile.

I paste here the content of said Makefile:

hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o
hostap_info.o 
            hostap_ioctl.o hostap_main.o hostap_proc.o
obj-$(CONFIG_HOSTAP) += hostap.o

obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
obj-$(CONFIG_HOSTAP_PLX) += hostap_plx.o
obj-$(CONFIG_HOSTAP_PCI) += hostap_pci.o



I see no KERNEL_PATH to be edited in it, so I guess I'm
looking at an
incorrect Makefile? If so, could someone point me where to
find the
correct Makefile to install HostAP driver?


Another thing I noticed is that on:

/lib/modules/2.6.17-10-generic/kernel/drivers/net/wireless/h
ostap

(or 2.6.17-11-generic)

there are 4 files: hostap.ko hostap_cs.ko hosta_pci.ko and
hostap_plx.ko

Seeing the pasted Makefile above, seems as if this files
should be .o
instead of .ko. I've read that, when they're .ko it means
they're "module"
thus the kernel has to load and unload them every time,
becoming a bit
inefficient in that process.

To sum up:
First step: Is that Makefile I found, the one to be used in
order to
install HostAP driver?
If so, where is KERNEL_PATH to be edited?
Will the .ko files be a problem during the installation
process?

Thanks everyone for any help that could be given to go
solving this steps.
I'll use this thread as to compose a
"step-by-step" questionary process to
have the HostAP driver installed and assigned to be used by
the wireless
card.


_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-03-19 22:17:44
On Mon, Mar 19, 2007 at 12:35:18PM +0100, ahuguetcttc.es
wrote:

> I tried using the search functionality of this mailing
list, but it
> returns me an error every time I try to enter a query
and search for it.

Oops.. That feature of the old web server was not enabled on
the new
server. I'll try to remember to do something about this at
some point..

> The first thing I noticed is that now HostAP is bundled
with Linux kernel,
> where the updates to the driver are done, thus it's not
recommended to use
> standalone driver packages (aka version 0.4.9)

"not recommended" is not strong enough..
"Must not use" would be
closer. Anyway, the standalone package does not even build
with current
kernel versions.

> I've read the readme file available from the HostAP
website, and I've
> found out there are three installing methods depending
on the card to use.

None of which would be something you would do with Linux
2.6.17. With
this kernel version (and any other recent 2.6 version for
that matter),
you will need to build Host AP driver as part of the kernel
build. If
you are using a generic distro kernel (i.e., from Ubuntu in
this case),
the Host AP driver may already be included and would not
need to be
installed separately. If that is not the case, you may want
to follow
whatever mechanism the distro uses for configured and
building the
kernel.

-- 
Jouni Malinen                                            PGP
id EFC895FA
_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-03-20 05:59:20
> None of which would be something you would do with
Linux 2.6.17. With
> this kernel version (and any other recent 2.6 version
for that matter),
> you will need to build Host AP driver as part of the
kernel build. If
> you are using a generic distro kernel (i.e., from
Ubuntu in this case),
> the Host AP driver may already be included and would
not need to be
> installed separately. If that is not the case, you may
want to follow
> whatever mechanism the distro uses for configured and
building the
> kernel.


Indeed I'm using Ubuntu "out of the cage".
I'd say the way Ubuntu has to deal with this packages, in
order to have
them properly installed in the system is through Synaptic
Package Manager.
Making a search on it with "hostap" returned
results for:

hostapd
hostap-source
hostap-utils

It seems to me the proper package to install is the
hostap-source, and
will use Synaptics in order to do so.

I've read, on other websites that there might be conflict
with drivers,
and that maybe it's needed to blacklist certain drivers in
order to make
the system use HostAP driver for the card, and no other.

What is the way to ensure the system is using the HostAP
driver, on a
given device?

How can I know what driver version is being used by the
device in
question, once I've told the system to use only HostAP with
said device?
I'm saying this because Synaptic shows HostAP-source version
as:
1:0.4.1-1
I understand this would be version 1.0.4.1, cause version
0.4.9 is marked
as old stable release and should not be used with new
kernels.

Thanks again for your help.

_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-03-20 21:13:58
On Tue, Mar 20, 2007 at 11:59:20AM +0100, ahuguetcttc.es
wrote:

> I'd say the way Ubuntu has to deal with this packages,
in order to have
> them properly installed in the system is through
Synaptic Package Manager.
> Making a search on it with "hostap" returned
results for:
> 
> hostapd
> hostap-source
> hostap-utils

I don't know how kernel modules are distributed in Ubuntu,
but my guess
would be that this hostap-source is not the correct version
and the you
should be one from the kernel tree instead. You may need
hostap-utils
(e.g., if you need to upgrade the firmware on the card).
hostapd would
be needed only if you are planning on setting the card in AP
mode.

> How can I know what driver version is being used by the
device in
> question, once I've told the system to use only HostAP
with said device?
> I'm saying this because Synaptic shows HostAP-source
version as:
> 1:0.4.1-1
> I understand this would be version 1.0.4.1, cause
version 0.4.9 is marked
> as old stable release and should not be used with new
kernels.

I think that you are looking at incorrect package. This
question sounds
very much specific to Ubuntu and I have no idea how that
work. Using a
distro specific mailing list could be more fruitful resource
for
resolving this.

-- 
Jouni Malinen                                            PGP
id EFC895FA
_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-03-21 06:01:14
> I don't know how kernel modules are distributed in
Ubuntu, but my guess
> would be that this hostap-source is not the correct
version and the you
> should be one from the kernel tree instead. You may
need hostap-utils
> (e.g., if you need to upgrade the firmware on the
card). hostapd would
> be needed only if you are planning on setting the card
in AP mode.
>
> I think that you are looking at incorrect package.

Indeed.

Fortunately I noticed, by opening the file and examining
dates of the
archives inside that the hostap-source that synaptics
fetched was 0.4.1. I
did not unpack its contents, and deleted the file.

Probably due to my initiation into the Linux world, I did
not express
myself with enough clarity. I'll try to rewrite it again,
trying to be
more accurate, as I go understanding a bit more the OS.

As mentioned, I've installed Ubuntu.
Right out of the box, Ubuntu has linux kernel headers, but
not the sources
inside /usr/src directory.
The HostAP driver is provided as a "module".
This means it can be loaded with "modprobe"
command, and unloaded with
"modprobe -r" or "rmmod".

Theoretically, that way one can make a wifi device use
hostAP as driver.
But that was not enough to my needs, as I need to make
certain
modifications to the hostAP code, in order to perform
certain lab
experiments, trying to simulate modifications to the
standard protocols.

Having the driver in module form, I think there's no way to
edit its code
(that is, there is no .c nor .h file to be found related to
HostAP driver,
anywhere)

That's why I tried to fetch the hostap source through
synaptics. As you
very well said, Jouni, that file was outdated, and I did not
use it.

Instead, I've downloaded this time, the linux-source-2.6.17,
which
contains the kernel source.

That way, by uncompressing the tar file, now at:
/usr/src/linux-source-2.6.17/drivers/net/wireless
I've a hostap folder, containing the .c and .h files,
together with a
Makefile and Kconfig file:

hostap_80211.h     hostap_common.h    hostap_hw.c    
hostap_plx.c
hostap_80211_rx.c  hostap_config.h    hostap_info.c  
hostap_proc.c
hostap_80211_tx.c  hostap_cs.c        hostap_ioctl.c 
hostap_wlan.h
hostap_ap.c        hostap_download.c  hostap_main.c  
Kconfig
hostap_ap.h        hostap.h           hostap_pci.c   
Makefile

Seems that this is what you told me to do on your first
reply.

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?

Also, how can I know what version of HostAP is the one at
/usr/src/linux-source-2.6.17/drivers/net/wireless/hostap?

Thank you for the help and guidance through all this
process.



_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-03-21 20:58:58
On Wed, Mar 21, 2007 at 12:01:14PM +0100, ahuguetcttc.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?

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.

> Also, how can I know what version of HostAP is the one
at
>
/usr/src/linux-source-2.6.17/drivers/net/wireless/hostap?

It is "the version that comes with Linux 2.6.17".
There is no external
package with the same driver and as such, no mapping to any
other
version number.

-- 
Jouni Malinen                                            PGP
id EFC895FA
_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-03-22 07:52:21


On 3/21/07, Jouni Malinen < jw1.fi">jw1.fi> wrote:
On Wed, Mar 21, 2007 at 12:01:14PM +0100, ahuguetcttc.es">ahuguetcttc.es wrote:

&gt; 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
&gt; anew?
>
> Couldn';t be a way to just tell the system to compile HostAP, and use that
> "new&quot; version, without need of recompiling the whole kernel?

My "secret recipe&quot; for compiling just an individual driver is
&nbsp;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=./ modules9;
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
Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-04-04 05:17:20
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/hos
tap_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 <jw1.fi> wrote:
>>
>> On Wed, Mar 21, 2007 at 12:01:14PM +0100,
ahuguetcttc.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
> HostAPshmoo.com
> http:/
/lists.shmoo.com/mailman/listinfo/hostap
>


_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-04-04 08:28:02
Update:

If I run:

make -C /usr/src/linux-source-2.6.17
without the SUBDIRS=./ modules part, seems that the
compilation process is
launched.

Any ideas about why it does so without that?

> 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/hos
tap_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 <jw1.fi>
wrote:
>>>
>>> On Wed, Mar 21, 2007 at 12:01:14PM +0100,
ahuguetcttc.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
>> HostAPshmoo.com
>> http:/
/lists.shmoo.com/mailman/listinfo/hostap
>>
>
>
> _______________________________________________
> HostAP mailing list
> HostAPshmoo.com
> http:/
/lists.shmoo.com/mailman/listinfo/hostap
>


_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-04-04 13:17:23


On 4/4/07, ahuguetcttc.es">ahuguetcttc.es < ahuguetcttc.es">ahuguetcttc.es&gt; wrote:
Update:

If I run:

make -C /usr/src/linux-source-2.6.17
without the SUBDIRS=./ modules part, seems that the compilation process is
launched.

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.
&gt;
> So I do:
> gedit
> /usr/src/linux-source-2.6.17/drivers/net/wireless/hostap/hostap_80211_rx.c
&gt;
> in order to edit the .c file and add code to it. (I previously became
>; superuser with the su command)
&gt;
> I make my changes to the file, then exit the editor.
&gt; After that, I try to use your recipe, Bob.
>; So:
>
&gt; make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules
&gt;
> it then says it enters into /usr/src/linux-source-2.6.17
>; and I get this:
>
 Building modules, stage 2.
>&nbsp;  MODPOST
&gt;
> 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.
&nbsp;

>
> After I keep with your recipe:
&gt;
> make -C /usr/src/linux- source-2.6.17 SUBDIRS=./ modules_install
>
> I get, enters into directory then:
> DEPMOD&nbsp; 2.6.17.14-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/2.6.17.14-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 to
> try if when doing the make command, the errors were showed to me, but no.
>
&gt; I'll list you the content of:
>
> /usr/src/linux-source-2.6.17/drivers/net/wireless/hostap# ls
>
&gt; built-in.o  ; &nbsp; &nbsp; &nbsp; &nbsp;hostap_config.h&nbsp; &nbsp; hostap_ioctl.o &nbsp; &nbsp;hostap_plx.c
> hostap_80211.h &nbsp;   ; hostap_cs.c&nbsp; &nbsp; &nbsp; &nbsp; hostap.ko&nbsp; &nbsp;   ; &nbsp; hostap_plx.ko
> hostap_80211.h~   ;  hostap_cs.ko &nbsp; &nbsp; &nbsp; hostap_main.c &nbsp; &nbsp; hostap_plx.mod.c
> hostap_80211_rx.c&nbsp;  hostap_cs.mod.c   ; hostap_main.o&nbsp; &nbsp;  hostap_plx.mod.o
> hostap_80211_rx.c~&nbsp; hostap_cs.mod.o &nbsp; &nbsp;hostap.mod.c &nbsp; &nbsp; &nbsp; hostap_plx.o
> hostap_80211_rx.o&nbsp;  hostap_cs.o &nbsp; &nbsp; &nbsp; &nbsp;hostap.mod.o ; &nbsp; &nbsp; hostap_proc.c
> hostap_80211_tx.c&nbsp;  hostap_download.c&nbsp; hostap.o   ; &nbsp; &nbsp; &nbsp; hostap_proc.o
> hostap_80211_tx.o&nbsp;  hostap.h&nbsp; &nbsp;   ; &nbsp; &nbsp; hostap_pci.c &nbsp; &nbsp; &nbsp;hostap_wlan.h
&gt; hostap_ap.c &nbsp; &nbsp; &nbsp; &nbsp; hostap_hw.c &nbsp; &nbsp; &nbsp; &nbsp;hostap_pci.ko&nbsp; &nbsp;  Kconfig
&gt; hostap_ap.h &nbsp; &nbsp; &nbsp; &nbsp; hostap_info.c &nbsp; &nbsp;  hostap_pci.mod.c  ;Makefile
&gt; hostap_ap.o &nbsp; &nbsp; &nbsp; &nbsp; hostap_info.o &nbsp; &nbsp;  hostap_pci.mod.o
> hostap_common.h   ;  hostap_ioctl.c &nbsp;   hostap_pci.o
>

If you list with "ls -ltr" your newest files will be at the bottom of the list and
 you can tell conclusively if the *.ko is newer than your edited *.[ch]';s.


> I notice that files "hostap_80211.h&quot; 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.
&gt; 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 .h
 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.

&nbsp;

> 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?
&gt;
> Thank you again for all your cooperation.
>
>;
>
>
>> On 3/21/07, Jouni Malinen < jw1.fi">jw1.fi> wrote:
>;>>
&gt;>> On Wed, Mar 21, 2007 at 12:01:14PM +0100, ahuguetcttc.es">ahuguetcttc.es wrote:
>;>>
&gt;>> > 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?
>>> >
>&gt;> > Couldn';t be a way to just tell the system to compile HostAP, and use
>&gt;> that
>&gt;> > "new&quot; version, without need of recompiling the whole kernel?
>>
&gt;>
>> My "secret recipe&quot; for compiling just an individual driver is
>>; &nbsp;approximately this:
>>
>&gt; 1 - cd to the hostap directory, /usr/src/linux-source-2.6.17
&gt;> /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=./ modules9;
>> 4 - 'make -C /usr/src/linux-source-2.6.17 SUBDIRS=./ modules_install'
>> 5 - 'depmod -ae'
&gt;>
&gt;> Then do the rest of what Jouni says; reload (the new) modules, and try
>&gt; it
>>; out.
>&gt;
>>; 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
>&gt;> rebuild or reboot the full kernel.
&gt;>>
>>>;
>>
>> I hope this is helpful, (and anyone who finds an error, please correct
&gt;> me!)
>&gt;
>>; Bob Beers
&gt;> _______________________________________________
>&gt; HostAP mailing list
>&gt; HostAPshmoo.com">HostAPshmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
>>
>
&gt;
> _______________________________________________
> HostAP mailing list
> HostAPshmoo.com">HostAPshmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>


_______________________________________________
HostAP mailing list
HostAPshmoo.com"> HostAPshmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
user name
2007-04-05 08:43:47

On 4/5/07, ahuguetcttc.es">ahuguetcttc.es < ahuguetcttc.es">ahuguetcttc.es&gt; wrote:
Hi Bryan,

Substituting SUBDIRS=./ with SUBDIRS=`pwd` was the key.
Could you explain what the `pwd` order differs with ./ so that it now works?

Thanks for that suggestion Bryan.

I can't resist jumping back into the thread for a second, though.

pwd returns the p_resent w_orking d_irectory
the back-ticks, "``&quot;, indicate to execute the command between the marks.
&nbsp;(I think bash has deprecated that usage in favor of "$()&quot;, but I don't know
&nbsp;which way is more portable across different shells.)
So when the make command is executed, the `pwd` gets replaced
&nbsp;with the present working directory, in your case:
/usr/src/linux-headers-2.6.17-11/drivers/net/wireless/hostap
(it should be the same as ./, but hey, your mileage will obviously vary)
So perhaps I will update my 'recipe' to use

make -C /usr/src/linux-source-2.6.17 SUBDIRS=$(/bin/pwd)&nbsp; modules
&nbsp;

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&quot; ("module virtual machine&quot; ) that ends the job.

I guess there should be no problem taking the code and compiling the
sources on another Linux.

You can compile the modules on one box and transfer them to another for
 loading, but all the stars must be correctly aligned: You need the same
&nbsp;kernel source and .config used to build the kernel and modules of the other box,
 ;you need the same version of gcc.  When you transfer the new *.ko files,
&nbsp;you must make sure there are not old versions in another location -- usually
 not a problem for in-tree modules.&nbsp; This is very handy when your target
&nbsp;machine takes a long time to compile code, or does not have the space
&nbsp;to hold all the kernel sources.&nbsp; It's a kind of minimal cross-compile.
&nbsp;

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-04-05 06:47:28
Hi Bryan,

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 


> ahuguetcttc.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.
>>   MODPOST
>
> 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:
>>
/lib/modules/2.6.17.14-ubuntu1/kernel/drivers/net/wireless/h
ostap
>> and that are hostap.ko, hostap_cs.ko,
hostap_pci.ko, hostap_plx.ko
>> right?
>>
>> Could I simply copy this modules, and paste them in
another linux
>> distribution computer, inside its modules folder,
and load them with
>> modprobe?
>
> Absolutely not.  The internal kernel interfaces are
explicitly *not*
> stable.  (See [1] -- 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
> problem.
>
> 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
>> could
>> skip the compilation process there.
>
> Can't skip it, sorry.
>
> [1] http://www.kroah.com/log/linux/stable_api_nonsense.html
>
>


_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

Re: Driver Installation Ubuntu kernel 2.6.17 Basic Help
country flaguser name
Spain
2007-04-05 04:51:28
Thank you a whole bunch Bob, for your explanations and
suggestions.


> 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.
  MODPOST

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

I get:
DEPMOD  2.6.17.14-ubuntu1

So, as you can see no errors shown.
And I purposedly wrote a line in hostap_80211_rx.c that is
literally:
gergass=gegfeadfwae;

So it should give an error. But as you see, it did not.

Instead, using only: make -C /usr/src/linux-source-2.6.17
seems to launch
the compiling in a better way, and the error appears.

Since I used the make -C /usr/src/linux-source-2.6.17
SUBDIRS=./ clean
command now, this latter make took more time than before.
But if that
order is omitted, the make takes significantly less time.

In any case...
once the make, and then make modules_install commands are
done, in order
to have the new modules up and running should I do the
following?

rmmod hostap (or modprobe -r hostap)
and then
modprobe hostap

Would that load the newly compiled modules?
And even another thing:

Once I have compiled the hostap modules, that are then
stored at:
/lib/modules/2.6.17.14-ubuntu1/kernel/drivers/net/wireless/h
ostap
and that are hostap.ko, hostap_cs.ko, hostap_pci.ko,
hostap_plx.ko right?

Could I simply copy this modules, and paste them in another
linux
distribution computer, inside its modules folder, and load
them with
modprobe?
That is, are the modules to be found on
/lib/modules/*kernelversion*/kernel/drivers/net/wireless/hos
tap portable?

I'd like trying to port the modules of my Ubuntu 2.6.17.14
kernel to a
Knoppix system with 2.6.16.13.

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 could
skip the compilation process there.

Thanks again for all the help.

_______________________________________________
HostAP mailing list
HostAPshmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap

[1-13]

about | contact  Other archives ( Real Estate discussion Medical topics )