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
:=.
/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 DEPENDS
:=@LINUX_2_6
+kmod-crypto-arc4
+kmod-crypto-aes
+wireless-tools @
!TARGET_avr32
35 $(PKG_BUILD_DIR
)/net
/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
36 $(PKG_BUILD_DIR
)/net
/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
37 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211
)
40 define KernelPackage
/mac80211
/description
41 Linux
802.11 Wireless Networking Stack
44 # Ralink rt2x00 drivers
45 RT61FW
:=RT61_Firmware_V1.2.zip
46 RT71FW
:=RT71W_Firmware_V1.8.zip
50 URL
:=http
://www.ralinktech.com.tw
/data
/
51 MD5SUM
:=d4c690c93b470bc9a681297c2adc6281
53 $(eval
$(call Download
,rt61
))
57 URL
:=http
://www.ralinktech.com.tw
/data
/
58 MD5SUM
:=1e7a5dc574e0268574fcda3fd5cf52f7
60 $(eval
$(call Download
,rt71w
))
62 define KernelPackage
/rt2x00
/Default
63 SUBMENU
:=Wireless Drivers
64 TITLE
:=Ralink Drivers for RT2x00 cards
67 define KernelPackage
/rt2x00-lib
68 $(call KernelPackage
/rt2x00
/Default
)
69 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
+kmod-mac80211
+kmod-crc-itu-t
71 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
72 AUTOLOAD
:=$(call AutoLoad
,25,blkcipher ecb arc4 rt2x00lib
)
75 define KernelPackage
/rt2x00-pci
76 $(call KernelPackage
/rt2x00
/Default
)
77 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
+kmod-eeprom-93cx6
79 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
80 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
83 define KernelPackage
/rt2x00-usb
84 $(call KernelPackage
/rt2x00
/Default
)
85 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
87 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
88 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
91 define KernelPackage
/rt2400-pci
92 $(call KernelPackage
/rt2x00
/Default
)
93 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
95 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
96 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
99 define KernelPackage
/rt2500-pci
100 $(call KernelPackage
/rt2x00
/Default
)
101 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
103 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
104 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
107 define KernelPackage
/rt2500-usb
108 $(call KernelPackage
/rt2x00
/Default
)
109 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
111 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
112 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
115 define KernelPackage
/rt61-pci
116 $(call KernelPackage
/rt2x00
/Default
)
117 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
119 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt61pci.
$(LINUX_KMOD_SUFFIX
)
120 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
123 define KernelPackage
/rt73-usb
124 $(call KernelPackage
/rt2x00
/Default
)
125 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
127 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt73usb.
$(LINUX_KMOD_SUFFIX
)
128 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
131 define KernelPackage
/rt2800-pci
132 $(call KernelPackage
/rt2x00
/Default
)
133 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci @LINUX_2_6_27
135 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2800pci.
$(LINUX_KMOD_SUFFIX
)
136 AUTOLOAD
:=$(call AutoLoad
,27,rt2800pci
)
139 ZD1211FW_NAME
:=zd1211-firmware
140 ZD1211FW_VERSION
:=1.4
141 define Download
/zd1211rw
142 FILE
:=$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
144 MD5SUM
:=19f28781d76569af8551c9d11294c870
146 $(eval
$(call Download
,zd1211rw
))
148 define KernelPackage
/zd1211rw
149 SUBMENU
:=Wireless Drivers
150 TITLE
:=Zydas ZD1211 support
151 DEPENDS
:=@LINUX_2_6_24||@LINUX_2_6_25||@LINUX_2_6_26||@LINUX_2_6_27 @USB_SUPPORT
+kmod-usb-core
+kmod-mac80211
152 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/zd1211rw
/zd1211rw.
$(LINUX_KMOD_SUFFIX
)
153 AUTOLOAD
:=$(call AutoLoad
,60,zd1211rw
)
156 define KernelPackage
/ath5k
157 SUBMENU
:=Wireless Drivers
158 TITLE
:=Atheros
5xxx wireless cards support
159 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211
160 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath5k
/ath5k.
$(LINUX_KMOD_SUFFIX
)
161 AUTOLOAD
:=$(call AutoLoad
,27,ath5k
)
165 -I
$(PKG_BUILD_DIR
)/include \
166 $(foreach opt
,$(CONFOPTS
),-DCONFIG_
$(opt
)) \
167 $(if
$(CONFIG_LEDS_TRIGGERS
), -DCONFIG_MAC80211_LEDS
-DCONFIG_LEDS_TRIGGERS
) \
168 $(if
$(CONFIG_DEBUG_FS
), -DCONFIG_MAC80211_DEBUGFS
) \
169 -D__CONFIG_MAC80211_RC_DEFAULT
=minstrel \
172 CROSS_COMPILE
="$(TARGET_CROSS)" \
173 ARCH
="$(LINUX_KARCH)" \
174 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
175 $(foreach opt
,$(CONFOPTS
),CONFIG_
$(opt
)=m
) \
177 CONFIG_MAC80211_RC_PID
=y \
178 CONFIG_MAC80211_RC_MINSTREL
=y \
179 CONFIG_MAC80211_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
180 CONFIG_MAC80211_DEBUGFS
=$(CONFIG_DEBUG_FS
) \
181 KLIB_BUILD
="$(LINUX_DIR)" \
185 rm -rf
$(PKG_BUILD_DIR
)
186 mkdir
-p
$(PKG_BUILD_DIR
)
189 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
190 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT61FW
)
191 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT71FW
)
192 $(TAR
) -C
$(PKG_BUILD_DIR
) -xjf
$(DL_DIR
)/$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
193 $(if
$(CONFIG_TARGET_brcm47xx
),rm -rf
$(PKG_BUILD_DIR
)/include/linux
/ssb
)
196 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
197 define Build
/Compile
/kmod
198 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_OPTS
) all
203 $(call Build
/Compile
/kmod
)
206 define Build
/InstallDev
207 mkdir
-p
$(1)/usr
/include/mac80211
$(1)/usr
/include/net
/mac80211
208 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/*.h
$(PKG_BUILD_DIR
)/include/* $(1)/usr
/include/mac80211
/
209 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/rate.h
$(1)/usr
/include/net
/mac80211
/
212 define KernelPackage
/mac80211
/install
213 $(INSTALL_DIR
) $(1)/lib
/wifi
214 $(INSTALL_DATA
) .
/files
/lib
/wifi
/mac80211.sh
$(1)/lib
/wifi
217 define KernelPackage
/rt61-pci
/install
218 $(INSTALL_DIR
) $(1)/lib
/firmware
219 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
/
222 define KernelPackage
/rt73-usb
/install
223 $(INSTALL_DIR
) $(1)/lib
/firmware
224 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
/
227 define KernelPackage
/zd1211rw
/install
228 $(INSTALL_DIR
) $(1)/lib
/firmware
/zd1211
229 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/$(ZD1211FW_NAME
)/zd1211
* $(1)/lib
/firmware
/zd1211
232 $(eval
$(call KernelPackage
,ath5k
))
233 $(eval
$(call KernelPackage
,mac80211
))
234 $(eval
$(call KernelPackage
,rt2x00-lib
))
235 $(eval
$(call KernelPackage
,rt2x00-pci
))
236 $(eval
$(call KernelPackage
,rt2x00-usb
))
237 $(eval
$(call KernelPackage
,rt2400-pci
))
238 $(eval
$(call KernelPackage
,rt2500-pci
))
239 $(eval
$(call KernelPackage
,rt2500-usb
))
240 $(eval
$(call KernelPackage
,rt61-pci
))
241 $(eval
$(call KernelPackage
,rt73-usb
))
242 $(eval
$(call KernelPackage
,rt2800-pci
))
243 $(eval
$(call KernelPackage
,zd1211rw
))