Allow specifying static IPv6 gateways (#2710)
[openwrt.git] / package / broadcom-wl / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=broadcom-wl
13 PKG_VERSION:=4.80.53.0
14 PKG_RELEASE:=1
15 WLC_VERSION:=0.1
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
19 PKG_MD5SUM:=a7d8dde3ce474c361143b83e1d9890b1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/broadcom-wl/Default
24 SECTION:=kernel
25 CATEGORY:=Kernel modules
26 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
27 SUBMENU:=Proprietary BCM43xx WiFi driver
28 SUBMENUDEP:=@TARGET_brcm_2_4
29 endef
30
31 define KernelPackage/brcm-wl/Default
32 $(call Package/broadcom-wl/Default)
33 SECTION:=kernel
34 DEPENDS:=@TARGET_brcm_2_4
35 TITLE:=Kernel driver for BCM43xx chipsets
36 FILES:=$(PKG_BUILD_DIR)/driver/wl$(1).o
37 AUTOLOAD:=$(call AutoLoad,30,wl$(1))
38 endef
39
40 define KernelPackage/brcm-wl/Default/description
41 This package contains the proprietary wireless driver for the Broadcom
42 BCM43xx chipset.
43 endef
44
45 define KernelPackage/brcm-wl
46 $(call KernelPackage/brcm-wl/Default,)
47 TITLE+= (normal version)
48 endef
49
50 define KernelPackage/brcm-wl/description
51 $(call KernelPackage/brcm-wl/Default/description)
52 endef
53
54 define KernelPackage/brcm-wl-mimo
55 $(call KernelPackage/brcm-wl/Default,_mimo)
56 TITLE+= (MIMO version)
57 endef
58
59 define KernelPackage/brcm-wl-mimo/description
60 $(call KernelPackage/brcm-wl/Default/description)
61 endef
62
63 define KernelPackage/wlcompat/Default
64 $(call KernelPackage/brcm-wl/Default,)
65 TITLE:=Kernel driver for BCM43xx chipsets
66 FILES:=$(PKG_BUILD_DIR)/wlcompat/wlcompat$(1).o
67 endef
68
69 define KernelPackage/wlcompat
70 $(call KernelPackage/wlcompat/Default,)
71 AUTOLOAD:=$(call AutoLoad,50,wlcompat)
72 endef
73
74 define KernelPackage/wlcompat/description
75 This package contains a wrapper module, that provides Wireless Extension
76 support for the proprietary Broadcom wl module.
77 endef
78
79 define KernelPackage/wlcompat-debug
80 $(call KernelPackage/wlcompat/Default,-debug)
81 TITLE+= (debug)
82 AUTOLOAD:=
83 endef
84
85 define KernelPackage/wlcompat-debug/description
86 $(call KernelPackage/wlcompat/description)
87 This is the debugging version.
88 endef
89
90 define Package/wlc
91 $(call Package/broadcom-wl/Default)
92 TITLE:=wl driver setup utility
93 endef
94
95 define Package/wlc/description
96 This package contains an utility for initializing the proprietary Broadcom
97 wl driver.
98 endef
99
100 define Package/brcm-compat-ldso
101 TITLE:=Broadcom wl/nas binary compatibility libraries
102 SECTION:=libs
103 CATEGORY:=Libraries
104 endef
105
106 define Package/wl
107 $(call Package/broadcom-wl/Default)
108 TITLE:=Proprietary Broadcom wl driver config utility
109 DEPENDS+=+brcm-compat-ldso
110 endef
111
112 define Package/wl/description
113 This package contains the proprietary utility (wl) for configuring the
114 proprietary Broadcom wl driver.
115 endef
116
117 define Package/nas
118 $(call Package/broadcom-wl/Default)
119 DEPENDS+= +nvram +brcm-compat-ldso
120 TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
121 endef
122
123 define Package/nas/description
124 This package contains the proprietary WPA/WPA2 authenticator (nas) for the
125 proprietary Broadcom wl driver.
126 endef
127
128
129 define install_template
130 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
131 $(INSTALL_DATA) $(PKG_BUILD_DIR)/driver/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/
132 endef
133
134 define KernelPackage/brcm-wl/install
135 $(call install_template,$(1),)
136 endef
137
138 define KernelPackage/brcm-wl_mimo/install
139 $(call install_template,$(1),_mimo)
140 endef
141
142 MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
143 CROSS_COMPILE="$(TARGET_CROSS)" \
144 ARCH="$(LINUX_KARCH)" \
145 PATH="$(TARGET_PATH)" \
146 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
147
148 define Build/Prepare
149 $(call Build/Prepare/Default)
150 mv $(PKG_BUILD_DIR)/kmod $(PKG_BUILD_DIR)/driver
151 $(CP) src/* $(PKG_BUILD_DIR)/
152 endef
153
154 define Build/Compile
155 # Compile the kernel part
156 $(MAKE_KMOD) \
157 SUBDIRS="$(PKG_BUILD_DIR)/driver" \
158 modules
159 $(MAKE_KMOD) \
160 SUBDIRS="$(PKG_BUILD_DIR)/driver" \
161 MOD_NAME="_mimo" \
162 modules
163 $(MAKE_KMOD) \
164 SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
165 modules
166 $(MAKE_KMOD) \
167 SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
168 DEBUG=1 \
169 modules
170
171 # Compile wlc
172 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
173 $(TARGET_CONFIGURE_OPTS) \
174 CFLAGS="$(TARGET_CFLAGS)" \
175 all
176 # $(NO_TRACE_MAKE) -C compat-ldso -f build.mk PKG_INSTALL_DIR="$(PKG_BUILD_DIR)"
177 # $(SED) 's,ld-uClibc.so.0,ld-uClibc.brcm,' \
178 # $(PKG_BUILD_DIR)/wl \
179 # $(PKG_BUILD_DIR)/nas
180 endef
181
182 define Package/brcm-compat-ldso/install
183 $(INSTALL_DIR) $(1)/lib
184 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ld-uClibc.brcm $(1)/lib/
185 endef
186
187 define Package/wlc/install
188 $(CP) ./files/* $(1)/
189 $(INSTALL_DIR) $(1)/sbin
190 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
191 endef
192
193 define Package/wl/install
194 $(INSTALL_DIR) $(1)/usr/sbin
195 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
196 endef
197
198 define Package/nas/install
199 $(INSTALL_DIR) $(1)/usr/lib
200 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
201 $(INSTALL_DIR) $(1)/usr/sbin
202 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
203 ln -sf nas $(1)/usr/sbin/nas4not
204 ln -sf nas $(1)/usr/sbin/nas4wds
205 endef
206
207 $(eval $(call KernelPackage,brcm-wl))
208 $(eval $(call KernelPackage,brcm-wl-mimo))
209 #$(eval $(call BuildPackage,brcm-compat-ldso))
210 $(eval $(call KernelPackage,wlcompat))
211 $(eval $(call KernelPackage,wlcompat-debug))
212 $(eval $(call BuildPackage,wlc))
213 $(eval $(call BuildPackage,wl))
214 $(eval $(call BuildPackage,nas))
This page took 0.053326 seconds and 5 git commands to generate.