mediatek: filogic: enable maxlinear PHY support, refresh config
[openwrt/openwrt.git] / package / firmware / b43legacy-firmware / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=b43legacy-firmware
11 PKG_VERSION:=3.130.20.0
12 PKG_RELEASE:=1
13
14 DL_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
15
16 PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o
17 PKG_SOURCE_URL:=@OPENWRT
18 PKG_HASH:=7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/b43legacy-firmware
23 SECTION:=firmware
24 CATEGORY:=Firmware
25 URL:=$(PKG_SOURCE_URL)
26 TITLE:=Broadcom bcm43xx b43legacy firmware
27 endef
28
29 define Package/b43legacy-firmware/config
30 if PACKAGE_b43legacy-firmware
31
32 config B43LEGACY_FW_SQUASH
33 bool "Remove unnecessary firmware files"
34 default y
35 help
36 This options allows you to remove unnecessary b43legacy firmware files
37 from the final rootfs image. This can reduce the rootfs size by
38 up to 50k.
39
40 If unsure, say Y.
41
42 config B43LEGACY_FW_SQUASH_COREREVS
43 string "Core revisions to include"
44 depends on B43LEGACY_FW_SQUASH
45 default "1,2,3,4"
46 help
47 This is a comma separated list of core revision numbers.
48
49 Example (keep files for rev4 only):
50 4
51
52 Example (keep files for rev2 and rev4):
53 2,4
54
55 endif
56 endef
57
58 define Build/Prepare
59 mkdir -p $(PKG_BUILD_DIR)
60 endef
61
62 define Build/Compile
63
64 endef
65
66 define Package/b43legacy-firmware/install
67 $(INSTALL_DIR) $(1)/lib/firmware
68 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_SOURCE)
69 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
70 b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
71 endif
72 endef
73
74 $(eval $(call BuildPackage,b43legacy-firmware))