2010-06-15 11:40:05 +00:00
|
|
|
#
|
2014-10-25 18:43:18 +00:00
|
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
2010-06-15 11:40:05 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=broadcom-wl
|
2010-07-13 16:55:57 +00:00
|
|
|
PKG_VERSION:=5.10.56.27.3
|
2020-08-12 09:17:22 +00:00
|
|
|
PKG_RELEASE:=10
|
2010-06-15 11:40:05 +00:00
|
|
|
|
2010-07-01 01:31:28 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2
|
2021-01-30 20:54:44 +00:00
|
|
|
PKG_SOURCE_URL:=@OPENWRT
|
2010-07-01 01:31:28 +00:00
|
|
|
|
2016-12-16 16:32:10 +00:00
|
|
|
ifeq ($(ARCH),mipsel)
|
|
|
|
PKG_HASH:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),mips)
|
|
|
|
PKG_HASH:=ca6a86ca3e3e9c85b6dbb665b35bcbf338c37829c1b2f1994487d55664886045
|
|
|
|
endif
|
2010-06-15 11:40:05 +00:00
|
|
|
|
2017-07-21 13:46:35 +00:00
|
|
|
PKG_EXTMOD_SUBDIRS:=driver driver-mini glue
|
|
|
|
|
2014-07-07 08:29:35 +00:00
|
|
|
PKG_USE_MIPS16:=0
|
2016-04-26 21:09:12 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
2014-07-07 08:29:35 +00:00
|
|
|
|
2010-06-15 11:40:05 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/broadcom-wl/Default
|
|
|
|
SECTION:=kernel
|
|
|
|
CATEGORY:=Kernel modules
|
2019-06-15 12:57:14 +00:00
|
|
|
DEPENDS:=@(PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini)
|
2010-06-15 11:40:05 +00:00
|
|
|
SUBMENU:=Proprietary BCM43xx WiFi driver
|
2020-02-08 19:33:30 +00:00
|
|
|
SUBMENUDEP:=(TARGET_bcm47xx||TARGET_bcm63xx)
|
2010-06-15 11:40:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl/Default
|
|
|
|
$(call Package/broadcom-wl/Default)
|
|
|
|
SECTION:=kernel
|
2020-02-08 19:33:30 +00:00
|
|
|
DEPENDS:=@(TARGET_bcm47xx||TARGET_bcm63xx) +wireless-tools
|
2010-06-15 11:40:05 +00:00
|
|
|
TITLE:=Kernel driver for BCM43xx chipsets
|
2011-07-24 14:10:39 +00:00
|
|
|
FILES:=$(PKG_BUILD_DIR)/driver$(1)/wl.ko $(PKG_BUILD_DIR)/glue/wl_glue.ko
|
2017-08-27 18:01:51 +00:00
|
|
|
AUTOLOAD:=$(call AutoProbe,wl)
|
2010-06-15 11:40:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl/Default/description
|
|
|
|
This package contains the proprietary wireless driver for the Broadcom
|
|
|
|
BCM43xx chipset.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl
|
|
|
|
$(call KernelPackage/brcm-wl/Default,)
|
|
|
|
TITLE+= (normal version)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl/description
|
|
|
|
$(call KernelPackage/brcm-wl/Default/description)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl-mini
|
|
|
|
$(call KernelPackage/brcm-wl/Default,-mini)
|
|
|
|
TITLE+= (Legacy version)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/brcm-wl-mini/description
|
|
|
|
$(call KernelPackage/brcm-wl/Default/description)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wlc
|
|
|
|
$(call Package/broadcom-wl/Default)
|
|
|
|
TITLE:=wl driver setup utility
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wlc/description
|
|
|
|
This package contains an utility for initializing the proprietary Broadcom
|
|
|
|
wl driver.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wl
|
|
|
|
$(call Package/broadcom-wl/Default)
|
|
|
|
TITLE:=Proprietary Broadcom wl driver config utility
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wl/description
|
|
|
|
This package contains the proprietary utility (wl) for configuring the
|
|
|
|
proprietary Broadcom wl driver.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/nas
|
|
|
|
$(call Package/broadcom-wl/Default)
|
|
|
|
TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/nas/description
|
|
|
|
This package contains the proprietary WPA/WPA2 authenticator (nas) for the
|
|
|
|
proprietary Broadcom wl driver.
|
|
|
|
endef
|
|
|
|
|
|
|
|
MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
|
2017-10-13 09:10:03 +00:00
|
|
|
$(KERNEL_MAKE_FLAGS) \
|
2010-06-15 11:40:05 +00:00
|
|
|
PATH="$(TARGET_PATH)" \
|
2020-01-20 14:42:00 +00:00
|
|
|
M="$(PKG_BUILD_DIR)/kmod" \
|
2010-06-15 11:40:05 +00:00
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
$(call Build/Prepare/Default)
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/driver $(PKG_BUILD_DIR)/driver-mini
|
2011-07-24 14:10:39 +00:00
|
|
|
$(CP) ./src/glue $(PKG_BUILD_DIR)/glue
|
2010-06-15 11:40:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2017-07-21 14:23:06 +00:00
|
|
|
# Compile glue driver
|
|
|
|
$(MAKE_KMOD) -C "$(LINUX_DIR)" \
|
2020-01-20 14:42:00 +00:00
|
|
|
M="$(PKG_BUILD_DIR)/glue" \
|
2017-07-21 14:23:06 +00:00
|
|
|
modules
|
|
|
|
|
2010-06-15 11:40:05 +00:00
|
|
|
# Compile the kernel part
|
|
|
|
$(MAKE_KMOD) \
|
2020-01-20 14:42:00 +00:00
|
|
|
M="$(PKG_BUILD_DIR)/driver" \
|
2010-06-15 11:40:05 +00:00
|
|
|
MODFLAGS="-DMODULE -mlong-calls" \
|
2017-07-21 14:23:06 +00:00
|
|
|
KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \
|
2010-06-15 11:40:05 +00:00
|
|
|
modules
|
|
|
|
|
|
|
|
$(MAKE_KMOD) \
|
2020-01-20 14:42:00 +00:00
|
|
|
M="$(PKG_BUILD_DIR)/driver-mini" \
|
2010-06-15 11:40:05 +00:00
|
|
|
MODFLAGS="-DMODULE -mlong-calls" \
|
|
|
|
BUILD_TYPE="wl_apsta_mini" \
|
2017-07-21 14:23:06 +00:00
|
|
|
KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \
|
2010-06-15 11:40:05 +00:00
|
|
|
modules
|
|
|
|
|
|
|
|
# Compile libshared
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/shared \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \
|
|
|
|
all
|
|
|
|
|
|
|
|
$(TARGET_CC) -o $(PKG_BUILD_DIR)/wlc \
|
|
|
|
-I$(PKG_BUILD_DIR)/shared -I$(PKG_BUILD_DIR)/driver/include \
|
|
|
|
./src/wlc.c $(PKG_BUILD_DIR)/shared/libshared.a
|
|
|
|
|
|
|
|
$(TARGET_CC) -o $(PKG_BUILD_DIR)/nas \
|
|
|
|
$(PKG_BUILD_DIR)/nas_exe.o \
|
|
|
|
$(PKG_BUILD_DIR)/shared/libshared.a
|
|
|
|
|
2010-07-01 01:06:32 +00:00
|
|
|
$(TARGET_CC) -o $(PKG_BUILD_DIR)/wl \
|
|
|
|
$(PKG_BUILD_DIR)/wl_exe.o \
|
|
|
|
$(PKG_BUILD_DIR)/shared/libshared.a
|
2010-06-15 11:40:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/shared/libshared.a $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wlc/install
|
|
|
|
$(CP) ./files/* $(1)/
|
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc $(1)/sbin/
|
|
|
|
endef
|
|
|
|
|
2010-07-01 01:06:32 +00:00
|
|
|
define Package/wlc/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/wlunbind enable || true
|
|
|
|
endef
|
|
|
|
|
2010-06-15 11:40:05 +00:00
|
|
|
define Package/wl/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/nas/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
|
2014-11-06 19:35:34 +00:00
|
|
|
$(LN) nas $(1)/usr/sbin/nas4not
|
|
|
|
$(LN) nas $(1)/usr/sbin/nas4wds
|
2010-06-15 11:40:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call KernelPackage,brcm-wl))
|
|
|
|
$(eval $(call KernelPackage,brcm-wl-mini))
|
|
|
|
$(eval $(call BuildPackage,wlc))
|
|
|
|
$(eval $(call BuildPackage,wl))
|
|
|
|
$(eval $(call BuildPackage,nas))
|