source: branches/8.09/package/mac80211/Makefile @ 14312

Last change on this file since 14312 was 14312, checked in by agb, 8 years ago

merge r14306, r14307, r14309, and r14311 to 8.09:
[package] broadcom,madwifi,mac80211: move txpower from wifi-iface to wifi-device but retain backward compatiblity

File size: 6.3 KB
Line 
1#
2# Copyright (C) 2007-2008 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
8
9include $(TOPDIR)/rules.mk
10include $(INCLUDE_DIR)/kernel.mk
11
12PKG_NAME:=mac80211
13PKG_RELEASE:=2
14
15PKG_VERSION:=2008-08-06
16PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
17PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08/
18PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
19
20include $(INCLUDE_DIR)/package.mk
21
22define KernelPackage/mac80211
23  SUBMENU:=Wireless Drivers
24  TITLE:=Linux 802.11 Wireless Networking Stack
25  DEPENDS:=@LINUX_2_6 +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools @!TARGET_avr32
26  FILES:= \
27        $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
28        $(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
29  AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211)
30endef
31
32define KernelPackage/mac80211/description
33Linux 802.11 Wireless Networking Stack
34endef
35
36# Ralink rt2x00 drivers
37RT61FW:=RT61_Firmware_V1.2.zip
38RT71FW:=RT71W_Firmware_V1.8.zip
39
40define Download/rt61
41  FILE:=$(RT61FW)
42  URL:=http://www.ralinktech.com.tw/data/
43  MD5SUM:=d4c690c93b470bc9a681297c2adc6281
44endef
45$(eval $(call Download,rt61))
46
47define Download/rt71w
48  FILE:=$(RT71FW)
49  URL:=http://www.ralinktech.com.tw/data/
50  MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
51endef
52$(eval $(call Download,rt71w))
53
54define KernelPackage/rt2x00/Default
55  SUBMENU:=Wireless Drivers
56  TITLE:=Ralink Drivers for RT2x00 cards
57endef
58
59define KernelPackage/rt2x00-lib
60$(call KernelPackage/rt2x00/Default)
61  DEPENDS+= @PCI_SUPPORT||USB_SUPPORT +kmod-mac80211 +kmod-crc-itu-t
62  TITLE+= (LIB)
63  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
64  AUTOLOAD:=$(call AutoLoad,25,blkcipher ecb arc4 rt2x00lib)
65endef
66
67define KernelPackage/rt2x00-pci
68$(call KernelPackage/rt2x00/Default)
69  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-lib +kmod-eeprom-93cx6
70  TITLE+= (PCI)
71  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
72  AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
73endef
74
75define KernelPackage/rt2x00-usb
76$(call KernelPackage/rt2x00/Default)
77  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
78  TITLE+= (USB)
79  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
80  AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
81endef
82
83define KernelPackage/rt2400-pci
84$(call KernelPackage/rt2x00/Default)
85  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
86  TITLE+= (RT2400 PCI)
87  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
88  AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
89endef
90
91define KernelPackage/rt2500-pci
92$(call KernelPackage/rt2x00/Default)
93  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
94  TITLE+= (RT2500 PCI)
95  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
96  AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
97endef
98
99define KernelPackage/rt2500-usb
100$(call KernelPackage/rt2x00/Default)
101  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
102  TITLE+= (RT2500 USB)
103  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
104  AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
105endef
106
107define KernelPackage/rt61-pci
108$(call KernelPackage/rt2x00/Default)
109  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
110  TITLE+= (RT2x61 PCI)
111  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
112  AUTOLOAD:=$(call AutoLoad,27,rt61pci)
113endef
114
115define KernelPackage/rt73-usb
116  $(call KernelPackage/rt2x00/Default)
117  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
118  TITLE+= (RT73 USB)
119  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
120  AUTOLOAD:=$(call AutoLoad,27,rt73usb)
121endef
122
123define KernelPackage/net-zd1211rw
124  SUBMENU:=Wireless Drivers
125  TITLE:=Zydas ZD1211 support
126  DEPENDS:=@LINUX_2_6_24||LINUX_2_6_25 @USB_SUPPORT +kmod-ieee80211-softmac
127  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
128  AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
129endef
130
131define KernelPackage/ath5k
132  SUBMENU:=Wireless Drivers
133  TITLE:=Atheros 5xxx wireless cards support
134  DEPENDS+= @PCI_SUPPORT +kmod-mac80211
135  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
136  AUTOLOAD:=$(call AutoLoad,27,ath5k)
137endef
138
139BUILDFLAGS:= \
140        $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
141        $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \
142        -D__CONFIG_MAC80211_RC_DEFAULT=pid \
143
144MAKE_OPTS:= \
145        CROSS_COMPILE="$(TARGET_CROSS)" \
146        ARCH="$(LINUX_KARCH)" \
147        EXTRA_CFLAGS="$(BUILDFLAGS)" \
148        $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
149        CONFIG_NL80211=y \
150        CONFIG_MAC80211_RC_PID=y \
151        CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
152        LINUXINCLUDE="-I$(PKG_BUILD_DIR)/include -I$(LINUX_DIR)/include -include linux/autoconf.h" \
153        KLIB_BUILD="$(LINUX_DIR)" \
154
155define Build/Prepare
156        rm -rf $(PKG_BUILD_DIR)
157        mkdir -p $(PKG_BUILD_DIR)
158        $(PKG_UNPACK)
159        $(Build/Patch)
160        $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
161        unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
162        unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
163        rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
164endef
165
166ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
167 define Build/Compile/kmod
168        $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
169 endef
170endif
171
172define Build/Compile
173        $(call Build/Compile/kmod)
174endef
175
176define Build/InstallDev
177        mkdir -p $(1)/usr/include/mac80211 $(1)/usr/include/net/mac80211
178        $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
179        $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
180endef
181
182define KernelPackage/mac80211/install
183        $(INSTALL_DIR) $(1)/lib/wifi
184        $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
185endef
186
187define KernelPackage/rt61-pci/install
188        $(INSTALL_DIR) $(1)/lib/firmware
189        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
190endef
191
192define KernelPackage/rt73-usb/install
193        $(INSTALL_DIR) $(1)/lib/firmware
194        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
195endef
196
197$(eval $(call KernelPackage,ath5k))
198$(eval $(call KernelPackage,net-zd1211rw))
199$(eval $(call KernelPackage,mac80211))
200$(eval $(call KernelPackage,rt2x00-lib))
201$(eval $(call KernelPackage,rt2x00-pci))
202$(eval $(call KernelPackage,rt2x00-usb))
203$(eval $(call KernelPackage,rt2400-pci))
204$(eval $(call KernelPackage,rt2500-pci))
205$(eval $(call KernelPackage,rt2500-usb))
206$(eval $(call KernelPackage,rt61-pci))
207$(eval $(call KernelPackage,rt73-usb))
Note: See TracBrowser for help on using the repository browser.