2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_VERSION
:=5.10.56.27.3
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)_
$(ARCH
).
tar.bz2
16 PKG_SOURCE_URL
:=@OPENWRT
19 PKG_HASH
:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009
22 PKG_HASH
:=ca6a86ca3e3e9c85b6dbb665b35bcbf338c37829c1b2f1994487d55664886045
25 PKG_EXTMOD_SUBDIRS
:=driver driver-mini glue
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/broadcom-wl
/Default
34 CATEGORY
:=Kernel modules
35 DEPENDS
:=@
(PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini
)
36 SUBMENU
:=Proprietary BCM43xx WiFi driver
37 SUBMENUDEP
:=(TARGET_bcm47xx||TARGET_bcm63xx
)
40 define KernelPackage
/brcm-wl
/Default
41 $(call Package
/broadcom-wl
/Default
)
43 DEPENDS
:=@
(TARGET_bcm47xx||TARGET_bcm63xx
) +wireless-tools
44 TITLE
:=Kernel driver for BCM43xx chipsets
45 FILES
:=$(PKG_BUILD_DIR
)/driver
$(1)/wl.ko
$(PKG_BUILD_DIR
)/glue
/wl_glue.ko
46 AUTOLOAD
:=$(call AutoProbe
,wl
)
49 define KernelPackage
/brcm-wl
/Default
/description
50 This package contains the proprietary wireless driver for the Broadcom
54 define KernelPackage
/brcm-wl
55 $(call KernelPackage
/brcm-wl
/Default
,)
56 TITLE
+= (normal version
)
59 define KernelPackage
/brcm-wl
/description
60 $(call KernelPackage
/brcm-wl
/Default
/description
)
63 define KernelPackage
/brcm-wl-mini
64 $(call KernelPackage
/brcm-wl
/Default
,-mini
)
65 TITLE
+= (Legacy version
)
68 define KernelPackage
/brcm-wl-mini
/description
69 $(call KernelPackage
/brcm-wl
/Default
/description
)
73 $(call Package
/broadcom-wl
/Default
)
74 TITLE
:=wl driver setup utility
77 define Package
/wlc
/description
78 This package contains an utility for initializing the proprietary Broadcom
83 $(call Package
/broadcom-wl
/Default
)
84 TITLE
:=Proprietary Broadcom wl driver config utility
87 define Package
/wl
/description
88 This package contains the proprietary utility
(wl
) for configuring the
89 proprietary Broadcom wl driver.
93 $(call Package
/broadcom-wl
/Default
)
94 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
97 define Package
/nas
/description
98 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
99 proprietary Broadcom wl driver.
102 MAKE_KMOD
:= $(MAKE
) -C
"$(LINUX_DIR)" \
103 $(KERNEL_MAKE_FLAGS
) \
104 PATH
="$(TARGET_PATH)" \
105 M
="$(PKG_BUILD_DIR)/kmod" \
108 $(call Build
/Prepare
/Default
)
109 $(CP
) $(PKG_BUILD_DIR
)/driver
$(PKG_BUILD_DIR
)/driver-mini
110 $(CP
) .
/src
/glue
$(PKG_BUILD_DIR
)/glue
114 # Compile glue driver
115 $(MAKE_KMOD
) -C
"$(LINUX_DIR)" \
116 M
="$(PKG_BUILD_DIR)/glue" \
119 # Compile the kernel part
121 M
="$(PKG_BUILD_DIR)/driver" \
122 MODFLAGS
="-DMODULE -mlong-calls" \
123 KBUILD_EXTRA_SYMBOLS
="$(PKG_BUILD_DIR)/glue/Module.symvers" \
127 M
="$(PKG_BUILD_DIR)/driver-mini" \
128 MODFLAGS
="-DMODULE -mlong-calls" \
129 BUILD_TYPE
="wl_apsta_mini" \
130 KBUILD_EXTRA_SYMBOLS
="$(PKG_BUILD_DIR)/glue/Module.symvers" \
134 $(MAKE
) -C
$(PKG_BUILD_DIR
)/shared \
135 $(TARGET_CONFIGURE_OPTS
) \
136 CFLAGS
="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \
139 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wlc \
140 -I
$(PKG_BUILD_DIR
)/shared
-I
$(PKG_BUILD_DIR
)/driver
/include \
141 .
/src
/wlc.c
$(PKG_BUILD_DIR
)/shared
/libshared.a
143 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/nas \
144 $(PKG_BUILD_DIR
)/nas_exe.o \
145 $(PKG_BUILD_DIR
)/shared
/libshared.a
147 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wl \
148 $(PKG_BUILD_DIR
)/wl_exe.o \
149 $(PKG_BUILD_DIR
)/shared
/libshared.a
152 define Build
/InstallDev
153 $(INSTALL_DIR
) $(1)/usr
/lib
154 $(CP
) $(PKG_BUILD_DIR
)/shared
/libshared.a
$(1)/usr
/lib
/
157 define Package
/wlc
/install
158 $(CP
) .
/files
/* $(1)/
159 $(INSTALL_DIR
) $(1)/sbin
160 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
$(1)/sbin
/
163 define Package
/wlc
/postinst
165 [ -n
"$${IPKG_INSTROOT}" ] ||
/etc
/init.d
/wlunbind enable || true
168 define Package
/wl
/install
169 $(INSTALL_DIR
) $(1)/usr
/sbin
170 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
173 define Package
/nas
/install
174 $(INSTALL_DIR
) $(1)/usr
/sbin
175 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
176 $(LN
) nas
$(1)/usr
/sbin
/nas4not
177 $(LN
) nas
$(1)/usr
/sbin
/nas4wds
180 $(eval
$(call KernelPackage
,brcm-wl
))
181 $(eval
$(call KernelPackage
,brcm-wl-mini
))
182 $(eval
$(call BuildPackage
,wlc
))
183 $(eval
$(call BuildPackage
,wl
))
184 $(eval
$(call BuildPackage
,nas
))