linux-firmware: broadcom: consolidate NVRAM packages
authorKuan-Yi Li <kyli@abysm.org>
Mon, 14 Nov 2022 04:11:06 +0000 (12:11 +0800)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 16 Nov 2022 19:14:13 +0000 (20:14 +0100)
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@abysm.org>
package/firmware/cypress-nvram/Makefile
package/firmware/linux-firmware/Makefile
package/firmware/linux-firmware/broadcom.mk
target/linux/bcm27xx/image/Makefile

index b08f6ca63c80063570abc37ef35adbbaee193fa5..598abd4d9968164c9ee51d210ab60855d5573e44 100644 (file)
@@ -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@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
index 2656f9c01f5c2ed7a5a253ad4b7d86cf23819fa2..4a665ad7242dafb90a5125ca8de8fd001a6133fb 100644 (file)
@@ -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
index c0d315c19c49b24154555d06f8502c69440cfb72..48d986e2183b3d158db2f7c05a4bc16ea048ede6 100644 (file)
@@ -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
index e605a9a5c8e6c29c29bec6918583b1eb92cb62f9..1334386c574dd77ed4d942bf31256e7eb44762be 100644 (file)
@@ -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