[package] libtool: Don't use the libdir path found in .la files.
[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 PKG_VERSION:=2010-01-25
14 PKG_RELEASE:=2
15 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
16 # http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
17 # http://wireless.kernel.org/download/compat-wireless-2.6
18 PKG_MD5SUM:=66a1d519e7ebcbadd4e47e6e56f705af
19
20 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_PACKAGE_kmod-mac80211 \
25 CONFIG_PACKAGE_MAC80211_DEBUGFS \
26 CONFIG_PACKAGE_ATH_DEBUG \
27 CONFIG_ATH_USER_REGD \
28
29 include $(INCLUDE_DIR)/package.mk
30
31 WMENU:=Wireless Drivers
32
33 define KernelPackage/mac80211/Default
34 SUBMENU:=$(WMENU)
35 URL:=http://linuxwireless.org/
36 DEPENDS:=@LINUX_2_6 @!TARGET_avr32 @(!(TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
37 endef
38
39 define KernelPackage/mac80211
40 $(call KernelPackage/mac80211/Default)
41 TITLE:=Linux 802.11 Wireless Networking Stack
42 DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools +iw @!LINUX_2_6_21 @!LINUX_2_6_25
43 FILES:= \
44 $(PKG_BUILD_DIR)/compat/compat.$(LINUX_KMOD_SUFFIX) \
45 $(PKG_BUILD_DIR)/compat/compat_firmware_class.$(LINUX_KMOD_SUFFIX) \
46 $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
47 $(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
48 AUTOLOAD:=$(call AutoLoad,20,compat compat_firmware_class cfg80211 mac80211)
49 endef
50
51 define KernelPackage/mac80211/config
52 source "$(SOURCE)/Config.in"
53 endef
54
55 define KernelPackage/mac80211/description
56 Linux 802.11 Wireless Networking Stack
57 endef
58
59 # Prism54 drivers
60 P54PCIFW:=2.13.12.0.arm
61 P54USBFW:=2.13.24.0.lm87.arm
62
63 define Download/p54usb
64 FILE:=$(P54USBFW)
65 URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
66 MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
67 endef
68 $(eval $(call Download,p54usb))
69
70 define Download/p54pci
71 FILE:=$(P54PCIFW)
72 URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
73 MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
74 endef
75 $(eval $(call Download,p54pci))
76
77 define KernelPackage/p54/Default
78 $(call KernelPackage/mac80211/Default)
79 TITLE:=Prism54 Drivers
80 endef
81
82 define KernelPackage/p54/description
83 Kernel module for Prism54 chipsets (mac80211)
84 endef
85
86 define KernelPackage/p54-common
87 $(call KernelPackage/p54/Default)
88 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211
89 TITLE+= (COMMON)
90 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.$(LINUX_KMOD_SUFFIX)
91 AUTOLOAD:=$(call AutoLoad,30,p54common)
92 endef
93
94 define KernelPackage/p54-pci
95 $(call KernelPackage/p54/Default)
96 TITLE+= (PCI)
97 DEPENDS+= @PCI_SUPPORT +kmod-p54-common
98 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.$(LINUX_KMOD_SUFFIX)
99 AUTOLOAD:=$(call AutoLoad,31,p54pci)
100 endef
101
102 define KernelPackage/p54-usb
103 $(call KernelPackage/p54/Default)
104 TITLE+= (USB)
105 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
106 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.$(LINUX_KMOD_SUFFIX)
107 AUTOLOAD:=$(call AutoLoad,31,p54usb)
108 endef
109
110 # Ralink rt2x00 drivers
111 RT61FW:=RT61_Firmware_V1.2.zip
112 RT71FW:=RT71W_Firmware_V1.8.zip
113 RT2860FW:=RT2860_Firmware_V11.zip
114 RT2870FW:=RT2870_Firmware_V8.zip
115
116 define Download/rt61
117 FILE:=$(RT61FW)
118 URL:=http://www.ralinktech.com.tw/data/
119 MD5SUM:=d4c690c93b470bc9a681297c2adc6281
120 endef
121 $(eval $(call Download,rt61))
122
123 define Download/rt71w
124 FILE:=$(RT71FW)
125 URL:=http://www.ralinktech.com.tw/data/
126 MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
127 endef
128 $(eval $(call Download,rt71w))
129
130 define Download/rt2860
131 FILE:=$(RT2860FW)
132 URL:=http://www.ralinktech.com.tw/data/drivers
133 MD5SUM:=440a81756a52c53528f16faa41c40124
134 endef
135 $(eval $(call Download,rt2860))
136
137 define Download/rt2870
138 FILE:=$(RT2870FW)
139 URL:=http://www.ralinktech.com.tw/data/drivers
140 MD5SUM:=a7aae1d8cfd68e4d86a73000df0b6584
141 endef
142 $(eval $(call Download,rt2870))
143
144 AR9170FW:=ar9170.fw
145
146 define Download/ar9170
147 FILE:=$(AR9170FW)
148 URL:=http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170
149 MD5SUM:=34feec4ec0eae3bb92c7c1ea2dfb4530
150 endef
151 $(eval $(call Download,ar9170))
152
153 define KernelPackage/rt2x00/Default
154 $(call KernelPackage/mac80211/Default)
155 TITLE:=Ralink Drivers for RT2x00 cards
156 endef
157
158 define KernelPackage/rt2x00-lib
159 $(call KernelPackage/rt2x00/Default)
160 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +kmod-crc-itu-t
161 TITLE+= (LIB)
162 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
163 AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
164 endef
165
166 define KernelPackage/rt2x00-pci
167 $(call KernelPackage/rt2x00/Default)
168 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-lib +kmod-eeprom-93cx6
169 TITLE+= (PCI)
170 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
171 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
172 endef
173
174 define KernelPackage/rt2x00-usb
175 $(call KernelPackage/rt2x00/Default)
176 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
177 TITLE+= (USB)
178 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
179 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
180 endef
181
182 define KernelPackage/rt2800-lib
183 $(call KernelPackage/rt2x00/Default)
184 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-rt2x00-lib
185 TITLE+= (rt2800 LIB)
186 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.$(LINUX_KMOD_SUFFIX)
187 AUTOLOAD:=$(call AutoLoad,27,rt2800lib)
188 endef
189
190 define KernelPackage/rt2400-pci
191 $(call KernelPackage/rt2x00/Default)
192 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
193 TITLE+= (RT2400 PCI)
194 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
195 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
196 endef
197
198 define KernelPackage/rt2500-pci
199 $(call KernelPackage/rt2x00/Default)
200 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
201 TITLE+= (RT2500 PCI)
202 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
203 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
204 endef
205
206 define KernelPackage/rt2500-usb
207 $(call KernelPackage/rt2x00/Default)
208 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
209 TITLE+= (RT2500 USB)
210 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
211 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
212 endef
213
214 define KernelPackage/rt61-pci
215 $(call KernelPackage/rt2x00/Default)
216 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
217 TITLE+= (RT2x61 PCI)
218 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
219 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
220 endef
221
222 define KernelPackage/rt73-usb
223 $(call KernelPackage/rt2x00/Default)
224 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
225 TITLE+= (RT73 USB)
226 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
227 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
228 endef
229
230 define KernelPackage/rt2800-pci
231 $(call KernelPackage/rt2x00/Default)
232 DEPENDS+= +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-crc-ccitt
233 TITLE+= (RT2860 PCI)
234 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.$(LINUX_KMOD_SUFFIX)
235 AUTOLOAD:=$(call AutoLoad,28,rt2800pci)
236 endef
237
238 define KernelPackage/rt2800-usb
239 $(call KernelPackage/rt2x00/Default)
240 DEPENDS+= +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-crc-ccitt
241 TITLE+= (RT2870 USB)
242 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.$(LINUX_KMOD_SUFFIX)
243 AUTOLOAD:=$(call AutoLoad,28,rt2800usb)
244 endef
245
246 define KernelPackage/rtl818x/Default
247 $(call KernelPackage/mac80211/Default)
248 TITLE:=Realtek Drivers for RTL818x devices
249 URL:=http://wireless.kernel.org/en/users/Drivers/rtl8187
250 DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211
251 endef
252
253 define KernelPackage/rtl8180
254 $(call KernelPackage/rtl818x/Default)
255 DEPENDS+= @PCI_SUPPORT
256 TITLE+= (RTL8180 PCI)
257 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180.$(LINUX_KMOD_SUFFIX)
258 AUTOLOAD:=$(call AutoLoad,27,rtl8180)
259 endef
260
261 define KernelPackage/rtl8187
262 $(call KernelPackage/rtl818x/Default)
263 DEPENDS+= @USB_SUPPORT
264 TITLE+= (RTL8187 USB)
265 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187.$(LINUX_KMOD_SUFFIX)
266 AUTOLOAD:=$(call AutoLoad,27,rtl8187)
267 endef
268
269 ZD1211FW_NAME:=zd1211-firmware
270 ZD1211FW_VERSION:=1.4
271 define Download/zd1211rw
272 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
273 URL:=@SF/zd1211/
274 MD5SUM:=19f28781d76569af8551c9d11294c870
275 endef
276 $(eval $(call Download,zd1211rw))
277
278 define KernelPackage/zd1211rw
279 $(call KernelPackage/mac80211/Default)
280 TITLE:=Zydas ZD1211 support
281 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
282 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
283 AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
284 endef
285
286 define KernelPackage/ath/config
287
288 config ATH_USER_REGD
289 bool "Force Atheros drivers to respect the user's regdomain settings"
290 depends on PACKAGE_kmod-ath
291 help
292 Atheros' idea of regulatory handling is that the EEPROM of the card defines
293 the regulatory limits and the user is only allowed to restrict the settings
294 even further, even if the country allows frequencies or power levels that
295 are forbidden by the EEPROM settings.
296 Select this option if you want the driver to respect the user's decision about
297 regulatory settings.
298
299 config PACKAGE_ATH_DEBUG
300 bool "Atheros wireless debugging"
301 depends on PACKAGE_kmod-ath
302 help
303 Say Y, if you want to debug atheros wireless drivers.
304 Right now only ath9k makes use of this.
305 endef
306
307 define KernelPackage/ath
308 $(call KernelPackage/mac80211/Default)
309 TITLE:=Atheros common driver part
310 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
311 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.$(LINUX_KMOD_SUFFIX)
312 AUTOLOAD:=$(call AutoLoad,26,ath)
313 endef
314
315 define KernelPackage/ath/description
316 This module contains some common parts needed by Atheros Wireless drivers.
317 endef
318
319 define KernelPackage/ath5k
320 $(call KernelPackage/mac80211/Default)
321 TITLE:=Atheros 5xxx wireless cards support
322 URL:=http://linuxwireless.org/en/users/Drivers/ath5k
323 DEPENDS+= +kmod-ath
324 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
325 AUTOLOAD:=$(call AutoLoad,27,ath5k)
326 endef
327
328 define KernelPackage/ath5k/description
329 This module adds support for wireless adapters based on
330 Atheros 5xxx chipset.
331 endef
332
333 define KernelPackage/ath9k
334 $(call KernelPackage/mac80211/Default)
335 TITLE:=Atheros 802.11n wireless cards support
336 URL:=http://linuxwireless.org/en/users/Drivers/ath9k
337 DEPENDS+= +kmod-ath
338 FILES:= \
339 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.$(LINUX_KMOD_SUFFIX) \
340 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.$(LINUX_KMOD_SUFFIX) \
341 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
342 AUTOLOAD:=$(call AutoLoad,27,ath9k_hw ath9k_common ath9k)
343 endef
344
345 define KernelPackage/ath9k/description
346 This module adds support for wireless adapters based on
347 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
348 endef
349
350 define KernelPackage/ath9k/config
351 source "$(SOURCE)/Config.in.ath9k"
352 endef
353
354 USB8388FW_NAME:=usb8388
355 USB8388FW_VERSION:=5.110.22.p23
356
357 define Download/usb8388
358 URL:=http://dev.laptop.org/pub/firmware/libertas/
359 FILE:=$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin
360 MD5SUM=5e38f55719df3d0c58dd3bd02575a09c
361 endef
362 $(eval $(call Download,usb8388))
363
364 define KernelPackage/libertas
365 $(call KernelPackage/mac80211/Default)
366 DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
367 TITLE:=Marvell 88W8015 Wireless Driver
368 FILES:= \
369 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.$(LINUX_KMOD_SUFFIX) \
370 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.$(LINUX_KMOD_SUFFIX)
371 AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
372 endef
373
374
375 define KernelPackage/ar9170
376 $(call KernelPackage/mac80211/Default)
377 TITLE:=Atheros AR9170 802.11n USB support
378 URL:=http://wireless.kernel.org/en/users/Drivers/ar9170
379 DEPENDS+= @USB_SUPPORT @!LINUX_2_6_25 +kmod-ath +kmod-usb-core
380 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ar9170/ar9170usb.$(LINUX_KMOD_SUFFIX)
381 AUTOLOAD:=$(call AutoLoad,27,ar9170usb)
382 endef
383
384 define KernelPackage/ar9170/description
385 This is a driver for the Atheros "otus" 802.11n USB devices.
386 endef
387
388 define KernelPackage/mac80211-hwsim
389 $(call KernelPackage/mac80211/Default)
390 TITLE:=mac80211 HW simulation device
391 DEPENDS+= +kmod-mac80211
392 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.$(LINUX_KMOD_SUFFIX)
393 AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
394 endef
395
396 #Broadcom firmware
397 ifneq ($(CONFIG_B43_EXPERIMENTAL),)
398 PKG_B43_FWV4_NAME:=broadcom-wl
399 PKG_B43_FWV4_VERSION:=4.178.10.4
400 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl.o
401 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
402 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
403 PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
404 else
405 PKG_B43_FWV4_NAME:=broadcom-wl
406 PKG_B43_FWV4_VERSION:=4.150.10.5
407 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
408 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
409 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
410 PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
411 endif
412 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
413 PKG_B43_FWV4_NAME:=broadcom-wl
414 PKG_B43_FWV4_VERSION:=5.2
415 PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
416 PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
417 PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
418 PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
419 endif
420
421
422 PKG_B43_FWV3_NAME:=wl_apsta
423 PKG_B43_FWV3_VERSION:=3.130.20.0
424 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
425 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
426 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
427
428 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
429 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
430 PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
431 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
432 PKG_B43_FWCUTTER_PROTO:=git
433 PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
434 PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
435 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
436 else
437 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
438 PKG_B43_FWCUTTER_VERSION:=012
439 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
440 PKG_B43_FWCUTTER_PROTO:=default
441 PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
442 PKG_B43_FWCUTTER_MD5SUM:=69eadf67b459f313a8d6b37aaabef96c
443 PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
444 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
445 endif
446
447 define Download/b43-common
448 FILE:=$(PKG_B43_FWCUTTER_SOURCE)
449 URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
450 MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
451 PROTO:=$(PKG_B43_FWCUTTER_PROTO)
452 VERSION:=$(PKG_B43_FWCUTTER_VERSION)
453 SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
454 endef
455 $(eval $(call Download,b43-common))
456
457 define Download/b43
458 FILE:=$(PKG_B43_FWV4_SOURCE)
459 URL:=$(PKG_B43_FWV4_SOURCE_URL)
460 MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
461 endef
462 $(eval $(call Download,b43))
463
464 define Download/b43legacy
465 FILE:=$(PKG_B43_FWV3_SOURCE)
466 URL:=$(PKG_B43_FWV3_SOURCE_URL)
467 MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
468 endef
469 $(eval $(call Download,b43legacy))
470
471 define KernelPackage/b43-common
472 $(call KernelPackage/mac80211/Default)
473 TITLE:=Generic stuff for Broadcom wireless devices
474 URL:=http://linuxwireless.org/en/users/Drivers/b43
475 KCONFIG:= \
476 CONFIG_HW_RANDOM=y
477 DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
478 endef
479
480 define KernelPackage/b43
481 $(call KernelPackage/b43-common)
482 TITLE:=Broadcom 43xx wireless support
483 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.$(LINUX_KMOD_SUFFIX)
484 AUTOLOAD:=$(call AutoLoad,30,b43)
485 endef
486
487 define KernelPackage/b43/config
488 source "$(SOURCE)/Config.in.b43"
489 endef
490
491 define KernelPackage/b43/description
492 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
493 endef
494
495 define KernelPackage/b43legacy
496 $(call KernelPackage/b43-common)
497 TITLE:=Broadcom 43xx-legacy wireless support
498 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.$(LINUX_KMOD_SUFFIX)
499 AUTOLOAD:=$(call AutoLoad,30,b43legacy)
500 endef
501
502 define KernelPackage/b43legacy/config
503 source "$(SOURCE)/Config.in.b43legacy"
504 endef
505
506 define KernelPackage/b43legacy/description
507 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
508 endef
509
510 BUILDFLAGS:= \
511 -I$(PKG_BUILD_DIR)/include \
512 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
513 $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE -DCONFIG_SSB_DRIVER_PCICORE) \
514 $(if $(CONFIG_PCI),-DCONFIG_SSB_PCIHOST_POSSIBLE -DCONFIG_SSB_PCIHOST) \
515 $(if $(CONFIG_PCI),-DCONFIG_SSB_SPROM) \
516 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
517 -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
518 $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
519 $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \
520 -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
521 $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1)
522
523 MAKE_OPTS:= \
524 CROSS_COMPILE="$(KERNEL_CROSS)" \
525 ARCH="$(LINUX_KARCH)" \
526 EXTRA_CFLAGS="$(BUILDFLAGS)" \
527 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
528 CONFIG_MAC80211_RC_PID=y \
529 CONFIG_MAC80211_RC_MINSTREL=y \
530 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
531 CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
532 CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
533 CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
534 CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
535 CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=$(if $(CONFIG_PCI),y) \
536 CONFIG_SSB_DRIVER_PCICORE=$(if $(CONFIG_PCI),y) \
537 CONFIG_SSB_PCIHOST_POSSIBLE=$(if $(CONFIG_PCI),y) \
538 CONFIG_SSB_PCIHOST=$(if $(CONFIG_PCI),y) \
539 CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
540 CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
541 CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
542 CONFIG_B43LEGACY_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
543 CONFIG_B43=$(if $(CONFIG_PACKAGE_kmod-b43),m) \
544 CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
545 CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
546 CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
547 CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
548 CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
549 CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
550 CONFIG_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
551 CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
552 CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
553 CONFIG_P54_USB=$(if $(CONFIG_PACKAGE_kmod-p54-usb),m) \
554 CONFIG_P54_SPI= \
555 CONFIG_RT2X00=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
556 CONFIG_RT2X00_LIB_PCI=$(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),m) \
557 CONFIG_RT2X00_LIB_USB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),m) \
558 CONFIG_RT2400PCI=$(if $(CONFIG_PACKAGE_kmod-rt2400-pci),m) \
559 CONFIG_RT2500PCI=$(if $(CONFIG_PACKAGE_kmod-rt2500-pci),m) \
560 CONFIG_RT2500USB=$(if $(CONFIG_PACKAGE_kmod-rt2500-usb),m) \
561 CONFIG_RT61PCI=$(if $(CONFIG_PACKAGE_kmod-rt61-pci),m) \
562 CONFIG_RT73USB=$(if $(CONFIG_PACKAGE_kmod-rt73-usb),m) \
563 CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \
564 CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \
565 CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \
566 CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \
567 CONFIG_MAC80211_HWSIM=$(if $(CONFIG_PACKAGE_kmod-mac80211-hwsim),m) \
568 CONFIG_PCMCIA= \
569 CONFIG_LIBIPW= \
570 CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
571 CONFIG_LIBERTAS_CS= \
572 CONFIG_LIBERTAS_SDIO= \
573 CONFIG_LIBERTAS_THINFIRM= \
574 CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
575 CONFIG_IPW2100= \
576 CONFIG_IPW2200= \
577 CONFIG_NL80211=y \
578 CONFIG_LIB80211= \
579 CONFIG_LIB80211_CRYPT_WEP= \
580 CONFIG_LIB80211_CRYPT_CCMP= \
581 CONFIG_LIB80211_CRYPT_TKIP= \
582 CONFIG_IWLWIFI= \
583 CONFIG_IWLAGN= \
584 CONFIG_MWL8K= \
585 CONFIG_ATMEL= \
586 CONFIG_PCMCIA_ATMEL= \
587 CONFIG_ADM8211= \
588 CONFIG_USB_NET_RNDIS_HOST= \
589 CONFIG_USB_NET_RNDIS_WLAN= \
590 CONFIG_USB_NET_CDCETHER= \
591 CONFIG_USB_USBNET= \
592 CONFIG_AT76C50X_USB= \
593 CONFIG_WL12XX= \
594 CONFIG_EEPROM_93CX6= \
595 CONFIG_AR9170_USB=$(if $(CONFIG_PACKAGE_kmod-ar9170),m) \
596 CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
597 CONFIG_IWM= \
598 MADWIFI= \
599 OLD_IWL= \
600 KLIB_BUILD="$(LINUX_DIR)" \
601 MODPROBE=: \
602 KLIB=$(TARGET_MODULES_DIR) \
603 KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER)))
604
605 define Build/Prepare
606 rm -rf $(PKG_BUILD_DIR)
607 mkdir -p $(PKG_BUILD_DIR)
608 $(PKG_UNPACK)
609 $(Build/Patch)
610 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
611 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
612 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2860FW)
613 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2870FW)
614 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
615 rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
616 rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
617 rm $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h
618 endef
619
620 ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
621 define Build/Compile/kmod
622 rm -rf $(PKG_BUILD_DIR)/modules
623 $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
624 endef
625 endif
626
627 define Build/Compile
628 $(call Build/Compile/kmod)
629 endef
630
631 define Build/InstallDev
632 mkdir -p \
633 $(1)/usr/include/mac80211 \
634 $(1)/usr/include/mac80211/ath \
635 $(1)/usr/include/net/mac80211
636 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
637 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
638 $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
639 endef
640
641 define KernelPackage/libertas/install
642 $(INSTALL_DIR) $(1)/lib/firmware
643 $(INSTALL_DATA) $(DL_DIR)/$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin $(1)/lib/firmware/$(USB8388FW_NAME).bin
644 endef
645
646 define KernelPackage/mac80211/install
647 $(INSTALL_DIR) $(1)/lib/wifi
648 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
649 endef
650
651 define KernelPackage/p54-pci/install
652 $(INSTALL_DIR) $(1)/lib/firmware
653 $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
654 endef
655
656 define KernelPackage/p54-usb/install
657 $(INSTALL_DIR) $(1)/lib/firmware
658 $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
659 endef
660
661 define KernelPackage/rt61-pci/install
662 $(INSTALL_DIR) $(1)/lib/firmware
663 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
664 endef
665
666 define KernelPackage/rt73-usb/install
667 $(INSTALL_DIR) $(1)/lib/firmware
668 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
669 endef
670
671 define KernelPackage/rt2800-pci/install
672 $(INSTALL_DIR) $(1)/lib/firmware
673 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2860.bin $(1)/lib/firmware/
674 endef
675
676 define KernelPackage/rt2800-usb/install
677 $(INSTALL_DIR) $(1)/lib/firmware
678 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2870.bin $(1)/lib/firmware/
679 endef
680
681 define KernelPackage/zd1211rw/install
682 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
683 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
684 endef
685
686 define KernelPackage/ar9170/install
687 $(INSTALL_DIR) $(1)/lib/firmware
688 $(INSTALL_DATA) $(DL_DIR)/$(AR9170FW) $(1)/lib/firmware/
689 endef
690
691 define Build/b43-common
692 tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
693 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
694 CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h"
695 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
696 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
697 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
698 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
699 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
700 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
701 endif
702 $(INSTALL_BIN) ./files/host_bin/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
703 endef
704
705 define KernelPackage/b43/install
706 rm -rf $(1)/lib/firmware/
707 $(call Build/b43-common)
708 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
709 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
710 else
711 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
712 endif
713 $(INSTALL_DIR) $(1)/lib/firmware/
714 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
715 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
716 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
717 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
718 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
719 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
720 else
721 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
722 endif
723 ifneq ($(CONFIG_B43_FW_SQUASH),)
724 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
725 endif
726 endef
727
728 define KernelPackage/b43legacy/install
729 $(call Build/b43-common)
730 $(INSTALL_DIR) $(1)/lib/firmware/
731
732 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
733 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
734 b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
735 endif
736 endef
737
738 $(eval $(call KernelPackage,ath5k))
739 $(eval $(call KernelPackage,libertas))
740 $(eval $(call KernelPackage,mac80211))
741 $(eval $(call KernelPackage,p54-common))
742 $(eval $(call KernelPackage,p54-pci))
743 $(eval $(call KernelPackage,p54-usb))
744 $(eval $(call KernelPackage,rt2x00-lib))
745 $(eval $(call KernelPackage,rt2x00-pci))
746 $(eval $(call KernelPackage,rt2x00-usb))
747 $(eval $(call KernelPackage,rt2800-lib))
748 $(eval $(call KernelPackage,rt2400-pci))
749 $(eval $(call KernelPackage,rt2500-pci))
750 $(eval $(call KernelPackage,rt2500-usb))
751 $(eval $(call KernelPackage,rt61-pci))
752 $(eval $(call KernelPackage,rt73-usb))
753 $(eval $(call KernelPackage,rt2800-pci))
754 $(eval $(call KernelPackage,rt2800-usb))
755 $(eval $(call KernelPackage,rtl8180))
756 $(eval $(call KernelPackage,rtl8187))
757 $(eval $(call KernelPackage,zd1211rw))
758 $(eval $(call KernelPackage,mac80211-hwsim))
759 $(eval $(call KernelPackage,ath9k))
760 $(eval $(call KernelPackage,ath))
761 $(eval $(call KernelPackage,ar9170))
762 $(eval $(call KernelPackage,b43))
763 $(eval $(call KernelPackage,b43legacy))
This page took 0.073777 seconds and 5 git commands to generate.