<br><div><span class="gmail_quote">On 4/5/07, <b class="gmail_sendername"><a href="mailto:ahuguet@cttc.es">ahuguet@cttc.es</a></b> <<a href="mailto:ahuguet@cttc.es">ahuguet@cttc.es</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Bryan,<br><br>Substituting SUBDIRS=./ with SUBDIRS=`pwd` was the key.<br>Could you explain what the `pwd` order differs with ./ so that it now works?</blockquote><div><br>Thanks for that suggestion Bryan.<br><br>I can't resist jumping back into the thread for a second, though. :)
<br><br>pwd returns the p_resent w_orking d_irectory. <br>the back-ticks, "``", indicate to execute the command between the marks.<br> (I think bash has deprecated that usage in favor of "$()", but I don't know
<br> which way is more portable across different shells.)<br>So when the make command is executed, the `pwd` gets replaced<br> with the present working directory, in your case:<br>/usr/src/linux-headers-2.6.17-11/drivers/net/wireless/hostap
<br>(it should be the same as ./, but hey, your mileage will obviously vary)<br>So perhaps I will update my 'recipe' to use<br><br>make -C /usr/src/linux-source-2.6.17 SUBDIRS=$(/bin/pwd) modules<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was afraid the compiled modules would not be portable. Somehow I<br>expected something similar to a java applet, as if the modules would need<br>a "java virtual machine" ("module virtual machine" :) ) that ends the job.
<br><br>I guess there should be no problem taking the code and compiling the<br>sources on another Linux.</blockquote><div><br>You can compile the modules on one box and transfer them to another for<br> loading, but all the stars must be correctly aligned: You need the same
<br> kernel source and .config used to build the kernel and modules of the other box,<br> you need the same version of gcc. When you transfer the new *.ko files,<br> you must make sure there are not old versions in another location -- usually
<br> not a problem for in-tree modules. This is very handy when your target<br> machine takes a long time to compile code, or does not have the space<br> to hold all the kernel sources. It's a kind of minimal cross-compile.
<br> </div><br></div>