Patchwork [meta-fsl-arm-extra,daisy,3/4] linux-firmware: add bbappend to modify firmware file names

login
register
mail settings
Submitter John Weber
Date Aug. 5, 2014, 3:56 p.m.
Message ID <1407254171-8412-3-git-send-email-rjohnweber@gmail.com>
Download mbox | patch
Permalink /patch/77321/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

John Weber - Aug. 5, 2014, 3:56 p.m.
Upstream changes to the brcmfmac driver require a change to the firmware
file names to match the devid and interface type of the Broadcom chipset.
This also makes it easier for one machine to support multiple chipets in
Yocto.

This patch has been changed to adapt to the linux-firmware version
used in Daisy branch which is based on an older version of linux-firmware
repository.

Signed-off-by: John Weber <rjohnweber@gmail.com>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../linux-firmware/linux-firmware_git.bbappend     | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 recipes-kernel/linux-firmware/linux-firmware_git.bbappend

Patch

diff --git a/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
new file mode 100644
index 0000000..7e8a881
--- /dev/null
+++ b/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
@@ -0,0 +1,31 @@ 
+BRCM_FWDIR = "/lib/firmware/brcm"
+
+do_install_append () {
+	# rename downloaded files so that we can create alternative
+	# links
+
+	cd ${D}${BRCM_FWDIR}
+
+	mv brcmfmac4329.bin brcmfmac4329-sta-sdio.bin
+	mv brcmfmac4330.bin brcmfmac4330-sta-sdio.bin
+
+	# Create original file links, so that the base recipe sees the installed files
+	ln -sf brcmfmac4329-sta-sdio.bin brcmfmac4329-sdio.bin
+	ln -sf brcmfmac4330-sta-sdio.bin brcmfmac4330-sdio.bin
+}
+
+FILES_${PN}-bcm4329 += " \
+  ${BRCM_FWDIR}/brcmfmac4329-sta-sdio.bin \
+"
+
+FILES_${PN}-bcm4330 += " \
+  ${BRCM_FWDIR}/brcmfmac4330-sta-sdio.bin \
+"
+
+ALTERNATIVE_linux-firmware-bcm4329 += " brcmfmac4329-sdio.bin"
+ALTERNATIVE_LINK_NAME[brcmfmac4329-sdio.bin] = "${BRCM_FWDIR}/brcmfmac4329-sdio.bin"
+ALTERNATIVE_TARGET_linux-firmware-bcm4329[brcmfmac4329-sdio.bin] = "${BRCM_FWDIR}/brcmfmac4329-sta-sdio.bin"
+
+ALTERNATIVE_linux-firmware-bcm4330 += " brcmfmac4330-sdio.bin"
+ALTERNATIVE_LINK_NAME[brcmfmac4330-sdio.bin] = "${BRCM_FWDIR}/brcmfmac4330-sdio.bin"
+ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac4330-sdio.bin] = "${BRCM_FWDIR}/brcmfmac4330-sta-sdio.bin"