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
),)
16 PKG_VERSION
:=2008-11-03
17 PKG_SOURCE_URL
:=http
://www.orbit-lab.org
/kernel
/compat-wireless-2.6
/2008/11
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
:=$(if
$(CONFIG_TARGET_brcm47xx
),.
/patches-brcm
,.
/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 define KernelPackage
/mac80211
31 SUBMENU
:=Wireless Drivers
32 TITLE
:=Linux
802.11 Wireless Networking Stack
33 URL
:=http
://linuxwireless.org
/
34 DEPENDS
:=@LINUX_2_6
+kmod-crypto-arc4
+kmod-crypto-aes
+wireless-tools @
!TARGET_avr32
36 $(PKG_BUILD_DIR
)/net
/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
37 $(PKG_BUILD_DIR
)/net
/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
38 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211
)
41 define KernelPackage
/mac80211
/description
42 Linux
802.11 Wireless Networking Stack
45 # Ralink rt2x00 drivers
46 RT61FW
:=RT61_Firmware_V1.2.zip
47 RT71FW
:=RT71W_Firmware_V1.8.zip
48 RT2860FW
:=RT2860_Firmware_V11.zip
52 URL
:=http
://www.ralinktech.com.tw
/data
/
53 MD5SUM
:=d4c690c93b470bc9a681297c2adc6281
55 $(eval
$(call Download
,rt61
))
59 URL
:=http
://www.ralinktech.com.tw
/data
/
60 MD5SUM
:=1e7a5dc574e0268574fcda3fd5cf52f7
62 $(eval
$(call Download
,rt71w
))
64 define Download
/rt2860
66 URL
:=http
://www.ralinktech.com.tw
/data
/drivers
67 MD5SUM
:=440a81756a52c53528f16faa41c40124
69 $(eval
$(call Download
,rt2860
))
71 define KernelPackage
/rt2x00
/Default
72 SUBMENU
:=Wireless Drivers
73 TITLE
:=Ralink Drivers for RT2x00 cards
76 define KernelPackage
/rt2x00-lib
77 $(call KernelPackage
/rt2x00
/Default
)
78 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
+kmod-mac80211
+kmod-crc-itu-t
80 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
81 AUTOLOAD
:=$(call AutoLoad
,25,blkcipher ecb arc4 rt2x00lib
)
84 define KernelPackage
/rt2x00-pci
85 $(call KernelPackage
/rt2x00
/Default
)
86 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
+kmod-eeprom-93cx6
88 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
89 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
92 define KernelPackage
/rt2x00-usb
93 $(call KernelPackage
/rt2x00
/Default
)
94 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
96 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
97 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
100 define KernelPackage
/rt2400-pci
101 $(call KernelPackage
/rt2x00
/Default
)
102 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
104 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
105 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
108 define KernelPackage
/rt2500-pci
109 $(call KernelPackage
/rt2x00
/Default
)
110 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
112 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
113 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
116 define KernelPackage
/rt2500-usb
117 $(call KernelPackage
/rt2x00
/Default
)
118 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
120 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
121 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
124 define KernelPackage
/rt61-pci
125 $(call KernelPackage
/rt2x00
/Default
)
126 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
128 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt61pci.
$(LINUX_KMOD_SUFFIX
)
129 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
132 define KernelPackage
/rt73-usb
133 $(call KernelPackage
/rt2x00
/Default
)
134 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
136 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt73usb.
$(LINUX_KMOD_SUFFIX
)
137 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
140 define KernelPackage
/rt2800-pci
141 $(call KernelPackage
/rt2x00
/Default
)
142 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci @LINUX_2_6_27||@LINUX_2_6_28
144 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2800pci.
$(LINUX_KMOD_SUFFIX
)
145 AUTOLOAD
:=$(call AutoLoad
,27,rt2800pci
)
148 ZD1211FW_NAME
:=zd1211-firmware
149 ZD1211FW_VERSION
:=1.4
150 define Download
/zd1211rw
151 FILE
:=$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
153 MD5SUM
:=19f28781d76569af8551c9d11294c870
155 $(eval
$(call Download
,zd1211rw
))
157 define KernelPackage
/zd1211rw
158 SUBMENU
:=Wireless Drivers
159 TITLE
:=Zydas ZD1211 support
160 DEPENDS
:= @USB_SUPPORT
+kmod-usb-core
+kmod-mac80211
161 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/zd1211rw
/zd1211rw.
$(LINUX_KMOD_SUFFIX
)
162 AUTOLOAD
:=$(call AutoLoad
,60,zd1211rw
)
165 define KernelPackage
/ath5k
166 SUBMENU
:=Wireless Drivers
167 TITLE
:=Atheros
5xxx wireless cards support
168 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/ath5k
169 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211
170 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath5k
/ath5k.
$(LINUX_KMOD_SUFFIX
)
171 AUTOLOAD
:=$(call AutoLoad
,27,ath5k
)
174 define KernelPackage
/ath5k
/description
175 This module adds support for wireless adapters based on
176 Atheros
5xxx chipset.
179 define KernelPackage
/ath9k-new
180 SUBMENU
:=Wireless Drivers
181 TITLE
:=Atheros
802.11n wireless cards support
182 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/ath9k
183 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211 @LINUX_2_6_27||@LINUX_2_6_28 @
!kmod-ath9k
184 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath9k
/ath9k.
$(LINUX_KMOD_SUFFIX
)
185 AUTOLOAD
:=$(call AutoLoad
,27,ath9k
)
188 define KernelPackage
/ath9k-new
/description
189 This module adds support for wireless adapters based on
190 Atheros IEEE
802.11n AR5008 and AR9001 family of chipsets.
193 define KernelPackage
/mac80211-hwsim
194 SUBMENU
:=Wireless Drivers
195 TITLE
:=mac80211 HW simulation device
196 DEPENDS
+= +kmod-mac80211
197 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/mac80211_hwsim.
$(LINUX_KMOD_SUFFIX
)
198 AUTOLOAD
:=$(call AutoLoad
,60,mac80211_hwsim
)
202 PKG_B43_FWV4_NAME
:=broadcom-wl
203 PKG_B43_FWV4_VERSION
:=4.150.10.5
204 PKG_B43_FWV4_OBJECT
:=driver
/wl_apsta_mimo.o
205 PKG_B43_FWV4_SOURCE
:=$(PKG_B43_FWV4_NAME
)-$(PKG_B43_FWV4_VERSION
).
tar.bz2
206 PKG_B43_FWV4_SOURCE_URL
:=http
://mirror2.openwrt.org
/sources
/
207 PKG_B43_FWV4_MD5SUM
:=0c6ba9687114c6b598e8019e262d9a60
209 PKG_B43_FWV3_NAME
:=wl_apsta
210 PKG_B43_FWV3_VERSION
:=3.130.20.0
211 PKG_B43_FWV3_SOURCE
:=$(PKG_B43_FWV3_NAME
)-$(PKG_B43_FWV3_VERSION
).o
212 PKG_B43_FWV3_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
/
213 PKG_B43_FWV3_MD5SUM
:=e08665c5c5b66beb9c3b2dd54aa80cb3
215 PKG_B43_FWCUTTER_NAME
:=b43-fwcutter
216 PKG_B43_FWCUTTER_VERSION
:=011
217 PKG_B43_FWCUTTER_SOURCE
:=$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
).
tar.bz2
218 PKG_B43_FWCUTTER_SOURCE_URL
:=http
://bu3sch.de
/b43
/fwcutter
/
219 PKG_B43_FWCUTTER_MD5SUM
:=3db2f4de85a459451f5b391cf67a8d44
221 define Download
/b43-common
222 FILE
:=$(PKG_B43_FWCUTTER_SOURCE
)
223 URL
:=$(PKG_B43_FWCUTTER_SOURCE_URL
)
224 MD5SUM
:=$(PKG_B43_FWCUTTER_MD5SUM
)
226 $(eval
$(call Download
,b43-common
))
229 FILE
:=$(PKG_B43_FWV4_SOURCE
)
230 URL
:=$(PKG_B43_FWV4_SOURCE_URL
)
231 MD5SUM
:=$(PKG_B43_FWV4_MD5SUM
)
233 $(eval
$(call Download
,b43
))
235 define Download
/b43legacy
236 FILE
:=$(PKG_B43_FWV3_SOURCE
)
237 URL
:=$(PKG_B43_FWV3_SOURCE_URL
)
238 MD5SUM
:=$(PKG_B43_FWV3_MD5SUM
)
240 $(eval
$(call Download
,b43legacy
))
242 define KernelPackage
/b43-common
243 SUBMENU
:=Wireless Drivers
244 TITLE
:=Generic stuff for Broadcom wireless devices
245 URL
:=http
://linuxwireless.org
/en
/users
/Drivers
/b43
246 DEPENDS
:=@TARGET_brcm47xx
+kmod-mac80211
249 define KernelPackage
/b43
250 $(call KernelPackage
/b43-common
)
251 TITLE
:=Broadcom
43xx wireless support
252 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/b43
/b43.
$(LINUX_KMOD_SUFFIX
)
253 AUTOLOAD
:=$(call AutoLoad
,30,b43
)
256 define KernelPackage
/b43
/description
257 Kernel module for Broadcom
43xx wireless support
(mac80211 stack
) new
260 define KernelPackage
/b43legacy
261 $(call KernelPackage
/b43-common
)
262 TITLE
:=Broadcom
43xx-legacy wireless support
263 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/b43legacy
/b43legacy.
$(LINUX_KMOD_SUFFIX
)
264 AUTOLOAD
:=$(call AutoLoad
,30,b43legacy
)
267 define KernelPackage
/b43legacy
/description
268 Kernel module for Broadcom
43xx-legacy wireless support
(mac80211 stack
) new
272 -I
$(PKG_BUILD_DIR
)/include \
273 $(foreach opt
,$(CONFOPTS
),-DCONFIG_
$(opt
)) \
274 $(if
$(CONFIG_LEDS_TRIGGERS
), -DCONFIG_MAC80211_LEDS
-DCONFIG_LEDS_TRIGGERS
) \
275 $(if
$(CONFIG_DEBUG_FS
), -DCONFIG_MAC80211_DEBUGFS
) \
276 -D__CONFIG_MAC80211_RC_DEFAULT
=minstrel \
279 CROSS_COMPILE
="$(TARGET_CROSS)" \
280 ARCH
="$(LINUX_KARCH)" \
281 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
282 $(foreach opt
,$(CONFOPTS
),CONFIG_
$(opt
)=m
) \
284 CONFIG_MAC80211_RC_PID
=y \
285 CONFIG_MAC80211_RC_MINSTREL
=y \
286 CONFIG_MAC80211_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
287 CONFIG_MAC80211_DEBUGFS
=$(CONFIG_DEBUG_FS
) \
288 KLIB_BUILD
="$(LINUX_DIR)" \
292 rm -rf
$(PKG_BUILD_DIR
)
293 mkdir
-p
$(PKG_BUILD_DIR
)
296 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
297 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT61FW
)
298 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT71FW
)
299 -unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT2860FW
)
300 $(TAR
) -C
$(PKG_BUILD_DIR
) -xjf
$(DL_DIR
)/$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
301 $(if
$(CONFIG_TARGET_brcm47xx
),rm -rf
$(PKG_BUILD_DIR
)/include/linux
/ssb
)
302 rm $(PKG_BUILD_DIR
)/include/net
/ieee80211_crypt.h
303 rm $(PKG_BUILD_DIR
)/include/net
/ieee80211.h
304 rm $(PKG_BUILD_DIR
)/include/net
/ieee80211_radiotap.h
305 rm $(PKG_BUILD_DIR
)/include/linux
/eeprom_93cx6.h
308 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
309 define Build
/Compile
/kmod
310 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_OPTS
) all
315 $(call Build
/Compile
/kmod
)
318 define Build
/InstallDev
319 mkdir
-p
$(1)/usr
/include/mac80211
$(1)/usr
/include/net
/mac80211
320 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/*.h
$(PKG_BUILD_DIR
)/include/* $(1)/usr
/include/mac80211
/
321 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/rate.h
$(1)/usr
/include/net
/mac80211
/
324 define KernelPackage
/mac80211
/install
325 $(INSTALL_DIR
) $(1)/lib
/wifi
326 $(INSTALL_DATA
) .
/files
/lib
/wifi
/mac80211.sh
$(1)/lib
/wifi
329 define KernelPackage
/rt61-pci
/install
330 $(INSTALL_DIR
) $(1)/lib
/firmware
331 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
/
334 define KernelPackage
/rt73-usb
/install
335 $(INSTALL_DIR
) $(1)/lib
/firmware
336 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
/
339 define KernelPackage
/rt2800-pci
/install
340 $(INSTALL_DIR
) $(1)/lib
/firmware
341 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2860.bin
$(1)/lib
/firmware
/
344 define KernelPackage
/zd1211rw
/install
345 $(INSTALL_DIR
) $(1)/lib
/firmware
/zd1211
346 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/$(ZD1211FW_NAME
)/zd1211
* $(1)/lib
/firmware
/zd1211
349 define Build
/b43-common
350 tar xjf
"$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C
"$(PKG_BUILD_DIR)"
351 $(MAKE
) -C
"$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)" \
352 CFLAGS
="-I$(STAGING_DIR_HOST)/include -include endian.h"
355 define KernelPackage
/b43
/install
356 $(call Build
/b43-common
)
357 tar xjf
"$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C
"$(PKG_BUILD_DIR)"
358 $(INSTALL_DIR
) $(1)/lib
/firmware
/
360 $(PKG_BUILD_DIR
)/$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
)/b43-fwcutter \
361 -w
$(1)/lib
/firmware
/ \
362 $(PKG_BUILD_DIR
)/$(PKG_B43_FWV4_NAME
)-$(PKG_B43_FWV4_VERSION
)/$(PKG_B43_FWV4_OBJECT
)
365 define KernelPackage
/b43legacy
/install
366 $(call Build
/b43-common
)
367 $(INSTALL_DIR
) $(1)/lib
/firmware
/
369 $(PKG_BUILD_DIR
)/$(PKG_B43_FWCUTTER_NAME
)-$(PKG_B43_FWCUTTER_VERSION
)/b43-fwcutter \
370 -w
$(1)/lib
/firmware
/ \
371 $(DL_DIR
)/$(PKG_B43_FWV3_SOURCE
)
374 $(eval
$(call KernelPackage
,ath5k
))
375 $(eval
$(call KernelPackage
,mac80211
))
376 $(eval
$(call KernelPackage
,rt2x00-lib
))
377 $(eval
$(call KernelPackage
,rt2x00-pci
))
378 $(eval
$(call KernelPackage
,rt2x00-usb
))
379 $(eval
$(call KernelPackage
,rt2400-pci
))
380 $(eval
$(call KernelPackage
,rt2500-pci
))
381 $(eval
$(call KernelPackage
,rt2500-usb
))
382 $(eval
$(call KernelPackage
,rt61-pci
))
383 $(eval
$(call KernelPackage
,rt73-usb
))
384 $(eval
$(call KernelPackage
,rt2800-pci
))
385 $(eval
$(call KernelPackage
,zd1211rw
))
386 $(eval
$(call KernelPackage
,mac80211-hwsim
))
387 $(eval
$(call KernelPackage
,ath9k-new
))
388 $(eval
$(call KernelPackage
,b43
))
389 $(eval
$(call KernelPackage
,b43legacy
))