2 # Copyright (C) 2016 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
10 PKG_NAME:=b43legacy-firmware
11 PKG_VERSION:=3.130.20.0
14 PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o
15 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
16 PKG_HASH:=7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90
18 include $(INCLUDE_DIR)/package.mk
20 define Package/b43legacy-firmware
23 URL:=$(PKG_SOURCE_URL)
24 TITLE:=Broadcom bcm43xx b43legacy firmware
27 define Package/b43legacy-firmware/config
28 if PACKAGE_b43legacy-firmware
30 config B43LEGACY_FW_SQUASH
31 bool "Remove unnecessary firmware files"
34 This options allows you to remove unnecessary b43legacy firmware files
35 from the final rootfs image. This can reduce the rootfs size by
40 config B43LEGACY_FW_SQUASH_COREREVS
41 string "Core revisions to include"
42 depends on B43LEGACY_FW_SQUASH
45 This is a comma seperated list of core revision numbers.
47 Example (keep files for rev4 only):
50 Example (keep files for rev2 and rev4):
57 mkdir -p $(PKG_BUILD_DIR)
64 define Package/b43legacy-firmware/install
65 $(INSTALL_DIR) $(1)/lib/firmware
66 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_SOURCE)
67 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
68 b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
72 $(eval $(call BuildPackage,b43legacy-firmware))