linux-firmware: broadcom: use symlink to provide NVRAM for some RPis
authorKuan-Yi Li <kyli@abysm.org>
Thu, 20 Oct 2022 02:26:44 +0000 (10:26 +0800)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 15 Nov 2022 19:48:20 +0000 (20:48 +0100)
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@abysm.org>
package/firmware/linux-firmware/Makefile
package/firmware/linux-firmware/broadcom.mk

index 6c5ff542a14e6cb83b4a1047674645428efe49d6..2c4d361012d4b778fe937bd79c1c08cd8bcdd109 100644 (file)
@@ -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
index 26f6534632344881bb590d51c595e2d9a248576e..b48677a378cf30d4cfd220e52383340d244f078e 100644 (file)
@@ -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