linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Build instructions for cross-compilation environment
@ 2009-07-15 20:09 Philip A. Prindeville
  2009-07-15 21:51 ` Bob Copeland
  0 siblings, 1 reply; 5+ messages in thread
From: Philip A. Prindeville @ 2009-07-15 20:09 UTC (permalink / raw)
  To: linux-wireless; +Cc: mcgrof

Hi.

I'm the lead developer for Astlinux.

We're doing a kernel bump from 2.6.26.8 to 2.6.27.26, and wanted to take
the opportunity to start using compat-wireless at the same time, because
we need (amongst other things) better mac80211/cfg80211/nl80211 and
AP-mode for the Ath5k chipset (AR5413, et al).

The README included in the tarball (compat-wireless-2.6.30.tar.bz2)
discusses building replacement drivers on the same system and placing
them into updates/.

I'd like to cross-compile this on a system and replace the drivers that
have been deposited by the plain-vanilla kernel build.

Also, a list of what CONFIG_xxx symbols I need to turn off to ensure
that there is no "residue" left over from the kernel build to interfere
with the compat-wireless build would be helpful (or alternatively,
what's the bare essential list of CONFIG_xxx symbols that need to be
enabled to "hook" compat-wireless into an existing kernel).

Looking at the Makefiles, it doesn't seem that cross-compilation is
ready out-of-the-box:

MADWIFI=$(shell $(MODPROBE) -l ath_pci)
OLD_IWL=$(shell $(MODPROBE) -l iwl4965)


Please reply to me directly (or even on Cc).  I tried to join the list a
couple of weeks ago, but my request hasn't yet been processed.

Thanks,

-Philip


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build instructions for cross-compilation environment
  2009-07-15 20:09 Build instructions for cross-compilation environment Philip A. Prindeville
@ 2009-07-15 21:51 ` Bob Copeland
  2009-07-15 22:11   ` Luis R. Rodriguez
  2009-07-15 22:40   ` Philip A. Prindeville
  0 siblings, 2 replies; 5+ messages in thread
From: Bob Copeland @ 2009-07-15 21:51 UTC (permalink / raw)
  To: Philip A. Prindeville; +Cc: linux-wireless, mcgrof

On Wed, Jul 15, 2009 at 4:09 PM, Philip A.
Prindeville<philipp_subx@redfish-solutions.com> wrote:
> Also, a list of what CONFIG_xxx symbols I need to turn off to ensure
> that there is no "residue" left over from the kernel build to interfere
> with the compat-wireless build would be helpful (or alternatively,
> what's the bare essential list of CONFIG_xxx symbols that need to be
> enabled to "hook" compat-wireless into an existing kernel).

At least CONFIG_{CFG80211,MAC80211}=m but you'll likely need to experiment.

> Looking at the Makefiles, it doesn't seem that cross-compilation is
> ready out-of-the-box:

Perhaps it isn't for the installation stuff, but I've had no problems
building the modules with a cross compiler.  And you said you wanted to
customize installation anyway (just copy the built modules under 'kernel'
if that's what you want.  It doesn't matter where they live as long as
depmod finds them;'updates' is nice for rollback, however.)

Here's my dumb cross compilation script, make-arm.sh:

#!/bin/bash

DIR=/home/bob/ext/linux-2.6
XGCC=/home/bob/projects/xgcc
export PATH="$XGCC/arm-2008q3/bin/:$PATH"
make ARCH=arm CROSS_COMPILE=arm-none-eabi- KLIB=$DIR KLIB_BUILD=$DIR "$@"

> Please reply to me directly (or even on Cc).  I tried to join the list a
> couple of weeks ago, but my request hasn't yet been processed.

Perhaps try again?  majordomo can be slow but two weeks slow sounds
off...

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build instructions for cross-compilation environment
  2009-07-15 21:51 ` Bob Copeland
@ 2009-07-15 22:11   ` Luis R. Rodriguez
  2009-07-15 22:40   ` Philip A. Prindeville
  1 sibling, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2009-07-15 22:11 UTC (permalink / raw)
  To: Bob Copeland; +Cc: Philip A. Prindeville, linux-wireless

On Wed, Jul 15, 2009 at 2:51 PM, Bob Copeland<me@bobcopeland.com> wrote:
> On Wed, Jul 15, 2009 at 4:09 PM, Philip A.
> Prindeville<philipp_subx@redfish-solutions.com> wrote:
>> Also, a list of what CONFIG_xxx symbols I need to turn off to ensure
>> that there is no "residue" left over from the kernel build to interfere
>> with the compat-wireless build would be helpful (or alternatively,
>> what's the bare essential list of CONFIG_xxx symbols that need to be
>> enabled to "hook" compat-wireless into an existing kernel).
>
> At least CONFIG_{CFG80211,MAC80211}=m but you'll likely need to experiment.

I take it you mean on your currently running kernel?

Your own kernel requirements aren't dramatic. Its actually very
simple. Enable networking (duh), PCI if you want PCI drivers, USB if
you want USB drivers, etc.

Wext is now optional but IIRC I haven't removed that requirement from
compat-wireless. So for now enable that.

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build instructions for cross-compilation environment
  2009-07-15 21:51 ` Bob Copeland
  2009-07-15 22:11   ` Luis R. Rodriguez
@ 2009-07-15 22:40   ` Philip A. Prindeville
  2009-07-16 16:19     ` Luis R. Rodriguez
  1 sibling, 1 reply; 5+ messages in thread
From: Philip A. Prindeville @ 2009-07-15 22:40 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless, mcgrof

[-- Attachment #1: Type: text/plain, Size: 13827 bytes --]

Bob Copeland wrote:
> On Wed, Jul 15, 2009 at 4:09 PM, Philip A.
> Prindeville<philipp_subx@redfish-solutions.com> wrote:
>> Also, a list of what CONFIG_xxx symbols I need to turn off to ensure
>> that there is no "residue" left over from the kernel build to interfere
>> with the compat-wireless build would be helpful (or alternatively,
>> what's the bare essential list of CONFIG_xxx symbols that need to be
>> enabled to "hook" compat-wireless into an existing kernel).
> 
> At least CONFIG_{CFG80211,MAC80211}=m but you'll likely need to experiment.
> 
>> Looking at the Makefiles, it doesn't seem that cross-compilation is
>> ready out-of-the-box:
> 
> Perhaps it isn't for the installation stuff, but I've had no problems
> building the modules with a cross compiler.  And you said you wanted to
> customize installation anyway (just copy the built modules under 'kernel'
> if that's what you want.  It doesn't matter where they live as long as
> depmod finds them;'updates' is nice for rollback, however.)
> 
> Here's my dumb cross compilation script, make-arm.sh:
> 
> #!/bin/bash
> 
> DIR=/home/bob/ext/linux-2.6
> XGCC=/home/bob/projects/xgcc
> export PATH="$XGCC/arm-2008q3/bin/:$PATH"
> make ARCH=arm CROSS_COMPILE=arm-none-eabi- KLIB=$DIR KLIB_BUILD=$DIR "$@"
> 
>> Please reply to me directly (or even on Cc).  I tried to join the list a
>> couple of weeks ago, but my request hasn't yet been processed.
> 
> Perhaps try again?  majordomo can be slow but two weeks slow sounds
> off...
> 


Hmmmm...  Found that a certain amount of patching was in order...  attached.

Now when I build, however, I'm getting some linkage warnings (below).  Is there an easy way to skip the PC-card/PCMCIA-based drivers?

Also, built my kernel with CONFIG_RFKILL=m ... that seems to be an issue.  Do I need to build it with =y instead?

Ditto with CONFIG_CRC_ITU_T=m

Logs:

make -j5 -C /home/philipp/kernel/build_i586/compat-wireless-2.6.30 \
		HOSTCC=gcc CC=/home/philipp/kernel/build_i586/staging_dir/bin/i586-linux-uclibc-gcc ARCH=i386 \
		KLIB=/lib/modules/2.6.27.26-astlinux KLIB_BUILD=/home/philipp/kernel/build_i586/linux-2.6.27.26-astlinux \
		MODPROBE='true' PWD=/home/philipp/kernel/build_i586/compat-wireless-2.6.30 \
		KMODDIR= \
		KMODPATH_ARG='INSTALL_MOD_PATH=/home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux' \
		install-modules
make[1]: Entering directory `/home/philipp/kernel/build_i586/compat-wireless-2.6.30'
make -C /home/philipp/kernel/build_i586/linux-2.6.27.26-astlinux M=/home/philipp/kernel/build_i586/compat-wireless-2.6.30 "INSTALL_MOD_DIR=" INSTALL_MOD_PATH=/home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux \
		modules_install
make[2]: Entering directory `/home/philipp/kernel/build_i586/linux-2.6.27.26-astlinux'
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/b44.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/usb/rndis_host.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/usb/cdc_ether.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/misc/eeprom/eeprom_93cx6.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/usb/usbnet.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/at76c50x-usb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/adm8211.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/ath5k/ath5k.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/ath9k/ath9k.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/b43legacy/b43legacy.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/b43/b43.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/ipw2x00/ipw2100.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/ipw2x00/libipw.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/ipw2x00/ipw2200.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/iwlwifi/iwl3945.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/iwlwifi/iwlcore.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/libertas/libertas.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/iwlwifi/iwlagn.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/libertas/usb8xxx.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/mac80211_hwsim.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/mwl8k.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/p54/p54common.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/p54/p54pci.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/p54/p54usb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rndis_wlan.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2400pci.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2500pci.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2500usb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2x00pci.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2x00lib.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt2x00usb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt73usb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rt2x00/rt61pci.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rtl818x/rtl8180.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/rtl818x/rtl8187.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/net/wireless/zd1211rw/zd1211rw.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/mac80211/mac80211.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/drivers/ssb/ssb.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/wireless/cfg80211.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/wireless/lib80211.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/wireless/lib80211_crypt_ccmp.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/wireless/lib80211_crypt_wep.ko
  INSTALL /home/philipp/kernel/build_i586/compat-wireless-2.6.30/net/wireless/lib80211_crypt_tkip.ko
  DEPMOD  2.6.27.26-astlinux
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/rt2x00/rt73usb.ko needs unknown symbol crc_itu_t_table
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/rt2x00/rt73usb.ko needs unknown symbol crc_itu_t
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/rt2x00/rt61pci.ko needs unknown symbol crc_itu_t_table
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/rt2x00/rt61pci.ko needs unknown symbol crc_itu_t
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/ath9k/ath9k.ko needs unknown symbol rfkill_force_state
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/ath9k/ath9k.ko needs unknown symbol rfkill_unregister
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/ath9k/ath9k.ko needs unknown symbol rfkill_free
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/ath9k/ath9k.ko needs unknown symbol rfkill_allocate
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/ath9k/ath9k.ko needs unknown symbol rfkill_register
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_disable_device
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_unregister_driver
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_map_mem_page
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_get_first_tuple
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_window
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_configuration
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_get_tuple_data
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_register_driver
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_parse_tuple
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_irq
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/ssb/ssb.ko needs unknown symbol pccard_get_first_tuple
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/ssb/ssb.ko needs unknown symbol pcmcia_access_configuration_register
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/ssb/ssb.ko needs unknown symbol pccard_get_tuple_data
WARNING: /home/philipp/kernel/build_i586/root//lib/modules/2.6.27.26-astlinux/lib/modules/2.6.27.26-astlinux/drivers/ssb/ssb.ko needs unknown symbol pccard_get_next_tuple
make[2]: Leaving directory `/home/philipp/kernel/build_i586/linux-2.6.27.26-astlinux'
make[1]: Leaving directory `/home/philipp/kernel/build_i586/compat-wireless-2.6.30'
/sbin/depmod -ae -F /home/philipp/kernel/build_i586/linux-2.6.27.26-astlinux/System.map -b /home/philipp/kernel/build_i586/root -r 2.6.27.26-astlinux
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_disable_device
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_unregister_driver
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_map_mem_page
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_get_first_tuple
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_window
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_configuration
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_get_tuple_data
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_register_driver
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pccard_parse_tuple
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/net/wireless/b43/b43.ko needs unknown symbol pcmcia_request_irq
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/ssb/ssb.ko needs unknown symbol pccard_get_first_tuple
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/ssb/ssb.ko needs unknown symbol pcmcia_access_configuration_register
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/ssb/ssb.ko needs unknown symbol pccard_get_tuple_data
WARNING: /home/philipp/kernel/build_i586/root/lib/modules/2.6.27.26-astlinux/extra/drivers/ssb/ssb.ko needs unknown symbol pccard_get_next_tuple


[-- Attachment #2: compat-wireless-makefile.patch --]
[-- Type: text/plain, Size: 2453 bytes --]

--- compat-wireless-2.6.30/Makefile.orig	2009-06-10 17:24:42.000000000 -0700
+++ compat-wireless-2.6.30/Makefile	2009-07-15 14:13:21.000000000 -0700
@@ -1,6 +1,6 @@
 export KMODDIR?=       updates
 KMODDIR_ARG:=   "INSTALL_MOD_DIR=$(KMODDIR)"
-ifneq ($(origin $(KLIB)), undefined)
+ifneq ($(origin KLIB), undefined)
 KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(KLIB)"
 else
 export KLIB:=          /lib/modules/$(shell uname -r)
@@ -11,6 +11,8 @@ MODPROBE := /sbin/modprobe
 MADWIFI=$(shell $(MODPROBE) -l ath_pci)
 OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
 
+DESTDIR?=
+
 ifneq ($(KERNELRELEASE),)
 
 include $(M)/$(COMPAT_CONFIG)
@@ -58,21 +60,25 @@ $(CREL_CHECK):
 	@touch $@
 	@md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK)
 
-install: uninstall modules
+install: uninstall install-modules install-scripts
+
+install-modules: modules
 	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
 		modules_install
+
+install-scripts:
 	@# All the scripts we can use
-	@mkdir -p /usr/lib/compat-wireless/
-	@install scripts/modlib.sh	/usr/lib/compat-wireless/
-	@install scripts/madwifi-unload	/usr/sbin/
+	@mkdir -p $(DESTDIR)/usr/lib/compat-wireless/
+	@install scripts/modlib.sh	$(DESTDIR)/usr/lib/compat-wireless/
+	@install scripts/madwifi-unload	$(DESTDIR)/usr/sbin/
 	@# This is to allow switching between drivers without blacklisting
-	@install scripts/athenable	/usr/sbin/
-	@install scripts/b43enable	/usr/sbin/
-	@install scripts/iwl-enable	/usr/sbin/
-	@install scripts/athload	/usr/sbin/
-	@install scripts/b43load	/usr/sbin/
-	@install scripts/iwl-load	/usr/sbin/
-	@if [ ! -z $(MADWIFI) ]; then \
+	@install scripts/athenable	$(DESTDIR)/usr/sbin/
+	@install scripts/b43enable	$(DESTDIR)/usr/sbin/
+	@install scripts/iwl-enable	$(DESTDIR)/usr/sbin/
+	@install scripts/athload	$(DESTDIR)/usr/sbin/
+	@install scripts/b43load	$(DESTDIR)/usr/sbin/
+	@install scripts/iwl-load	$(DESTDIR)/usr/sbin/
+	@if [ ! -z $(MADWIFI) && -z "$(DESTDIR)" ]; then \
 		echo ;\
 		echo -n "Note: madwifi detected, we're going to disable it. "  ;\
 		echo "If you would like to enable it later you can run:"  ;\
@@ -81,7 +88,7 @@ install: uninstall modules
 		echo Running athenable ath5k...;\
 		/usr/sbin/athenable ath5k ;\
 	fi
-	@if [ ! -z $(OLD_IWL) ]; then \
+	@if [ ! -z $(OLD_IWL) && -z "$(DESTDIR)" ]; then \
 		echo ;\
 		echo -n "Note: iwl4965 detected, we're going to disable it. "  ;\
 		echo "If you would like to enable it later you can run:"  ;\

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build instructions for cross-compilation environment
  2009-07-15 22:40   ` Philip A. Prindeville
@ 2009-07-16 16:19     ` Luis R. Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2009-07-16 16:19 UTC (permalink / raw)
  To: Philip A. Prindeville; +Cc: Bob Copeland, linux-wireless

On Wed, Jul 15, 2009 at 3:40 PM, Philip A.
Prindeville<philipp_subx@redfish-solutions.com> wrote:

Patch applied, thanks.

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-16 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 20:09 Build instructions for cross-compilation environment Philip A. Prindeville
2009-07-15 21:51 ` Bob Copeland
2009-07-15 22:11   ` Luis R. Rodriguez
2009-07-15 22:40   ` Philip A. Prindeville
2009-07-16 16:19     ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).