2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
15 ifneq ($(CONFIG_LINUX_2_6_27
)$(CONFIG_LINUX_2_6_28
),)
16 PKG_VERSION
:=2008-12-11
17 PKG_SOURCE_URL
:=http
://wireless.kernel.org
/download
/compat-wireless-2.6
/
19 PKG_VERSION
:=2008-08-06
20 PKG_SOURCE_URL
:=http
://www.orbit-lab.org
/kernel
/compat-wireless-2.6
/2008/08
21 PATCH_DIR
:=.
/patches-old
24 PKG_SOURCE
:=compat-wireless-
$(PKG_VERSION
).
tar.bz2
25 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/compat-wireless-
$(PKG_VERSION
)
27 include $(INCLUDE_DIR
)/package.mk
28 STAMP_CONFIGURED
:=$(STAMP_CONFIGURED
)_
$(call confvar
,CONFIG_PACKAGE_kmod-mac80211
)
30 WMENU
:=Wireless Drivers
32 define KernelPackage
/mac80211
34 TITLE
:=Linux
802.11 Wireless Networking Stack
35 URL
:=http
://linuxwireless.org
/
36 DEPENDS
:=@LINUX_2_6
+kmod-crypto-arc4
+kmod-crypto-aes
+wireless-tools @
!TARGET_avr32
38 $(PKG_BUILD_DIR
)/net
/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
39 $(PKG_BUILD_DIR
)/net
/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
40 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211
)
43 define KernelPackage
/mac80211
/description
44 Linux
802.11 Wireless Networking Stack
52 URL
:=http
://prism54.org
/firmware
53 MD5SUM
:=09f9da7ea757173c9de1a0322a1f9782
55 $(eval
$(call Download
,p54
))
57 define KernelPackage
/p54
/Default
59 TITLE
:=Prism54 Drivers
62 define KernelPackage
/p54
/description
63 Kernel module for Prism54 chipsets
(mac80211
)
66 define KernelPackage
/p54-common
67 $(call KernelPackage
/p54
/Default
)
68 DEPENDS
+= @PCI_SUPPORT||@USB_SUPPORT
70 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/p54
/p54common.
$(LINUX_KMOD_SUFFIX
)
71 AUTOLOAD
:=$(call AutoLoad
,30,p54common
)
74 define KernelPackage
/p54-pci
75 $(call KernelPackage
/p54
/Default
)
77 DEPENDS
+= @PCI_SUPPORT
+kmod-p54-common
78 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/p54
/p54pci.
$(LINUX_KMOD_SUFFIX
)
79 AUTOLOAD
:=$(call AutoLoad
,31,p54pci
)
82 define KernelPackage
/p54-usb
83 $(call KernelPackage
/p54
/Default
)
85 DEPENDS
+= @USB_SUPPORT
+kmod-usb-core
+kmod-p54-common
86 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/p54
/p54usb.
$(LINUX_KMOD_SUFFIX
)
87 AUTOLOAD
:=$(call AutoLoad
,31,p54usb
)
90 # Ralink rt2x00 drivers
91 RT61FW
:=RT61_Firmware_V1.2.zip
92 RT71FW
:=RT71W_Firmware_V1.8.zip
93 RT2860FW
:=RT2860_Firmware_V11.zip
97 URL
:=http
://www.ralinktech.com.tw
/data
/
98 MD5SUM
:=d4c690c93b470bc9a681297c2adc6281
100 $(eval
$(call Download
,rt61
))
102 define Download
/rt71w
104 URL
:=http
://www.ralinktech.com.tw
/data
/
105 MD5SUM
:=1e7a5dc574e0268574fcda3fd5cf52f7
107 $(eval
$(call Download
,rt71w
))
109 define Download
/rt2860
111 URL
:=http
://www.ralinktech.com.tw
/data
/drivers
112 MD5SUM
:=440a81756a52c53528f16faa41c40124
114 $(eval
$(call Download
,rt2860
))
116 define KernelPackage
/rt2x00
/Default
118 TITLE
:=Ralink Drivers for RT2x00 cards
121 define KernelPackage
/rt2x00-lib
122 $(call KernelPackage
/rt2x00
/Default
)
123 DEPENDS
+= @PCI_SUPPORT||@USB_SUPPORT
+kmod-mac80211
+kmod-crc-itu-t
125 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
126 AUTOLOAD
:=$(call AutoLoad
,25,blkcipher ecb arc4 rt2x00lib
)
129 define KernelPackage
/rt2x00-pci
130 $(call KernelPackage
/rt2x00
/Default
)
131 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
+kmod-eeprom-93cx6
133 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
134 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
137 define KernelPackage
/rt2x00-usb
138 $(call KernelPackage
/rt2x00
/Default
)
139 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
141 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
142 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
145 define KernelPackage
/rt2400-pci
146 $(call KernelPackage
/rt2x00
/Default
)
147 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
149 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
150 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
153 define KernelPackage
/rt2500-pci
154 $(call KernelPackage
/rt2x00
/Default
)
155 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
157 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
158 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
161 define KernelPackage
/rt2500-usb
162 $(call KernelPackage
/rt2x00
/Default
)
163 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
165 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
166 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
169 define KernelPackage
/rt61-pci
170 $(call KernelPackage
/rt2x00
/Default
)
171 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
173 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt61pci.
$(LINUX_KMOD_SUFFIX
)
174 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
177 define KernelPackage
/rt73-usb
178 $(call KernelPackage
/rt2x00
/Default
)
179 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
181 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt73usb.
$(LINUX_KMOD_SUFFIX
)
182 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
185 define KernelPackage
/rt2800-pci
186 $(call KernelPackage
/rt2x00
/Default
)
187 DEPENDS
+= @BROKEN @PCI_SUPPORT
+kmod-rt2x00-pci @LINUX_2_6_27||@LINUX_2_6_28
189 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2800pci.
$(LINUX_KMOD_SUFFIX
)
190 AUTOLOAD
:=$(call AutoLoad
,27,rt2800pci
)
193 ZD1211FW_NAME
:=zd1211-firmware
194 ZD1211FW_VERSION
:=1.4
195 define Download
/zd1211rw
196 FILE
:=$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
198 MD5SUM
:=19f28781d76569af8551c9d11294c870
200 $(eval
$(call Download
,zd1211rw
))
202 define KernelPackage
/zd1211rw
204 TITLE
:=Zydas ZD1211 support
205 DEPENDS
:= @USB_SUPPORT
+kmod-usb-core
+kmod-mac80211
206 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/zd1211rw
/zd1211rw.
$(LINUX_KMOD_SUFFIX
)
207 AUTOLOAD
:=$(call AutoLoad
,60,zd1211rw
)
210 define KernelPackage
/ath5k
212 TITLE
:=Atheros
5xxx wireless cards support
213 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/ath5k
214 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211
215 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath5k
/ath5k.
$(LINUX_KMOD_SUFFIX
)
216 AUTOLOAD
:=$(call AutoLoad
,27,ath5k
)
219 define KernelPackage
/ath5k
/description
220 This module adds support for wireless adapters based on
221 Atheros
5xxx chipset.
224 define KernelPackage
/ath9k-new
226 TITLE
:=Atheros
802.11n wireless cards support
227 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/ath9k
228 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211 @LINUX_2_6_27||@LINUX_2_6_28 @
!kmod-ath9k
229 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath9k
/ath9k.
$(LINUX_KMOD_SUFFIX
)
230 AUTOLOAD
:=$(call AutoLoad
,27,ath9k
)
233 define KernelPackage
/ath9k-new
/description
234 This module adds support for wireless adapters based on
235 Atheros IEEE
802.11n AR5008 and AR9001 family of chipsets.
238 define KernelPackage
/mac80211-hwsim
240 TITLE
:=mac80211 HW simulation device
241 DEPENDS
+= +kmod-mac80211
242 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/mac80211_hwsim.
$(LINUX_KMOD_SUFFIX
)
243 AUTOLOAD
:=$(call AutoLoad
,60,mac80211_hwsim
)
247 PKG_B43_FWV4_NAME
:=broadcom-wl
248 PKG_B43_FWV4_VERSION
:=4.150.10.5
249 PKG_B43_FWV4_OBJECT
:=driver
/wl_apsta_mimo.o
250 PKG_B43_FWV4_SOURCE
:=$(PKG_B43_FWV4_NAME
)-$(PKG_B43_FWV4_VERSION
).
tar.bz2
251 PKG_B43_FWV4_SOURCE_URL
:=http
://mirror2.openwrt.org
/sources
/
252 PKG_B43_FWV4_MD5SUM
:=0c6ba9687114c6b598e8019e262d9a60
254 PKG_B43_FWV3_NAME
:=wl_apsta
255 PKG_B43_FWV3_VERSION
:=3.130.20.0
256 PKG_B43_FWV3_SOURCE
:=$(PKG_B43_FWV3_NAME
)-$(PKG_B43_FWV3_VERSION
).o
257 PKG_B43_FWV3_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
/
258 PKG_B43_FWV3_MD5SUM
:=e08665c5c5b66beb9c3b2dd54aa80cb3
260 PKG_B43_FWCUTTER_NAME
:=b43-fwcutter
261 PKG_B43_FWCUTTER_VERSION
:=011
262 PKG_B43_FWCUTTER_SOURCE
:=$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
).
tar.bz2
263 PKG_B43_FWCUTTER_SOURCE_URL
:=http
://bu3sch.de
/b43
/fwcutter
/
264 PKG_B43_FWCUTTER_MD5SUM
:=3db2f4de85a459451f5b391cf67a8d44
266 define Download
/b43-common
267 FILE
:=$(PKG_B43_FWCUTTER_SOURCE
)
268 URL
:=$(PKG_B43_FWCUTTER_SOURCE_URL
)
269 MD5SUM
:=$(PKG_B43_FWCUTTER_MD5SUM
)
271 $(eval
$(call Download
,b43-common
))
274 FILE
:=$(PKG_B43_FWV4_SOURCE
)
275 URL
:=$(PKG_B43_FWV4_SOURCE_URL
)
276 MD5SUM
:=$(PKG_B43_FWV4_MD5SUM
)
278 $(eval
$(call Download
,b43
))
280 define Download
/b43legacy
281 FILE
:=$(PKG_B43_FWV3_SOURCE
)
282 URL
:=$(PKG_B43_FWV3_SOURCE_URL
)
283 MD5SUM
:=$(PKG_B43_FWV3_MD5SUM
)
285 $(eval
$(call Download
,b43legacy
))
287 define KernelPackage
/b43-common
289 TITLE
:=Generic stuff for Broadcom wireless devices
290 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/b43
291 DEPENDS
:=+kmod-mac80211
+!TARGET_brcm47xx
:kmod-ssb @TARGET_brcm47xx||@TARGET_brcm63xx @LINUX_2_6_25||@LINUX_2_6_26||@LINUX_2_6_27||@LINUX_2_6_28
294 define KernelPackage
/b43
295 $(call KernelPackage
/b43-common
)
296 TITLE
:=Broadcom
43xx wireless support
297 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/b43
/b43.
$(LINUX_KMOD_SUFFIX
)
298 AUTOLOAD
:=$(call AutoLoad
,30,b43
)
301 define KernelPackage
/b43
/description
302 Kernel module for Broadcom
43xx wireless support
(mac80211 stack
) new
305 define KernelPackage
/b43legacy
306 $(call KernelPackage
/b43-common
)
307 TITLE
:=Broadcom
43xx-legacy wireless support
308 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/b43legacy
/b43legacy.
$(LINUX_KMOD_SUFFIX
)
309 AUTOLOAD
:=$(call AutoLoad
,30,b43legacy
)
312 define KernelPackage
/b43legacy
/description
313 Kernel module for Broadcom
43xx-legacy wireless support
(mac80211 stack
) new
317 -I
$(PKG_BUILD_DIR
)/include \
318 $(foreach opt
,$(CONFOPTS
),-DCONFIG_
$(opt
)) \
319 $(if
$(CONFIG_LEDS_TRIGGERS
), -DCONFIG_MAC80211_LEDS
-DCONFIG_LEDS_TRIGGERS
-DCONFIG_B43_LEDS
-DCONFIG_B43LEGACY_LEDS
) \
320 $(if
$(CONFIG_RFKILL
),-DCONFIG_B43_RFKILL
-DCONFIG_B43LEGACY_RFKILL
) \
321 $(if
$(CONFIG_PCMCIA
),-DCONFIG_B43_PCMCIA
) \
322 $(if
$(CONFIG_DEBUG_FS
), -DCONFIG_MAC80211_DEBUGFS
) \
323 -D__CONFIG_MAC80211_RC_DEFAULT
=minstrel \
326 CROSS_COMPILE
="$(TARGET_CROSS)" \
327 ARCH
="$(LINUX_KARCH)" \
328 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
329 $(foreach opt
,$(CONFOPTS
),CONFIG_
$(opt
)=m
) \
331 CONFIG_MAC80211_RC_PID
=y \
332 CONFIG_MAC80211_RC_MINSTREL
=y \
333 CONFIG_MAC80211_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
334 CONFIG_MAC80211_DEBUGFS
=$(CONFIG_DEBUG_FS
) \
335 CONFIG_B43_PCMCIA
=$(CONFIG_PCMCIA
) \
336 CONFIG_B43_RFKILL
=$(CONFIG_RFKILL
) \
337 CONFIG_B43LEGACY_RFKILL
=$(CONFIG_RFKILL
) \
338 CONFIG_B43LEGACY_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
339 CONFIG_B43_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
340 $(if
$(CONFIG_PACKAGE_kmod-b43
),CONFIG_B43
=m
) \
341 $(if
$(CONFIG_PACKAGE_kmod-b43legacy
),CONFIG_B43LEGACY
=m
) \
342 KLIB_BUILD
="$(LINUX_DIR)" \
346 rm -rf
$(PKG_BUILD_DIR
)
347 mkdir
-p
$(PKG_BUILD_DIR
)
350 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
351 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT61FW
)
352 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT71FW
)
353 -unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT2860FW
)
354 $(TAR
) -C
$(PKG_BUILD_DIR
) -xjf
$(DL_DIR
)/$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
355 rm -rf
$(PKG_BUILD_DIR
)/include/linux
/ssb
356 rm $(PKG_BUILD_DIR
)/include/net
/ieee80211.h
357 rm $(PKG_BUILD_DIR
)/include/net
/ieee80211_radiotap.h
358 rm $(PKG_BUILD_DIR
)/include/linux
/eeprom_93cx6.h
361 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
362 define Build
/Compile
/kmod
363 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_OPTS
) all
368 $(call Build
/Compile
/kmod
)
371 define Build
/InstallDev
372 mkdir
-p
$(1)/usr
/include/mac80211
$(1)/usr
/include/net
/mac80211
373 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/*.h
$(PKG_BUILD_DIR
)/include/* $(1)/usr
/include/mac80211
/
374 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/rate.h
$(1)/usr
/include/net
/mac80211
/
377 define KernelPackage
/mac80211
/install
378 $(INSTALL_DIR
) $(1)/lib
/wifi
379 $(INSTALL_DATA
) .
/files
/lib
/wifi
/mac80211.sh
$(1)/lib
/wifi
382 define KernelPackage
/p54-common
/install
383 $(INSTALL_DIR
) $(1)/lib
/firmware
384 $(INSTALL_DATA
) $(DL_DIR
)/$(P54FW
) $(1)/lib
/firmware
/isl3886
387 define KernelPackage
/rt61-pci
/install
388 $(INSTALL_DIR
) $(1)/lib
/firmware
389 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
/
392 define KernelPackage
/rt73-usb
/install
393 $(INSTALL_DIR
) $(1)/lib
/firmware
394 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
/
397 define KernelPackage
/rt2800-pci
/install
398 $(INSTALL_DIR
) $(1)/lib
/firmware
399 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2860.bin
$(1)/lib
/firmware
/
402 define KernelPackage
/zd1211rw
/install
403 $(INSTALL_DIR
) $(1)/lib
/firmware
/zd1211
404 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/$(ZD1211FW_NAME
)/zd1211
* $(1)/lib
/firmware
/zd1211
407 define Build
/b43-common
408 tar xjf
"$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C
"$(PKG_BUILD_DIR)"
409 $(MAKE
) -C
"$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)" \
410 CFLAGS
="-I$(STAGING_DIR_HOST)/include -include endian.h"
413 define KernelPackage
/b43
/install
414 $(call Build
/b43-common
)
415 tar xjf
"$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C
"$(PKG_BUILD_DIR)"
416 $(INSTALL_DIR
) $(1)/lib
/firmware
/
418 $(PKG_BUILD_DIR
)/$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
)/b43-fwcutter \
419 -w
$(1)/lib
/firmware
/ \
420 $(PKG_BUILD_DIR
)/$(PKG_B43_FWV4_NAME
)-$(PKG_B43_FWV4_VERSION
)/$(PKG_B43_FWV4_OBJECT
)
423 define KernelPackage
/b43legacy
/install
424 $(call Build
/b43-common
)
425 $(INSTALL_DIR
) $(1)/lib
/firmware
/
427 $(PKG_BUILD_DIR
)/$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
)/b43-fwcutter \
428 -w
$(1)/lib
/firmware
/ \
429 $(DL_DIR
)/$(PKG_B43_FWV3_SOURCE
)
432 $(eval
$(call KernelPackage
,ath5k
))
433 $(eval
$(call KernelPackage
,mac80211
))
434 $(eval
$(call KernelPackage
,p54-common
))
435 $(eval
$(call KernelPackage
,p54-pci
))
436 $(eval
$(call KernelPackage
,p54-usb
))
437 $(eval
$(call KernelPackage
,rt2x00-lib
))
438 $(eval
$(call KernelPackage
,rt2x00-pci
))
439 $(eval
$(call KernelPackage
,rt2x00-usb
))
440 $(eval
$(call KernelPackage
,rt2400-pci
))
441 $(eval
$(call KernelPackage
,rt2500-pci
))
442 $(eval
$(call KernelPackage
,rt2500-usb
))
443 $(eval
$(call KernelPackage
,rt61-pci
))
444 $(eval
$(call KernelPackage
,rt73-usb
))
445 $(eval
$(call KernelPackage
,rt2800-pci
))
446 $(eval
$(call KernelPackage
,zd1211rw
))
447 $(eval
$(call KernelPackage
,mac80211-hwsim
))
448 $(eval
$(call KernelPackage
,ath9k-new
))
449 $(eval
$(call KernelPackage
,b43
))
450 $(eval
$(call KernelPackage
,b43legacy
))