[openwrt/openwrt] linux-firmware: broadcom: use symlink to provide NVRAM for some RPis

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 15 11:55:37 PST 2022


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

commit 60832584aa6fbc3e19250bf44b0dc9b8b0939b8d
Author: Kuan-Yi Li <kyli at abysm.org>
AuthorDate: Thu Oct 20 10:26:44 2022 +0800

    linux-firmware: broadcom: use symlink to provide NVRAM for some RPis
    
    This is to align the implementation with upstream `linux-firmware`.
    
    Some Raspberry Pi boards do not have dedicated NVRAM in `linux-firmware`
    source repository, their NVRAM is provided through a symbolic link to
    NVRAM of another board with an identical wireless design.
    
    Signed-off-by: Kuan-Yi Li <kyli at abysm.org>
---
 package/firmware/linux-firmware/Makefile    |  2 +-
 package/firmware/linux-firmware/broadcom.mk | 15 ++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile
index 6c5ff542a1..2c4d361012 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:=1
+PKG_RELEASE:=2
 
 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 26f6534632..b48677a378 100644
--- a/package/firmware/linux-firmware/broadcom.mk
+++ b/package/firmware/linux-firmware/broadcom.mk
@@ -43,11 +43,11 @@ define Package/brcmfmac-firmware-43430-sdio-rpi-3b/install
 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)
+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
-	$(INSTALL_DATA) \
-		$(PKG_BUILD_DIR)/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
+	$(LN) \
+		brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
 		$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
 endef
 $(eval $(call BuildPackage,brcmfmac-firmware-43430-sdio-rpi-zero-w))
@@ -79,6 +79,15 @@ define Package/brcmfmac-firmware-43455-sdio-rpi-4b/install
 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
+	$(LN) \
+		brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
+		$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
+endef
+$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-cm4))
+
 Package/brcmfmac-firmware-usb = $(call Package/firmware-default,Broadcom BCM43xx fullmac USB firmware)
 define Package/brcmfmac-firmware-usb/install
 	$(INSTALL_DIR) $(1)/lib/firmware/brcm




More information about the lede-commits mailing list