[openwrt/openwrt] linux-firmware: broadcom: consolidate NVRAM packages

LEDE Commits lede-commits at lists.infradead.org
Wed Nov 16 11:15:30 PST 2022


noltari pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c6e86d8095e45cb6ad084a2f447594263b0eddfe

commit c6e86d8095e45cb6ad084a2f447594263b0eddfe
Author: Kuan-Yi Li <kyli at abysm.org>
AuthorDate: Mon Nov 14 12:11:06 2022 +0800

    linux-firmware: broadcom: consolidate NVRAM packages
    
    NVRAM packages for the same wireless chip are consolidated into one as
    they contain only small text files and symlinks.
    
    Signed-off-by: Kuan-Yi Li <kyli at abysm.org>
---
 package/firmware/cypress-nvram/Makefile     |   6 +-
 package/firmware/linux-firmware/Makefile    |   2 +-
 package/firmware/linux-firmware/broadcom.mk | 102 ++++++++++++++++++++--------
 target/linux/bcm27xx/image/Makefile         |  15 ++--
 4 files changed, 85 insertions(+), 40 deletions(-)

diff --git a/package/firmware/cypress-nvram/Makefile b/package/firmware/cypress-nvram/Makefile
index b08f6ca63c..598abd4d99 100644
--- a/package/firmware/cypress-nvram/Makefile
+++ b/package/firmware/cypress-nvram/Makefile
@@ -3,7 +3,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cypress-nvram
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari at gmail.com>
 
@@ -22,7 +22,7 @@ endef
 define Package/cypress-nvram-4339-sdio-ap6335
   $(Package/cypress-nvram-default)
   TITLE:=BCM4339 NVRAM for AP6335
-  CONFLICTS:=brcmfmac-firmware-4339-sdio-ap6335
+  CONFLICTS:=brcmfmac-nvram-4339-sdio
 endef
 
 define Package/cypress-nvram-4339-sdio-ap6335/install
@@ -39,7 +39,7 @@ define Package/cypress-nvram-4339-sdio-pico-pi-imx7d
   $(Package/cypress-nvram-default)
   TITLE:=BCM4339 NVRAM for TechNexion PICO-PI-IMX7D
   DEPENDS:=+cypress-nvram-4339-sdio-ap6335
-  CONFLICTS:=brcmfmac-firmware-4339-sdio-pico-pi-imx7d
+  CONFLICTS:=brcmfmac-nvram-4339-sdio
 endef
 
 define Package/cypress-nvram-4339-sdio-pico-pi-imx7d/install
diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile
index 2656f9c01f..4a665ad724 100644
--- a/package/firmware/linux-firmware/Makefile
+++ b/package/firmware/linux-firmware/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
 PKG_VERSION:=20221109
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/package/firmware/linux-firmware/broadcom.mk b/package/firmware/linux-firmware/broadcom.mk
index c0d315c19c..48d986e218 100644
--- a/package/firmware/linux-firmware/broadcom.mk
+++ b/package/firmware/linux-firmware/broadcom.mk
@@ -47,23 +47,53 @@ define Package/brcmfmac-firmware-4329-sdio/install
 endef
 $(eval $(call BuildPackage,brcmfmac-firmware-4329-sdio))
 
-Package/brcmfmac-firmware-43430-sdio-rpi-3b = $(call Package/firmware-default,Broadcom BCM43430 NVRAM for Raspberry Pi 3B)
-define Package/brcmfmac-firmware-43430-sdio-rpi-3b/install
+Package/brcmfmac-nvram-43430-sdio = $(call Package/firmware-default,Broadcom BCM43430 SDIO NVRAM)
+define Package/brcmfmac-nvram-43430-sdio/install
 	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bpi-m2-plus.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bpi-m2-ultra.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bpi-m3.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-r1.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.starfive,visionfive-v1.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.beagle,beaglev-starlight-jh7100-a1.txt
+	$(LN) \
+		brcmfmac43430-sdio.AP6212.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.beagle,beaglev-starlight-jh7100-r0.txt
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt \
+		$(1)/lib/firmware/brcm/
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43430-sdio.MUR1DX.txt \
+		$(1)/lib/firmware/brcm/
 	$(INSTALL_DATA) \
 		$(PKG_BUILD_DIR)/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
-		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
-endef
-$(eval $(call BuildPackage,brcmfmac-firmware-43430-sdio-rpi-3b))
-
-Package/brcmfmac-firmware-43430-sdio-rpi-zero-w = $(call Package/firmware-default,Broadcom BCM43430 NVRAM for Raspberry Pi Zero W,+brcmfmac-firmware-43430-sdio-rpi-3b)
-define Package/brcmfmac-firmware-43430-sdio-rpi-zero-w/install
-	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+		$(1)/lib/firmware/brcm/
 	$(LN) \
 		brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
 		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
+	$(LN) \
+		brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-2-w.txt
 endef
-$(eval $(call BuildPackage,brcmfmac-firmware-43430-sdio-rpi-zero-w))
+$(eval $(call BuildPackage,brcmfmac-nvram-43430-sdio))
 
 Package/brcmfmac-firmware-43430a0-sdio = $(call Package/firmware-default,Broadcom BCM43430a0 FullMac SDIO firmware)
 define Package/brcmfmac-firmware-43430a0-sdio/install
@@ -74,32 +104,50 @@ define Package/brcmfmac-firmware-43430a0-sdio/install
 endef
 $(eval $(call BuildPackage,brcmfmac-firmware-43430a0-sdio))
 
-Package/brcmfmac-firmware-43455-sdio-rpi-3b-plus = $(call Package/firmware-default,Broadcom BCM43455 NVRAM for Raspberry Pi 3B+)
-define Package/brcmfmac-firmware-43455-sdio-rpi-3b-plus/install
+Package/brcmfmac-nvram-43455-sdio = $(call Package/firmware-default,Broadcom BCM43455 SDIO NVRAM)
+define Package/brcmfmac-nvram-43455-sdio/install
 	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.acepc-t8.txt \
+		$(1)/lib/firmware/brcm/
 	$(INSTALL_DATA) \
 		$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt \
-		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
-endef
-$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-3b-plus))
-
-Package/brcmfmac-firmware-43455-sdio-rpi-4b = $(call Package/firmware-default,Broadcom BCM43455 NVRAM for Raspberry Pi 4B)
-define Package/brcmfmac-firmware-43455-sdio-rpi-4b/install
-	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+		$(1)/lib/firmware/brcm/
+	$(LN) \
+		brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
 	$(INSTALL_DATA) \
 		$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
-		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
-endef
-$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-4b))
-
-Package/brcmfmac-firmware-43455-sdio-rpi-cm4 = $(call Package/firmware-default,Broadcom BCM43455 NVRAM for Raspberry Pi CM4,+brcmfmac-firmware-43455-sdio-rpi-4b)
-define Package/brcmfmac-firmware-43455-sdio-rpi-cm4/install
-	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+		$(1)/lib/firmware/brcm/
 	$(LN) \
 		brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
 		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
+	$(LN) \
+		brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.Raspberry\ Pi\ Foundation-Raspberry\ Pi\ 4\ Model\ B.txt
+	$(LN) \
+		brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.Raspberry\ Pi\ Foundation-Raspberry\ Pi\ Compute\ Module\ 4.txt
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.MINIX-NEO\ Z83-4.txt \
+		$(1)/lib/firmware/brcm/
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.AW-CM256SM.txt \
+		$(1)/lib/firmware/brcm/
+	$(LN) \
+		brcmfmac43455-sdio.AW-CM256SM.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.beagle,am5729-beagleboneai.txt
+	$(LN) \
+		brcmfmac43455-sdio.AW-CM256SM.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.pine64,pinebook-pro.txt
+	$(LN) \
+		brcmfmac43455-sdio.AW-CM256SM.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.pine64,pinephone-pro.txt
+	$(LN) \
+		brcmfmac43455-sdio.AW-CM256SM.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.pine64,quartz64-b.txt
 endef
-$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-cm4))
+$(eval $(call BuildPackage,brcmfmac-nvram-43455-sdio))
 
 Package/brcmfmac-firmware-usb = $(call Package/firmware-default,Broadcom BCM43xx fullmac USB firmware)
 define Package/brcmfmac-firmware-usb/install
diff --git a/target/linux/bcm27xx/image/Makefile b/target/linux/bcm27xx/image/Makefile
index e605a9a5c8..1334386c57 100644
--- a/target/linux/bcm27xx/image/Makefile
+++ b/target/linux/bcm27xx/image/Makefile
@@ -76,7 +76,7 @@ define Device/rpi
 	raspberrypi,model-zero raspberrypi,model-zero-w
   DEVICE_PACKAGES := \
 	cypress-firmware-43430-sdio \
-	brcmfmac-firmware-43430-sdio-rpi-zero-w \
+	brcmfmac-nvram-43430-sdio \
 	kmod-brcmfmac wpad-basic-wolfssl
 endef
 ifeq ($(SUBTARGET),bcm2708)
@@ -107,11 +107,9 @@ define Device/rpi-2
 	raspberrypi,model-zero-2
   DEVICE_PACKAGES := \
 	cypress-firmware-43430-sdio \
-	brcmfmac-firmware-43430-sdio-rpi-3b \
+	brcmfmac-nvram-43430-sdio \
 	cypress-firmware-43455-sdio \
-	brcmfmac-firmware-43455-sdio-rpi-3b-plus \
-	brcmfmac-firmware-43455-sdio-rpi-4b \
-	brcmfmac-firmware-43455-sdio-rpi-cm4 \
+	brcmfmac-nvram-43455-sdio \
 	kmod-brcmfmac wpad-basic-wolfssl
   IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip | append-metadata
   IMAGE/factory.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip
@@ -140,9 +138,9 @@ define Device/rpi-3
 	raspberrypi,model-zero-2
   DEVICE_PACKAGES := \
 	cypress-firmware-43430-sdio \
-	brcmfmac-firmware-43430-sdio-rpi-3b \
+	brcmfmac-nvram-43430-sdio \
 	cypress-firmware-43455-sdio \
-	brcmfmac-firmware-43455-sdio-rpi-3b-plus \
+	brcmfmac-nvram-43455-sdio \
 	kmod-brcmfmac wpad-basic-wolfssl
 endef
 ifeq ($(SUBTARGET),bcm2710)
@@ -163,8 +161,7 @@ define Device/rpi-4
 	raspberrypi,4-model-b
   DEVICE_PACKAGES := \
 	cypress-firmware-43455-sdio \
-	brcmfmac-firmware-43455-sdio-rpi-4b \
-	brcmfmac-firmware-43455-sdio-rpi-cm4 \
+	brcmfmac-nvram-43455-sdio \
 	kmod-brcmfmac wpad-basic-wolfssl \
 	kmod-usb-net-lan78xx
   IMAGE/sysupgrade.img.gz := boot-common | boot-2711 | sdcard-img | gzip | append-metadata




More information about the lede-commits mailing list