[OpenWrt-Devel] [PATCH] [hostap-driver] Major enhancement to hostap.sh script
[openwrt/svn-archive/archive.git] / package / hostap-driver / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=hostap-driver
12 PKG_VERSION:=0.4.9
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
17 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
18
19 include $(INCLUDE_DIR)/package.mk
20 ifeq ($(DUMP),)
21 -include $(LINUX_DIR)/.config
22 endif
23
24 define KernelPackage/hostap/Default/2.4
25 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
26 endef
27
28 define KernelPackage/hostap/Default/2.6
29 VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
30 endef
31
32 define KernelPackage/hostap/Default
33 $(call KernelPackage/hostap/Default/$(KERNEL))
34 SUBMENU:=Wireless Drivers
35 URL:=http://hostap.epitest.fi/
36 endef
37
38 define KernelPackage/hostap/Default/description
39 Host AP is a driver for 802.11b wireless cards based on Intersil
40 Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the
41 card to act as an IEEE 802.11 access point.
42 endef
43
44
45 define KernelPackage/hostap
46 $(call KernelPackage/hostap/Default)
47 TITLE:=Host AP support for Prism2/2.5/3
48 DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +!LINUX_2_6_29&&!LINUX_2_6_30:kmod-ieee80211 +LINUX_2_6_29||LINUX_2_6_30:kmod-lib80211 +wireless-tools
49 KCONFIG:=CONFIG_HOSTAP CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y
50 PROVIDES:=kmod-hostap
51 endef
52
53 define KernelPackage/hostap/2.4
54 # NOTE: needed to remove the dependency on kmod-ieee80211 in the final ipkg
55 DEPENDS:=
56 # NOTE: needed to build the standalone version on 2.4
57 KCONFIG:=
58 FILES:= \
59 $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
60 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
61 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
62 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
63 AUTOLOAD:=$(call AutoLoad,60,hostap hostap_crypt_wep hostap_crypt_tkip hostap_crypt_ccmp)
64 endef
65
66 define KernelPackage/hostap/2.6
67 FILES:= \
68 $(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
69 AUTOLOAD:=$(call AutoLoad,60,hostap)
70 endef
71
72 define KernelPackage/hostap/description
73 $(call KernelPackage/hostap/Default/description)
74 This package contains the base Host AP driver code that is shared by
75 different hardware models. You will also need to enable support for
76 PLX/PCI/CS version of the driver to actually use the driver.
77 endef
78
79
80 define KernelPackage/hostap-cs
81 $(call KernelPackage/hostap/Default)
82 TITLE:=Host AP driver for PCMCIA adaptors
83 DEPENDS:=@PCMCIA_SUPPORT kmod-hostap +kmod-pcmcia-core
84 KCONFIG:=CONFIG_HOSTAP_CS
85 AUTOLOAD:=$(call AutoLoad,60,hostap_cs)
86 endef
87 define KernelPackage/hostap-cs/2.4
88 # NOTE: needed to build the standalone version on 2.4
89 KCONFIG:=
90 FILES:= \
91 $(PKG_BUILD_DIR)/driver/modules/hostap_cs.$(LINUX_KMOD_SUFFIX)
92 endef
93 define KernelPackage/hostap-cs/2.6
94 FILES:= \
95 $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
96 endef
97
98 define KernelPackage/hostap-cs/description
99 $(call KernelPackage/hostap/Default/description)
100 This package contains the Host AP driver for Prism2/2.5/3 PC cards.
101 endef
102
103
104 define KernelPackage/hostap-pci
105 $(call KernelPackage/hostap/Default)
106 TITLE:=Host AP driver for PCI adaptors
107 DEPENDS:=@PCI_SUPPORT kmod-hostap
108 KCONFIG:=CONFIG_HOSTAP_PCI
109 AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
110 endef
111
112 define KernelPackage/hostap-pci/2.4
113 # NOTE: needed to build the standalone version on 2.4
114 KCONFIG:=
115 FILES:= \
116 $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
117 endef
118
119 define KernelPackage/hostap-pci/2.6
120 FILES:= \
121 $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
122 endef
123
124 define KernelPackage/hostap-pci/description
125 $(call KernelPackage/hostap/Default/description)
126 This package contains the Host AP driver for Prism2.5 PCI adaptors.
127 endef
128
129
130 define KernelPackage/hostap-plx
131 $(call KernelPackage/hostap/Default)
132 TITLE:=Host AP driver for PLX9052 based PCI adaptors
133 DEPENDS:=@PCI_SUPPORT kmod-hostap
134 KCONFIG:=CONFIG_HOSTAP_PLX
135 AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
136 endef
137
138 define KernelPackage/hostap-plx/2.4
139 # NOTE: needed to build the standalone version on 2.4
140 KCONFIG:=
141 FILES:= \
142 $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
143 endef
144
145 define KernelPackage/hostap-plx/2.6
146 FILES:= \
147 $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
148 endef
149
150 define KernelPackage/hostap-plx/description
151 $(call KernelPackage/hostap/Default/description)
152 This package contains the Host AP driver for Prism2/2.5/3 in PLX9052
153 based PCI adaptors.
154 endef
155
156
157 ifeq ($(KERNEL),2.4)
158 define Build/Compile
159 $(MAKE) -C $(LINUX_DIR)/ \
160 ARCH="$(LINUX_KARCH)" \
161 CROSS_COMPILE="$(TARGET_CROSS)" \
162 SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
163 modules
164 endef
165 else
166 define Build/Prepare
167 mkdir -p $(PKG_BUILD_DIR)
168 endef
169
170 define Build/Configure
171 endef
172
173 define Build/Compile
174 endef
175 endif
176
177 define KernelPackage/hostap/install
178 $(INSTALL_DIR) $(1)/lib/wifi
179 $(INSTALL_DATA) ./files/lib/wifi/hostap.sh $(1)/lib/wifi
180 endef
181
182 $(eval $(call KernelPackage,hostap))
183 $(eval $(call KernelPackage,hostap-cs))
184 $(eval $(call KernelPackage,hostap-pci))
185 $(eval $(call KernelPackage,hostap-plx))