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 PKG_VERSION
:=2008-05-26
16 PKG_SOURCE
:=compat-wireless-
$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=http
://www.orbit-lab.org
/kernel
/compat-wireless-2.6
/2008/05
18 #PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
19 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/compat-wireless-
$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/package.mk
23 define KernelPackage
/mac80211
24 SUBMENU
:=Wireless Drivers
25 TITLE
:=Linux
802.11 Wireless Networking Stack
26 DEPENDS
:=@LINUX_2_6_23||LINUX_2_6_24||LINUX_2_6_25
+kmod-crypto-arc4
+kmod-crypto-aes
+wireless-tools
28 $(PKG_BUILD_DIR
)/net
/mac80211
/mac80211.
$(LINUX_KMOD_SUFFIX
) \
29 $(PKG_BUILD_DIR
)/net
/wireless
/cfg80211.
$(LINUX_KMOD_SUFFIX
)
30 AUTOLOAD
:=$(call AutoLoad
,20,cfg80211 mac80211
)
33 define KernelPackage
/mac80211
/description
34 Linux
802.11 Wireless Networking Stack
37 # Ralink rt2x00 drivers
38 RT61FW
:=RT61_Firmware_V1.2.zip
39 RT71FW
:=RT71W_Firmware_V1.8.zip
43 URL
:=http
://www.ralinktech.com.tw
/data
/
44 MD5SUM
:=d4c690c93b470bc9a681297c2adc6281
46 $(eval
$(call Download
,rt61
))
50 URL
:=http
://www.ralinktech.com.tw
/data
/
51 MD5SUM
:=1e7a5dc574e0268574fcda3fd5cf52f7
53 $(eval
$(call Download
,rt71w
))
55 define KernelPackage
/rt2x00
/Default
56 SUBMENU
:=Wireless Drivers
57 TITLE
:=Ralink Drivers for RT2x00 cards
58 DEPENDS
:=@LINUX_2_6_24||LINUX_2_6_25
61 define KernelPackage
/rt2x00-lib
62 $(call KernelPackage
/rt2x00
/Default
)
63 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
+kmod-mac80211
65 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
66 AUTOLOAD
:=$(call AutoLoad
,25,blkcipher ecb arc4 rt2x00lib
)
69 define KernelPackage
/rt2x00-pci
70 $(call KernelPackage
/rt2x00
/Default
)
71 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
+kmod-eeprom-93cx6
73 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
74 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
77 define KernelPackage
/rt2x00-usb
78 $(call KernelPackage
/rt2x00
/Default
)
79 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
81 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
82 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
85 define KernelPackage
/rt2400-pci
86 $(call KernelPackage
/rt2x00
/Default
)
87 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
89 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
90 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
93 define KernelPackage
/rt2500-pci
94 $(call KernelPackage
/rt2x00
/Default
)
95 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
97 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
98 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
101 define KernelPackage
/rt2500-usb
102 $(call KernelPackage
/rt2x00
/Default
)
103 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
+kmod-crc-itu-t
105 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
106 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
109 define KernelPackage
/rt61-pci
110 $(call KernelPackage
/rt2x00
/Default
)
111 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-pci
+kmod-crc-itu-t
113 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt61pci.
$(LINUX_KMOD_SUFFIX
)
114 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
117 define KernelPackage
/rt73-usb
118 $(call KernelPackage
/rt2x00
/Default
)
119 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-usb
121 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/rt2x00
/rt73usb.
$(LINUX_KMOD_SUFFIX
)
122 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
125 define KernelPackage
/net-zd1211rw
126 SUBMENU
:=Wireless Drivers
127 TITLE
:=Zydas ZD1211 support
128 DEPENDS
:=@LINUX_2_6_24||LINUX_2_6_25 @USB_SUPPORT
+kmod-ieee80211-softmac
129 FILES
:=$(PKG_BUILD_DIR
)/drivers
/net
/wireless
/zd1211rw
/zd1211rw.
$(LINUX_KMOD_SUFFIX
)
130 AUTOLOAD
:=$(call AutoLoad
,60,zd1211rw
)
134 $(foreach opt
,$(CONFOPTS
),-DCONFIG_
$(opt
)) \
135 $(if
$(CONFIG_LEDS_TRIGGERS
), -DCONFIG_MAC80211_LEDS
-DCONFIG_LEDS_TRIGGERS
) \
136 -D__CONFIG_MAC80211_RC_DEFAULT
=pid \
139 CROSS_COMPILE
="$(TARGET_CROSS)" \
140 ARCH
="$(LINUX_KARCH)" \
141 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
142 $(foreach opt
,$(CONFOPTS
),CONFIG_
$(opt
)=m
) \
144 CONFIG_MAC80211_RC_PID
=y \
145 CONFIG_MAC80211_LEDS
=$(CONFIG_LEDS_TRIGGERS
) \
146 LINUXINCLUDE
="-I$(PKG_BUILD_DIR)/include -I$(LINUX_DIR)/include -include linux/autoconf.h" \
147 KLIB_BUILD
="$(LINUX_DIR)" \
150 rm -rf
$(PKG_BUILD_DIR
)
151 mkdir
-p
$(PKG_BUILD_DIR
)
154 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
155 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT61FW
)
156 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/$(RT71FW
)
157 rm -rf
$(PKG_BUILD_DIR
)/include/linux
/ssb
160 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
161 define Build
/Compile
/kmod
162 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_OPTS
) all
167 $(call Build
/Compile
/kmod
)
170 define Build
/InstallDev
171 mkdir
-p
$(1)/usr
/include/mac80211
172 $(CP
) $(PKG_BUILD_DIR
)/net
/mac80211
/*.h
$(PKG_BUILD_DIR
)/include/* $(1)/usr
/include/mac80211
/
175 define KernelPackage
/mac80211
/install
176 $(INSTALL_DIR
) $(1)/lib
/wifi
177 $(INSTALL_DATA
) .
/files
/lib
/wifi
/mac80211.sh
$(1)/lib
/wifi
180 define KernelPackage
/rt61-pci
/install
181 $(INSTALL_DIR
) $(1)/lib
/firmware
182 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
/
185 define KernelPackage
/rt73-usb
/install
186 $(INSTALL_DIR
) $(1)/lib
/firmware
187 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
/
190 $(eval
$(call KernelPackage
,net-zd1211rw
))
191 $(eval
$(call KernelPackage
,mac80211
))
192 $(eval
$(call KernelPackage
,rt2x00-lib
))
193 $(eval
$(call KernelPackage
,rt2x00-pci
))
194 $(eval
$(call KernelPackage
,rt2x00-usb
))
195 $(eval
$(call KernelPackage
,rt2400-pci
))
196 $(eval
$(call KernelPackage
,rt2500-pci
))
197 $(eval
$(call KernelPackage
,rt2500-usb
))
198 $(eval
$(call KernelPackage
,rt61-pci
))
199 $(eval
$(call KernelPackage
,rt73-usb
))