restore the /tmp/resolv.conf symlink when stopping dnsmasq
[openwrt.git] / package / mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 7440 2007-06-02 02:22:01Z nbd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=mac80211
13 PKG_RELEASE:=1
14
15 PKG_VERSION:=2008-08-06
16 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08/
18 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define KernelPackage/mac80211
23 SUBMENU:=Wireless Drivers
24 TITLE:=Linux 802.11 Wireless Networking Stack
25 DEPENDS:=@LINUX_2_6 +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools @!TARGET_avr32
26 FILES:= \
27 $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
28 $(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
29 AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211)
30 endef
31
32 define KernelPackage/mac80211/description
33 Linux 802.11 Wireless Networking Stack
34 endef
35
36 # Ralink rt2x00 drivers
37 RT61FW:=RT61_Firmware_V1.2.zip
38 RT71FW:=RT71W_Firmware_V1.8.zip
39
40 define Download/rt61
41 FILE:=$(RT61FW)
42 URL:=http://www.ralinktech.com.tw/data/
43 MD5SUM:=d4c690c93b470bc9a681297c2adc6281
44 endef
45 $(eval $(call Download,rt61))
46
47 define Download/rt71w
48 FILE:=$(RT71FW)
49 URL:=http://www.ralinktech.com.tw/data/
50 MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
51 endef
52 $(eval $(call Download,rt71w))
53
54 define KernelPackage/rt2x00/Default
55 SUBMENU:=Wireless Drivers
56 TITLE:=Ralink Drivers for RT2x00 cards
57 DEPENDS:=@LINUX_2_6_24||LINUX_2_6_25
58 endef
59
60 define KernelPackage/rt2x00-lib
61 $(call KernelPackage/rt2x00/Default)
62 DEPENDS+= @PCI_SUPPORT||USB_SUPPORT +kmod-mac80211
63 TITLE+= (LIB)
64 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
65 AUTOLOAD:=$(call AutoLoad,25,blkcipher ecb arc4 rt2x00lib)
66 endef
67
68 define KernelPackage/rt2x00-pci
69 $(call KernelPackage/rt2x00/Default)
70 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-lib +kmod-eeprom-93cx6
71 TITLE+= (PCI)
72 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
73 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
74 endef
75
76 define KernelPackage/rt2x00-usb
77 $(call KernelPackage/rt2x00/Default)
78 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
79 TITLE+= (USB)
80 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
81 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
82 endef
83
84 define KernelPackage/rt2400-pci
85 $(call KernelPackage/rt2x00/Default)
86 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
87 TITLE+= (RT2400 PCI)
88 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
89 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
90 endef
91
92 define KernelPackage/rt2500-pci
93 $(call KernelPackage/rt2x00/Default)
94 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
95 TITLE+= (RT2500 PCI)
96 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
97 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
98 endef
99
100 define KernelPackage/rt2500-usb
101 $(call KernelPackage/rt2x00/Default)
102 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-crc-itu-t
103 TITLE+= (RT2500 USB)
104 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
105 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
106 endef
107
108 define KernelPackage/rt61-pci
109 $(call KernelPackage/rt2x00/Default)
110 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-crc-itu-t
111 TITLE+= (RT2x61 PCI)
112 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
113 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
114 endef
115
116 define KernelPackage/rt73-usb
117 $(call KernelPackage/rt2x00/Default)
118 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
119 TITLE+= (RT73 USB)
120 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
121 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
122 endef
123
124 define KernelPackage/net-zd1211rw
125 SUBMENU:=Wireless Drivers
126 TITLE:=Zydas ZD1211 support
127 DEPENDS:=@LINUX_2_6_24||LINUX_2_6_25 @USB_SUPPORT +kmod-ieee80211-softmac
128 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
129 AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
130 endef
131
132 define KernelPackage/ath5k
133 SUBMENU:=Wireless Drivers
134 TITLE:=Atheros 5xxx wireless cards support
135 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
136 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
137 AUTOLOAD:=$(call AutoLoad,27,ath5k)
138 endef
139
140 BUILDFLAGS:= \
141 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
142 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \
143 -D__CONFIG_MAC80211_RC_DEFAULT=pid \
144
145 MAKE_OPTS:= \
146 CROSS_COMPILE="$(TARGET_CROSS)" \
147 ARCH="$(LINUX_KARCH)" \
148 EXTRA_CFLAGS="$(BUILDFLAGS)" \
149 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
150 CONFIG_NL80211=y \
151 CONFIG_MAC80211_RC_PID=y \
152 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
153 LINUXINCLUDE="-I$(PKG_BUILD_DIR)/include -I$(LINUX_DIR)/include -include linux/autoconf.h" \
154 KLIB_BUILD="$(LINUX_DIR)" \
155
156 define Build/Prepare
157 rm -rf $(PKG_BUILD_DIR)
158 mkdir -p $(PKG_BUILD_DIR)
159 $(PKG_UNPACK)
160 $(Build/Patch)
161 $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
162 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
163 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
164 rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
165 endef
166
167 ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
168 define Build/Compile/kmod
169 $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
170 endef
171 endif
172
173 define Build/Compile
174 $(call Build/Compile/kmod)
175 endef
176
177 define Build/InstallDev
178 mkdir -p $(1)/usr/include/mac80211 $(1)/usr/include/net/mac80211
179 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
180 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
181 endef
182
183 define KernelPackage/mac80211/install
184 $(INSTALL_DIR) $(1)/lib/wifi
185 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
186 endef
187
188 define KernelPackage/rt61-pci/install
189 $(INSTALL_DIR) $(1)/lib/firmware
190 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
191 endef
192
193 define KernelPackage/rt73-usb/install
194 $(INSTALL_DIR) $(1)/lib/firmware
195 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
196 endef
197
198 $(eval $(call KernelPackage,ath5k))
199 $(eval $(call KernelPackage,net-zd1211rw))
200 $(eval $(call KernelPackage,mac80211))
201 $(eval $(call KernelPackage,rt2x00-lib))
202 $(eval $(call KernelPackage,rt2x00-pci))
203 $(eval $(call KernelPackage,rt2x00-usb))
204 $(eval $(call KernelPackage,rt2400-pci))
205 $(eval $(call KernelPackage,rt2500-pci))
206 $(eval $(call KernelPackage,rt2500-usb))
207 $(eval $(call KernelPackage,rt61-pci))
208 $(eval $(call KernelPackage,rt73-usb))
This page took 0.06817 seconds and 5 git commands to generate.