2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_VERSION
:=4.80.53.0
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
19 PKG_MD5SUM
:=a7d8dde3ce474c361143b83e1d9890b1
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/broadcom-wl
/Default
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
31 define KernelPackage
/brcm-wl
/Default
32 $(call Package
/broadcom-wl
/Default
)
34 DEPENDS
:=@TARGET_brcm_2_4
+wireless-tools
35 TITLE
:=Kernel driver for BCM43xx chipsets
36 FILES
:=$(PKG_BUILD_DIR
)/driver
/wl
$(1).o
37 AUTOLOAD
:=$(call AutoLoad
,30,wl
$(1))
40 define KernelPackage
/brcm-wl
/Default
/description
41 This package contains the proprietary wireless driver for the Broadcom
45 define KernelPackage
/brcm-wl
46 $(call KernelPackage
/brcm-wl
/Default
,)
47 TITLE
+= (normal version
)
50 define KernelPackage
/brcm-wl
/description
51 $(call KernelPackage
/brcm-wl
/Default
/description
)
54 define KernelPackage
/brcm-wl-mimo
55 $(call KernelPackage
/brcm-wl
/Default
,_mimo
)
56 TITLE
+= (MIMO version
)
59 define KernelPackage
/brcm-wl-mimo
/description
60 $(call KernelPackage
/brcm-wl
/Default
/description
)
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
69 define KernelPackage
/wlcompat
70 $(call KernelPackage
/wlcompat
/Default
,)
71 AUTOLOAD
:=$(call AutoLoad
,50,wlcompat
)
74 define KernelPackage
/wlcompat
/description
75 This package contains a wrapper module
, that provides Wireless Extension
76 support for the proprietary Broadcom wl module.
79 define KernelPackage
/wlcompat-debug
80 $(call KernelPackage
/wlcompat
/Default
,-debug
)
85 define KernelPackage
/wlcompat-debug
/description
86 $(call KernelPackage
/wlcompat
/description
)
87 This is the debugging version.
91 $(call Package
/broadcom-wl
/Default
)
92 TITLE
:=wl driver setup utility
95 define Package
/wlc
/description
96 This package contains an utility for initializing the proprietary Broadcom
100 define Package
/brcm-compat-ldso
101 TITLE
:=Broadcom wl
/nas binary compatibility libraries
102 DEPENDS
:=@TARGET_brcm_2_4
108 $(call Package
/broadcom-wl
/Default
)
109 TITLE
:=Proprietary Broadcom wl driver config utility
110 DEPENDS
+=+brcm-compat-ldso
113 define Package
/wl
/description
114 This package contains the proprietary utility
(wl
) for configuring the
115 proprietary Broadcom wl driver.
119 $(call Package
/broadcom-wl
/Default
)
121 DEPENDS
+= +brcm-compat-ldso
122 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
125 define Package
/nas
/description
126 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
127 proprietary Broadcom wl driver.
131 define install_template
132 $(INSTALL_DIR
) $(1)/lib
/modules
/$(LINUX_VERSION
)
133 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/driver
/wl
$(2).o.patch
$(1)/lib
/modules
/$(LINUX_VERSION
)/
136 define KernelPackage
/brcm-wl
/install
137 $(call install_template
,$(1),)
140 define KernelPackage
/brcm-wl_mimo
/install
141 $(call install_template
,$(1),_mimo
)
144 MAKE_KMOD
:= $(MAKE
) -C
"$(LINUX_DIR)" \
145 CROSS_COMPILE
="$(TARGET_CROSS)" \
146 ARCH
="$(LINUX_KARCH)" \
147 PATH
="$(TARGET_PATH)" \
148 SUBDIRS
="$(PKG_BUILD_DIR)/kmod"
151 $(call Build
/Prepare
/Default
)
152 mv
$(PKG_BUILD_DIR
)/kmod
$(PKG_BUILD_DIR
)/driver
153 $(CP
) src
/* $(PKG_BUILD_DIR
)/
157 # Compile the kernel part
159 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
162 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
166 SUBDIRS
="$(PKG_BUILD_DIR)/wlcompat" \
169 SUBDIRS
="$(PKG_BUILD_DIR)/wlcompat" \
174 $(MAKE
) -C
$(PKG_BUILD_DIR
)/wlc \
175 $(TARGET_CONFIGURE_OPTS
) \
176 CFLAGS
="$(TARGET_CFLAGS)" \
178 $(NO_TRACE_MAKE
) -C compat-ldso
-f build.mk PKG_INSTALL_DIR
="$(PKG_BUILD_DIR)" BUILD_DIR
="$(PKG_BUILD_DIR)"
179 $(SED
) 's,ld-uClibc.so.0,ld-uClibc.brcm,' \
180 $(PKG_BUILD_DIR
)/wl \
184 define Package
/brcm-compat-ldso
/install
185 $(INSTALL_DIR
) $(1)/lib
186 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ld-uClibc.brcm
$(1)/lib
/
189 define Package
/wlc
/install
190 $(CP
) .
/files
/* $(1)/
191 $(INSTALL_DIR
) $(1)/sbin
192 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
/wlc
$(1)/sbin
/
195 define Package
/wl
/install
196 $(INSTALL_DIR
) $(1)/usr
/sbin
197 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
200 define Package
/nas
/install
201 $(INSTALL_DIR
) $(1)/usr
/lib
202 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/libbcmcrypto.so
$(1)/usr
/lib
/
203 $(INSTALL_DIR
) $(1)/usr
/sbin
204 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
205 ln
-sf nas
$(1)/usr
/sbin
/nas4not
206 ln
-sf nas
$(1)/usr
/sbin
/nas4wds
209 $(eval
$(call KernelPackage
,brcm-wl
))
210 $(eval
$(call KernelPackage
,brcm-wl-mimo
))
211 $(eval
$(call BuildPackage
,brcm-compat-ldso
))
212 $(eval
$(call KernelPackage
,wlcompat
))
213 $(eval
$(call KernelPackage
,wlcompat-debug
))
214 $(eval
$(call BuildPackage
,wlc
))
215 $(eval
$(call BuildPackage
,wl
))
216 $(eval
$(call BuildPackage
,nas
))