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

login
register
mail settings
Submitter John Weber
Date July 15, 2014, 8:01 p.m.
Message ID <1405454473-16252-3-git-send-email-rjohnweber@gmail.com>
Download mbox | patch
Permalink /patch/75709/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

John Weber - July 15, 2014, 8:01 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.

Signed-off-by: John Weber <rjohnweber@gmail.com>
---
 .../linux-firmware/linux-firmware_git.bbappend     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 recipes-kernel/linux-firmware/linux-firmware_git.bbappend
Eric Nelson - July 15, 2014, 8:50 p.m.
Hi John,

On 07/15/2014 01:01 PM, John Weber wrote:
> 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.
> 
> Signed-off-by: John Weber <rjohnweber@gmail.com>
> ---
>  .../linux-firmware/linux-firmware_git.bbappend     | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 recipes-kernel/linux-firmware/linux-firmware_git.bbappend
> 
> 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..84b5fab
> --- /dev/null
> +++ b/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
> @@ -0,0 +1,32 @@
> +BRCM_FWDIR = "/lib/firmware/brcm"
> +
> +do_install_append () {
> +	# rename downloaded files so that we can create alternative
> +	# links
> +
> +	cd ${D}${BRCM_FWDIR}
> +
> +	mv brcmfmac4329-sdio.bin brcmfmac4329-sta-sdio.bin
> +	mv brcmfmac4330-sdio.bin brcmfmac4330-sta-sdio.bin
> +

Nice!

It looks like you figured out a way to make this backward compatible
so that you're not waiting on me!

> +	# 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"
> +
> 

Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
John Weber - July 15, 2014, 8:53 p.m.
Actually, Eric, the change for the broadcom-nvram-config does require your
attention because of the need to rename nvram.txt to brcmfmac4330-sdio.txt.


On Tue, Jul 15, 2014 at 3:50 PM, Eric Nelson <
eric.nelson@boundarydevices.com> wrote:

> Hi John,
>
> On 07/15/2014 01:01 PM, John Weber wrote:
> > 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.
> >
> > Signed-off-by: John Weber <rjohnweber@gmail.com>
> > ---
> >  .../linux-firmware/linux-firmware_git.bbappend     | 32
> ++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644
> recipes-kernel/linux-firmware/linux-firmware_git.bbappend
> >
> > 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..84b5fab
> > --- /dev/null
> > +++ b/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
> > @@ -0,0 +1,32 @@
> > +BRCM_FWDIR = "/lib/firmware/brcm"
> > +
> > +do_install_append () {
> > +     # rename downloaded files so that we can create alternative
> > +     # links
> > +
> > +     cd ${D}${BRCM_FWDIR}
> > +
> > +     mv brcmfmac4329-sdio.bin brcmfmac4329-sta-sdio.bin
> > +     mv brcmfmac4330-sdio.bin brcmfmac4330-sta-sdio.bin
> > +
>
> Nice!
>
> It looks like you figured out a way to make this backward compatible
> so that you're not waiting on me!
>
> > +     # 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"
> > +
> >
>
> Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
>
Eric Nelson - July 15, 2014, 9:30 p.m.
On 07/15/2014 01:53 PM, John Weber wrote:
> Actually, Eric, the change for the broadcom-nvram-config does require
> your attention because of the need to rename nvram.txt to
> brcmfmac4330-sdio.txt.
> 

Okay. It's likely to take me until the end of the week to
test things out.

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..84b5fab
--- /dev/null
+++ b/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
@@ -0,0 +1,32 @@ 
+BRCM_FWDIR = "/lib/firmware/brcm"
+
+do_install_append () {
+	# rename downloaded files so that we can create alternative
+	# links
+
+	cd ${D}${BRCM_FWDIR}
+
+	mv brcmfmac4329-sdio.bin brcmfmac4329-sta-sdio.bin
+	mv brcmfmac4330-sdio.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"
+