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-10-08
17 PKG_SOURCE_URL
:=http
://www.orbit-lab.org
/kernel
/compat-wireless-2.6
/2008/10
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
29 define KernelPackage
/mac80211
30 SUBMENU
:=Wireless Drivers
31 TITLE
:=Linux
802.11 Wireless Networking Stack
32 DEPENDS
:=@LINUX_2_6
+kmod-crypto-arc4
+kmod-crypto-aes
+wireless-tools @
!TARGET_avr32
34 $(PKG_BUILD_DIR
)/net
/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
35 $(PKG_BUILD_DIR
)/net
/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
36 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211
)
39 define KernelPackage
/mac80211
/description
40 Linux
802.11 Wireless Networking Stack
43 # Ralink rt2x00 drivers
44 RT61FW
:=RT61_Firmware_V1.2.zip
45 RT71FW
:=RT71W_Firmware_V1.8.zip
49 URL
:=http
://www.ralinktech.com.tw
/data
/
50 MD5SUM
:=d4c690c93b470bc9a681297c2adc6281
52 $(eval
$(call Download
,rt61
))
56 URL
:=http
://www.ralinktech.com.tw
/data
/
57 MD5SUM
:=1e7a5dc574e0268574fcda3fd5cf52f7
59 $(eval
$(call Download
,rt71w
))
61 define KernelPackage
/rt2x00
/Default
62 SUBMENU
:=Wireless Drivers
63 TITLE
:=Ralink Drivers for RT2x00 cards
66 define KernelPackage
/rt2x00-lib
67 $(call KernelPackage
/rt2x00
/Default
)
68 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
+kmod-mac80211
+kmod-crc-itu-t
70 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
71 AUTOLOAD
:=$(call AutoLoad
,25,blkcipher ecb arc4 rt2x00lib
)
74 define KernelPackage
/rt2x00-pci
75 $(call KernelPackage
/rt2x00
/Default
)
76 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
+kmod-eeprom-93cx6
78 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
79 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
82 define KernelPackage
/rt2x00-usb
83 $(call KernelPackage
/rt2x00
/Default
)
84 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
86 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
87 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
90 define KernelPackage
/rt2400-pci
91 $(call KernelPackage
/rt2x00
/Default
)
92 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
94 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
95 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
98 define KernelPackage
/rt2500-pci
99 $(call KernelPackage
/rt2x00
/Default
)
100 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
102 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
103 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
106 define KernelPackage
/rt2500-usb
107 $(call KernelPackage
/rt2x00
/Default
)
108 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
110 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
111 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
114 define KernelPackage
/rt61-pci
115 $(call KernelPackage
/rt2x00
/Default
)
116 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
118 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt61pci.
$(LINUX_KMOD_SUFFIX
)
119 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
122 define KernelPackage
/rt73-usb
123 $(call KernelPackage
/rt2x00
/Default
)
124 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
126 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt73usb.
$(LINUX_KMOD_SUFFIX
)
127 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
130 ZD1211FW_NAME
:=zd1211-firmware
131 ZD1211FW_VERSION
:=1.4
132 define Download
/zd1211rw
133 FILE
:=$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
135 MD5SUM
:=19f28781d76569af8551c9d11294c870
137 $(eval
$(call Download
,zd1211rw
))
139 define KernelPackage
/zd1211rw
140 SUBMENU
:=Wireless Drivers
141 TITLE
:=Zydas ZD1211 support
142 DEPENDS
:=@LINUX_2_6_24||@LINUX_2_6_25||@LINUX_2_6_26||@LINUX_2_6_27 @USB_SUPPORT
+kmod-usb-core
+kmod-mac80211
143 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/zd1211rw
/zd1211rw.
$(LINUX_KMOD_SUFFIX
)
144 AUTOLOAD
:=$(call AutoLoad
,60,zd1211rw
)
147 define KernelPackage
/ath5k
148 SUBMENU
:=Wireless Drivers
149 TITLE
:=Atheros
5xxx wireless cards support
150 DEPENDS
+= @PCI_SUPPORT
+kmod-mac80211
151 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/ath5k
/ath5k.
$(LINUX_KMOD_SUFFIX
)
152 AUTOLOAD
:=$(call AutoLoad
,27,ath5k
)
156 -I
$(PKG_BUILD_DIR
)/include \
157 $(foreach opt
,$(CONFOPTS
),-DCONFIG_
$(opt
)) \
158 $(if
$(CONFIG_LEDS_TRIGGERS
), -DCONFIG_MAC80211_LEDS
-DCONFIG_LEDS_TRIGGERS
) \
159 $(if
$(CONFIG_DEBUG_FS
), -DCONFIG_MAC80211_DEBUGFS
) \
160 -D__CONFIG_MAC80211_RC_DEFAULT
=minstrel \
163 CROSS_COMPILE
="$(TARGET_CROSS)" \
164 ARCH
="$(LINUX_KARCH)" \
165 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
166 $(foreach opt
,$(CONFOPTS
),CONFIG_
$(opt
)=m
) \
168 CONFIG_MAC80211_RC_PID
=y \
169 CONFIG_MAC80211_RC_MINSTREL
=y \
170 CONFIG_MAC80211_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
171 CONFIG_MAC80211_DEBUGFS
=$(CONFIG_DEBUG_FS
) \
172 KLIB_BUILD
="$(LINUX_DIR)" \
176 rm -rf
$(PKG_BUILD_DIR
)
177 mkdir
-p
$(PKG_BUILD_DIR
)
180 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
181 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT61FW
)
182 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT71FW
)
183 $(TAR
) -C
$(PKG_BUILD_DIR
) -xjf
$(DL_DIR
)/$(ZD1211FW_NAME
)-$(ZD1211FW_VERSION
).
tar.bz2
184 $(if
$(CONFIG_TARGET_brcm47xx
),rm -rf
$(PKG_BUILD_DIR
)/include/linux
/ssb
)
187 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
188 define Build
/Compile
/kmod
189 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_OPTS
) all
194 $(call Build
/Compile
/kmod
)
197 define Build
/InstallDev
198 mkdir
-p
$(1)/usr
/include/mac80211
$(1)/usr
/include/net
/mac80211
199 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/*.h
$(PKG_BUILD_DIR
)/include/* $(1)/usr
/include/mac80211
/
200 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/rate.h
$(1)/usr
/include/net
/mac80211
/
203 define KernelPackage
/mac80211
/install
204 $(INSTALL_DIR
) $(1)/lib
/wifi
205 $(INSTALL_DATA
) .
/files
/lib
/wifi
/mac80211.sh
$(1)/lib
/wifi
208 define KernelPackage
/rt61-pci
/install
209 $(INSTALL_DIR
) $(1)/lib
/firmware
210 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
/
213 define KernelPackage
/rt73-usb
/install
214 $(INSTALL_DIR
) $(1)/lib
/firmware
215 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
/
218 define KernelPackage
/zd1211rw
/install
219 $(INSTALL_DIR
) $(1)/lib
/firmware
/zd1211
220 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/$(ZD1211FW_NAME
)/zd1211
* $(1)/lib
/firmware
/zd1211
223 $(eval
$(call KernelPackage
,ath5k
))
224 $(eval
$(call KernelPackage
,mac80211
))
225 $(eval
$(call KernelPackage
,rt2x00-lib
))
226 $(eval
$(call KernelPackage
,rt2x00-pci
))
227 $(eval
$(call KernelPackage
,rt2x00-usb
))
228 $(eval
$(call KernelPackage
,rt2400-pci
))
229 $(eval
$(call KernelPackage
,rt2500-pci
))
230 $(eval
$(call KernelPackage
,rt2500-usb
))
231 $(eval
$(call KernelPackage
,rt61-pci
))
232 $(eval
$(call KernelPackage
,rt73-usb
))
233 $(eval
$(call KernelPackage
,zd1211rw
))