linux-firmware: offer two versions of firmware for CYW4339

According to commit 6f6c2fb321, AP6335 module used in PICO-PI-IMX7D works
only with firmware from `linux-firmware`. However, firmware from
`cypress-firmware` suite is directly from the chip company (Infineon) and
is actually newer.

Instead of dropping the firmware from Infineon, create a package named
`brcmfmac-firmware-4339-sdio`, and keep the Infineon version of
`cypress-firmware-4339-sdio` around.

This gives us devs the option to choose. Also, it means that

 - packages `brcmfmac-firmware-*` uniformly come from `linux-firmware`
 - packages `cypress-firmware-*` uniformly come from `cypress-firmware`

so hopefully brings more clarity.

Tested-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
This commit is contained in:
Kuan-Yi Li 2022-10-20 11:31:19 +08:00 committed by Álvaro Fernández Rojas
parent 729cdff71d
commit a110418027
5 changed files with 37 additions and 11 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=cypress-firmware
PKG_VERSION:=5.4.18-2021_0812
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Infineon/ifx-linux-firmware/
@ -96,6 +96,27 @@ endef
$(eval $(call BuildPackage,cypress-firmware-43362-sdio))
# Cypress 4339 SDIO Firmware
define Package/cypress-firmware-4339-sdio
$(Package/cypress-firmware-default)
TITLE:=CYW4339 FullMac SDIO firmware
PROVIDES:=brcmfmac-firmware-4339-sdio
CONFLICTS:=brcmfmac-firmware-4339-sdio
endef
define Package/cypress-firmware-4339-sdio/install
$(INSTALL_DIR) $(1)/lib/firmware/cypress
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/firmware/cyfmac4339-sdio.bin \
$(1)/lib/firmware/cypress/
$(INSTALL_DIR) $(1)/lib/firmware/brcm
$(LN) \
../cypress/cyfmac4339-sdio.bin \
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
endef
$(eval $(call BuildPackage,cypress-firmware-4339-sdio))
# Cypress 43430 SDIO Firmware
define Package/cypress-firmware-43430-sdio
$(Package/cypress-firmware-default)

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=linux-firmware
PKG_VERSION:=20221109
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz

View File

@ -1,3 +1,16 @@
Package/brcmfmac-firmware-4339-sdio = $(call Package/firmware-default,Broadcom 4339 FullMAC SDIO firmware)
define Package/brcmfmac-firmware-4339-sdio/install
$(INSTALL_DIR) $(1)/lib/firmware/cypress
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/cypress/cyfmac4339-sdio.bin \
$(1)/lib/firmware/cypress/
$(INSTALL_DIR) $(1)/lib/firmware/brcm
$(LN) \
../cypress/cyfmac4339-sdio.bin \
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
endef
$(eval $(call BuildPackage,brcmfmac-firmware-4339-sdio))
Package/brcmfmac-firmware-43602a1-pcie = $(call Package/firmware-default,Broadcom 43602a1 FullMAC PCIe firmware)
define Package/brcmfmac-firmware-43602a1-pcie/install
$(INSTALL_DIR) $(1)/lib/firmware/brcm

View File

@ -1,8 +0,0 @@
Package/cypress-firmware-4339-sdio = $(call Package/firmware-default,Broadcom BCM4339 FullMac SDIO firmware)
define Package/cypress-firmware-4339-sdio/install
$(INSTALL_DIR) $(1)/lib/firmware/brcm
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/cypress/cyfmac4339-sdio.bin \
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
endef
$(eval $(call BuildPackage,cypress-firmware-4339-sdio))

View File

@ -21,7 +21,7 @@ define Device/technexion_imx7d-pico-pi
DEVICE_PACKAGES := kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
kmod-can kmod-can-flexcan kmod-can-raw kmod-leds-gpio \
kmod-input-touchscreen-edt-ft5x06 kmod-usb-hid kmod-btsdio \
kmod-brcmfmac cypress-firmware-4339-sdio cypress-nvram-4339-pico-pi-imx7d
kmod-brcmfmac brcmfmac-firmware-4339-sdio cypress-nvram-4339-pico-pi-imx7d
FILESYSTEMS := squashfs
IMAGES := combined.bin sysupgrade.bin
IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx-sdcard-raw-uboot