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