From a960fcef292c805b1d7a8fe8a9f6995ca7f4931b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 10 Jan 2016 16:37:01 +0000 Subject: [PATCH] mac80211: move b43legacy firmware to a separate package Signed-off-by: Felix Fietkau SVN-Revision: 48184 --- package/firmware/b43legacy-firmware/Makefile | 72 ++++++++++++++++++++ package/kernel/mac80211/Makefile | 53 +------------- tools/Makefile | 2 +- 3 files changed, 74 insertions(+), 53 deletions(-) create mode 100644 package/firmware/b43legacy-firmware/Makefile diff --git a/package/firmware/b43legacy-firmware/Makefile b/package/firmware/b43legacy-firmware/Makefile new file mode 100644 index 000000000000..ec13c7d23df5 --- /dev/null +++ b/package/firmware/b43legacy-firmware/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=b43legacy-firmware +PKG_VERSION:=3.130.20.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3 + +include $(INCLUDE_DIR)/package.mk + +define Package/b43legacy-firmware + SECTION:=firmware + CATEGORY:=Firmware + URL:=$(PKG_SOURCE_URL) + TITLE:=Broadcom bcm43xx b43legacy firmware +endef + +define Package/b43legacy-firmware/config + if PACKAGE_b43legacy-firmware + + config B43LEGACY_FW_SQUASH + bool "Remove unnecessary firmware files" + default y + help + This options allows you to remove unnecessary b43legacy firmware files + from the final rootfs image. This can reduce the rootfs size by + up to 50k. + + If unsure, say Y. + + config B43LEGACY_FW_SQUASH_COREREVS + string "Core revisions to include" + depends on B43LEGACY_FW_SQUASH + default "1,2,3,4" + help + This is a comma seperated list of core revision numbers. + + Example (keep files for rev4 only): + 4 + + Example (keep files for rev2 and rev4): + 2,4 + + endif +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile + +endef + +define Package/b43legacy-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware + b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_SOURCE) + ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),) + b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy" + endif +endef + +$(eval $(call BuildPackage,b43legacy-firmware)) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index c0a3b3b24077..e096f7555fb1 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -313,12 +313,6 @@ ifneq ($(CONFIG_B43_OPENFIRMWARE),) endif -PKG_B43_FWV3_NAME:=wl_apsta -PKG_B43_FWV3_VERSION:=3.130.20.0 -PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o -PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/ -PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3 - define Download/b43 FILE:=$(PKG_B43_FWV4_SOURCE) URL:=$(PKG_B43_FWV4_SOURCE_URL) @@ -326,14 +320,6 @@ define Download/b43 endef $(eval $(call Download,b43)) -define Download/b43legacy - FILE:=$(PKG_B43_FWV3_SOURCE) - URL:=$(PKG_B43_FWV3_SOURCE_URL) - MD5SUM:=$(PKG_B43_FWV3_MD5SUM) -endef -$(eval $(call Download,b43legacy)) - - define KernelPackage/b43 $(call KernelPackage/mac80211/Default) TITLE:=Broadcom 43xx wireless support @@ -584,41 +570,12 @@ define KernelPackage/b43legacy URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43 KCONFIG:= \ CONFIG_HW_RANDOM=y - DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb + DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb +b43legacy-firmware FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43legacy/b43legacy.ko AUTOLOAD:=$(call AutoProbe,b43legacy) MENU:=1 endef -define KernelPackage/b43legacy/config - if PACKAGE_kmod-b43legacy - - config B43LEGACY_FW_SQUASH - bool "Remove unnecessary firmware files" - default y - help - This options allows you to remove unnecessary b43legacy firmware files - from the final rootfs image. This can reduce the rootfs size by - up to 50k. - - If unsure, say Y. - - config B43LEGACY_FW_SQUASH_COREREVS - string "Core revisions to include" - depends on B43LEGACY_FW_SQUASH - default "1,2,3,4" - help - This is a comma seperated list of core revision numbers. - - Example (keep files for rev4 only): - 4 - - Example (keep files for rev2 and rev4): - 2,4 - - endif -endef - define KernelPackage/b43legacy/description Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new endef @@ -1746,14 +1703,6 @@ ifneq ($(CONFIG_B43_FW_SQUASH),) endif endef -define KernelPackage/b43legacy/install - $(INSTALL_DIR) $(1)/lib/firmware/ - b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE) -ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),) - b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy" -endif -endef - define KernelPackage/brcmsmac/install $(INSTALL_DIR) $(1)/lib/firmware/brcm ifeq ($(CONFIG_BRCMSMAC_USE_FW_FROM_WL),y) diff --git a/tools/Makefile b/tools/Makefile index 346f0e9f3894..13f755ade22b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -23,7 +23,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) endif endif endif -ifneq ($(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_kmod-b43legacy)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) +ifneq ($(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmware)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) BUILD_B43_TOOLS = y endif -- 2.30.2