a6af5646f202c1147e77be90463ede45c80589b4
[openwrt.git] / package / mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=mac80211
12
13 ifneq ($(CONFIG_LINUX_2_6_21)$(CONFIG_LINUX_2_6_23)$(CONFIG_LINUX_2_6_24)$(CONFIG_LINUX_2_6_25)$(CONFIG_LINUX_2_6_26),)
14 PKG_VERSION:=2008-08-06
15 PKG_RELEASE:=2
16 PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08
17 PKG_MD5SUM:=9563ceeed86bca0859ad5f010623277c
18 PATCH_DIR:=./patches-old
19 else
20 PKG_VERSION:=2009-05-08
21 PKG_RELEASE:=1
22 PKG_SOURCE_URL:= \
23 http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/05 \
24 http://wireless.kernel.org/download/compat-wireless-2.6
25 PKG_MD5SUM:=9e973ca21e20e51f0a3c215c980b1f55
26 endif
27
28 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
29 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
30
31 PKG_CONFIG_DEPENDS:= \
32 CONFIG_PACKAGE_kmod-mac80211 \
33
34 include $(INCLUDE_DIR)/package.mk
35
36 WMENU:=Wireless Drivers
37
38 define KernelPackage/mac80211/Default
39 SUBMENU:=$(WMENU)
40 URL:=http://linuxwireless.org/
41 DEPENDS:=@LINUX_2_6 @!TARGET_avr32
42 endef
43
44 define KernelPackage/mac80211
45 $(call KernelPackage/mac80211/Default)
46 TITLE:=Linux 802.11 Wireless Networking Stack
47 DEPENDS+= +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools
48 FILES:= \
49 $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
50 $(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
51 AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211)
52 endef
53
54 define KernelPackage/mac80211/description
55 Linux 802.11 Wireless Networking Stack
56 endef
57
58 # Prism54 drivers
59 P54PCIFW:=2.13.12.0.arm
60 P54USBFW:=2.13.24.0.lm86.arm
61
62 define Download/p54usb
63 FILE:=$(P54USBFW)
64 URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
65 MD5SUM:=2efd50eab43c0d0376765576a54b7a30
66 endef
67 $(eval $(call Download,p54usb))
68
69 define Download/p54pci
70 FILE:=$(P54PCIFW)
71 URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
72 MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
73 endef
74 $(eval $(call Download,p54pci))
75
76 define KernelPackage/p54/Default
77 $(call KernelPackage/mac80211/Default)
78 TITLE:=Prism54 Drivers
79 endef
80
81 define KernelPackage/p54/description
82 Kernel module for Prism54 chipsets (mac80211)
83 endef
84
85 define KernelPackage/p54-common
86 $(call KernelPackage/p54/Default)
87 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211
88 TITLE+= (COMMON)
89 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.$(LINUX_KMOD_SUFFIX)
90 AUTOLOAD:=$(call AutoLoad,30,p54common)
91 endef
92
93 define KernelPackage/p54-pci
94 $(call KernelPackage/p54/Default)
95 TITLE+= (PCI)
96 DEPENDS+= @PCI_SUPPORT +kmod-p54-common
97 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.$(LINUX_KMOD_SUFFIX)
98 AUTOLOAD:=$(call AutoLoad,31,p54pci)
99 endef
100
101 define KernelPackage/p54-usb
102 $(call KernelPackage/p54/Default)
103 TITLE+= (USB)
104 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
105 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.$(LINUX_KMOD_SUFFIX)
106 AUTOLOAD:=$(call AutoLoad,31,p54usb)
107 endef
108
109 # Ralink rt2x00 drivers
110 RT61FW:=RT61_Firmware_V1.2.zip
111 RT71FW:=RT71W_Firmware_V1.8.zip
112 RT2860FW:=RT2860_Firmware_V11.zip
113
114 define Download/rt61
115 FILE:=$(RT61FW)
116 URL:=http://www.ralinktech.com.tw/data/
117 MD5SUM:=d4c690c93b470bc9a681297c2adc6281
118 endef
119 $(eval $(call Download,rt61))
120
121 define Download/rt71w
122 FILE:=$(RT71FW)
123 URL:=http://www.ralinktech.com.tw/data/
124 MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
125 endef
126 $(eval $(call Download,rt71w))
127
128 define Download/rt2860
129 FILE:=$(RT2860FW)
130 URL:=http://www.ralinktech.com.tw/data/drivers
131 MD5SUM:=440a81756a52c53528f16faa41c40124
132 endef
133 $(eval $(call Download,rt2860))
134
135 define KernelPackage/rt2x00/Default
136 $(call KernelPackage/mac80211/Default)
137 TITLE:=Ralink Drivers for RT2x00 cards
138 endef
139
140 define KernelPackage/rt2x00-lib
141 $(call KernelPackage/rt2x00/Default)
142 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211 +kmod-crc-itu-t
143 TITLE+= (LIB)
144 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
145 AUTOLOAD:=$(call AutoLoad,25,blkcipher ecb arc4 rt2x00lib)
146 endef
147
148 define KernelPackage/rt2x00-pci
149 $(call KernelPackage/rt2x00/Default)
150 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-lib +kmod-eeprom-93cx6
151 TITLE+= (PCI)
152 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
153 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
154 endef
155
156 define KernelPackage/rt2x00-usb
157 $(call KernelPackage/rt2x00/Default)
158 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
159 TITLE+= (USB)
160 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
161 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
162 endef
163
164 define KernelPackage/rt2400-pci
165 $(call KernelPackage/rt2x00/Default)
166 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
167 TITLE+= (RT2400 PCI)
168 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
169 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
170 endef
171
172 define KernelPackage/rt2500-pci
173 $(call KernelPackage/rt2x00/Default)
174 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
175 TITLE+= (RT2500 PCI)
176 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
177 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
178 endef
179
180 define KernelPackage/rt2500-usb
181 $(call KernelPackage/rt2x00/Default)
182 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
183 TITLE+= (RT2500 USB)
184 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
185 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
186 endef
187
188 define KernelPackage/rt61-pci
189 $(call KernelPackage/rt2x00/Default)
190 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
191 TITLE+= (RT2x61 PCI)
192 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
193 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
194 endef
195
196 define KernelPackage/rt73-usb
197 $(call KernelPackage/rt2x00/Default)
198 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
199 TITLE+= (RT73 USB)
200 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
201 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
202 endef
203
204 define KernelPackage/rt2800-pci
205 $(call KernelPackage/rt2x00/Default)
206 DEPENDS+= +kmod-rt2x00-pci +kmod-crc-ccitt @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24||!LINUX_2_6_25||!LINUX_2_6_26
207 TITLE+= (RT2860 PCI)
208 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.$(LINUX_KMOD_SUFFIX)
209 AUTOLOAD:=$(call AutoLoad,27,rt2800pci)
210 endef
211
212 define KernelPackage/rt2800-usb
213 $(call KernelPackage/rt2x00/Default)
214 DEPENDS+= +kmod-rt2x00-usb +kmod-crc-ccitt @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24||!LINUX_2_6_25||!LINUX_2_6_26
215 TITLE+= (RT2870 USB)
216 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.$(LINUX_KMOD_SUFFIX)
217 AUTOLOAD:=$(call AutoLoad,27,rt2800usb)
218 endef
219
220 ZD1211FW_NAME:=zd1211-firmware
221 ZD1211FW_VERSION:=1.4
222 define Download/zd1211rw
223 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
224 URL:=@SF/zd1211/
225 MD5SUM:=19f28781d76569af8551c9d11294c870
226 endef
227 $(eval $(call Download,zd1211rw))
228
229 define KernelPackage/zd1211rw
230 $(call KernelPackage/mac80211/Default)
231 TITLE:=Zydas ZD1211 support
232 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
233 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
234 AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
235 endef
236
237
238 define KernelPackage/ath
239 $(call KernelPackage/mac80211/Default)
240 TITLE:=Atheros common driver part
241 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
242 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.$(LINUX_KMOD_SUFFIX)
243 AUTOLOAD:=$(call AutoLoad,26,ath)
244 endef
245
246 define KernelPackage/ath/description
247 This module contains some common parts needed by Atheros Wireless drivers.
248 endef
249
250 define KernelPackage/ath5k
251 $(call KernelPackage/mac80211/Default)
252 TITLE:=Atheros 5xxx wireless cards support
253 URL:=http://linuxwireless.org/en/users/Drivers/ath5k
254 DEPENDS+= +kmod-ath
255 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
256 AUTOLOAD:=$(call AutoLoad,27,ath5k)
257 endef
258
259 define KernelPackage/ath5k/description
260 This module adds support for wireless adapters based on
261 Atheros 5xxx chipset.
262 endef
263
264 define KernelPackage/ath9k
265 $(call KernelPackage/mac80211/Default)
266 TITLE:=Atheros 802.11n wireless cards support
267 URL:=http://linuxwireless.org/en/users/Drivers/ath9k
268 DEPENDS+= +kmod-ath @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24||!LINUX_2_6_25||!LINUX_2_6_26
269 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
270 AUTOLOAD:=$(call AutoLoad,27,ath9k)
271 endef
272
273 define KernelPackage/ath9k/description
274 This module adds support for wireless adapters based on
275 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
276 endef
277
278 define KernelPackage/mac80211-hwsim
279 $(call KernelPackage/mac80211/Default)
280 TITLE:=mac80211 HW simulation device
281 DEPENDS+= +kmod-mac80211
282 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.$(LINUX_KMOD_SUFFIX)
283 AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
284 endef
285
286 #Broadcom firmware
287 ifneq ($(CONFIG_B43_EXPERIMENTAL),)
288 PKG_B43_FWV4_NAME:=broadcom-wl
289 PKG_B43_FWV4_VERSION:=4.178.10.4
290 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl.o
291 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
292 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
293 PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
294 else
295 PKG_B43_FWV4_NAME:=broadcom-wl
296 PKG_B43_FWV4_VERSION:=4.150.10.5
297 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
298 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
299 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
300 PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
301 endif
302 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
303 PKG_B43_FWV4_NAME:=broadcom-wl
304 PKG_B43_FWV4_VERSION:=5.1
305 PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
306 PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
307 PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
308 PKG_B43_FWV4_MD5SUM:=3510c133393bb4911c4aa35742cefcfd
309 endif
310
311
312 PKG_B43_FWV3_NAME:=wl_apsta
313 PKG_B43_FWV3_VERSION:=3.130.20.0
314 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
315 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
316 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
317
318 ifneq ($(CONFIG_B43_EXPERIMENTAL)$(CONFIG_B43_OPENFIRMWARE),)
319 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
320 PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
321 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
322 PKG_B43_FWCUTTER_PROTO:=git
323 PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
324 PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
325 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
326 else
327 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
328 PKG_B43_FWCUTTER_VERSION:=011
329 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
330 PKG_B43_FWCUTTER_PROTO:=default
331 PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
332 PKG_B43_FWCUTTER_MD5SUM:=3db2f4de85a459451f5b391cf67a8d44
333 PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
334 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
335 endif
336
337 define Download/b43-common
338 FILE:=$(PKG_B43_FWCUTTER_SOURCE)
339 URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
340 MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
341 PROTO:=$(PKG_B43_FWCUTTER_PROTO)
342 VERSION:=$(PKG_B43_FWCUTTER_VERSION)
343 SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
344 endef
345 $(eval $(call Download,b43-common))
346
347 define Download/b43
348 FILE:=$(PKG_B43_FWV4_SOURCE)
349 URL:=$(PKG_B43_FWV4_SOURCE_URL)
350 MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
351 endef
352 $(eval $(call Download,b43))
353
354 define Download/b43legacy
355 FILE:=$(PKG_B43_FWV3_SOURCE)
356 URL:=$(PKG_B43_FWV3_SOURCE_URL)
357 MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
358 endef
359 $(eval $(call Download,b43legacy))
360
361 define KernelPackage/b43-common
362 $(call KernelPackage/mac80211/Default)
363 TITLE:=Generic stuff for Broadcom wireless devices
364 URL:=http://linuxwireless.org/en/users/Drivers/b43
365 DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24
366 endef
367
368 define KernelPackage/b43
369 $(call KernelPackage/b43-common)
370 TITLE:=Broadcom 43xx wireless support
371 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.$(LINUX_KMOD_SUFFIX)
372 AUTOLOAD:=$(call AutoLoad,30,b43)
373 endef
374
375 define KernelPackage/b43/config
376 source "$(SOURCE)/Config.in"
377 endef
378
379 define KernelPackage/b43/description
380 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
381 endef
382
383 define KernelPackage/b43legacy
384 $(call KernelPackage/b43-common)
385 TITLE:=Broadcom 43xx-legacy wireless support
386 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.$(LINUX_KMOD_SUFFIX)
387 AUTOLOAD:=$(call AutoLoad,30,b43legacy)
388 endef
389
390 define KernelPackage/b43legacy/description
391 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
392 endef
393
394 BUILDFLAGS:= \
395 -I$(PKG_BUILD_DIR)/include \
396 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
397 $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE -DCONFIG_SSB_DRIVER_PCICORE) \
398 $(if $(CONFIG_PCI),-DCONFIG_SSB_PCIHOST_POSSIBLE -DCONFIG_SSB_PCIHOST) \
399 $(if $(CONFIG_PCI),-DCONFIG_SSB_SPROM) \
400 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS) \
401 $(if $(CONFIG_RFKILL),-DCONFIG_B43_RFKILL -DCONFIG_B43LEGACY_RFKILL) \
402 $(if $(CONFIG_HW_RANDOM),-DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG) \
403 $(if $(CONFIG_PCMCIA),-DCONFIG_B43_PCMCIA -DCONFIG_B43_PIO) \
404 $(if $(CONFIG_DEBUG_FS), -DCONFIG_MAC80211_DEBUGFS) \
405 -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
406
407 MAKE_OPTS:= \
408 CROSS_COMPILE="$(TARGET_CROSS)" \
409 ARCH="$(LINUX_KARCH)" \
410 EXTRA_CFLAGS="$(BUILDFLAGS)" \
411 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
412 CONFIG_NL80211=y \
413 CONFIG_MAC80211_RC_PID=y \
414 CONFIG_MAC80211_RC_MINSTREL=y \
415 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
416 CONFIG_MAC80211_DEBUGFS=$(CONFIG_DEBUG_FS) \
417 $(if $(CONFIG_PCI),CONFIG_B43_PCI_AUTOSELECT=y,CONFIG_B43_PCI_AUTOSELECT=n) \
418 $(if $(CONFIG_PCI),CONFIG_B43_PCICORE_AUTOSELECT=y,CONFIG_B43_PCICORE_AUTOSELECT=n) \
419 $(if $(CONFIG_PCI),CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y,CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=n) \
420 $(if $(CONFIG_PCI),CONFIG_SSB_DRIVER_PCICORE=y,CONFIG_SSB_DRIVER_PCICORE=n) \
421 $(if $(CONFIG_PCI),CONFIG_SSB_PCIHOST_POSSIBLE=y,CONFIG_SSB_PCIHOST_POSSIBLE=n) \
422 $(if $(CONFIG_PCI),CONFIG_SSB_PCIHOST=y,CONFIG_SSB_PCIHOST=n) \
423 $(if $(CONFIG_PCMCIA),CONFIG_B43_PCMCIA=y,CONFIG_B43_PCMCIA=n) \
424 $(if $(CONFIG_PCMCIA),CONFIG_B43_PIO=y,CONFIG_B43_PIO=n) \
425 $(if $(CONFIG_RFKILL),CONFIG_B43_RFKILL=y,CONFIG_B43_RFKILL=n) \
426 $(if $(CONFIG_RFKILL),CONFIG_B43LEGACY_RFKILL=y,CONFIG_B43LEGACY_RFKILL=n) \
427 CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
428 CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
429 $(if $(CONFIG_HW_RANDOM),CONFIG_B43_HWRNG=y,CONFIG_B43_HWRNG=n) \
430 $(if $(CONFIG_HW_RANDOM),CONFIG_B43LEGACY_HWRNG=y,CONFIG_B43LEGACY_HWRNG=n) \
431 $(if $(CONFIG_PACKAGE_kmod-b43),CONFIG_B43=m) \
432 $(if $(CONFIG_PACKAGE_kmod-b43legacy),CONFIG_B43LEGACY=m) \
433 KLIB_BUILD="$(LINUX_DIR)" \
434 MODPROBE=:
435
436 define Build/Prepare
437 rm -rf $(PKG_BUILD_DIR)
438 mkdir -p $(PKG_BUILD_DIR)
439 $(PKG_UNPACK)
440 $(Build/Patch)
441 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
442 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
443 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2860FW)
444 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
445 rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
446 rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
447 rm $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h
448 endef
449
450 ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
451 define Build/Compile/kmod
452 rm -rf $(PKG_BUILD_DIR)/modules
453 $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
454 endef
455 endif
456
457 define Build/Compile
458 $(call Build/Compile/kmod)
459 endef
460
461 define Build/InstallDev
462 mkdir -p $(1)/usr/include/mac80211 $(1)/usr/include/net/mac80211
463 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
464 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
465 endef
466
467 define KernelPackage/mac80211/install
468 $(INSTALL_DIR) $(1)/lib/wifi
469 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
470 endef
471
472 define KernelPackage/p54-pci/install
473 $(INSTALL_DIR) $(1)/lib/firmware
474 $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
475 endef
476
477 define KernelPackage/p54-usb/install
478 $(INSTALL_DIR) $(1)/lib/firmware
479 $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3886usb
480 endef
481
482 define KernelPackage/rt61-pci/install
483 $(INSTALL_DIR) $(1)/lib/firmware
484 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
485 endef
486
487 define KernelPackage/rt73-usb/install
488 $(INSTALL_DIR) $(1)/lib/firmware
489 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
490 endef
491
492 define KernelPackage/rt2800-pci/install
493 $(INSTALL_DIR) $(1)/lib/firmware
494 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2860.bin $(1)/lib/firmware/
495 endef
496
497 define KernelPackage/zd1211rw/install
498 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
499 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
500 endef
501
502 define Build/b43-common
503 tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
504 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
505 CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h"
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
507 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
508 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
509 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
512 endif
513 $(INSTALL_BIN) ./files/host_bin/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
514 endef
515
516 define KernelPackage/b43/install
517 rm -rf $(1)/lib/firmware/
518 $(call Build/b43-common)
519 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
520 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
521 else
522 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
523 endif
524 $(INSTALL_DIR) $(1)/lib/firmware/
525 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
526 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
527 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
528 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
529 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
530 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
531 else
532 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
533 endif
534 ifneq ($(CONFIG_B43_FW_SQUASH),)
535 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
536 endif
537 endef
538
539 define KernelPackage/b43legacy/install
540 $(call Build/b43-common)
541 $(INSTALL_DIR) $(1)/lib/firmware/
542
543 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
544 endef
545
546 $(eval $(call KernelPackage,ath5k))
547 $(eval $(call KernelPackage,mac80211))
548 $(eval $(call KernelPackage,p54-common))
549 $(eval $(call KernelPackage,p54-pci))
550 $(eval $(call KernelPackage,p54-usb))
551 $(eval $(call KernelPackage,rt2x00-lib))
552 $(eval $(call KernelPackage,rt2x00-pci))
553 $(eval $(call KernelPackage,rt2x00-usb))
554 $(eval $(call KernelPackage,rt2400-pci))
555 $(eval $(call KernelPackage,rt2500-pci))
556 $(eval $(call KernelPackage,rt2500-usb))
557 $(eval $(call KernelPackage,rt61-pci))
558 $(eval $(call KernelPackage,rt73-usb))
559 $(eval $(call KernelPackage,rt2800-pci))
560 $(eval $(call KernelPackage,rt2800-usb))
561 $(eval $(call KernelPackage,zd1211rw))
562 $(eval $(call KernelPackage,mac80211-hwsim))
563 $(eval $(call KernelPackage,ath9k))
564 $(eval $(call KernelPackage,ath))
565 $(eval $(call KernelPackage,b43))
566 $(eval $(call KernelPackage,b43legacy))
This page took 0.061692 seconds and 3 git commands to generate.