[meta-freescale] [meta-fsl-arm-extra][PATCH] linux-firmware: add support for bcm4329

John Weber rjohnweber at gmail.com
Sat Mar 16 17:40:13 PDT 2013


Otavio -

I assume you mean this rename?

+do_install_append() {
+	# Broadcom BCM4329 SDIO
+	cp -r ${D}/lib/firmware/brcm/brcmfmac4329.bin \
+              ${D}/lib/firmware/brcm/brcmfmac-sdio.bin
+	cp -r ${WORKDIR}/brcmfmac-sdio.txt \
+              ${D}/lib/firmware/brcm
+	cp -r ${D}/lib/firmware/LICENCE.broadcom_bcm43xx \
+              ${D}/lib/firmware/brcm
+}

If I do not rename them, then the default kernel module for brcmfmac will not 
find the firmware files because it expects them to be named as above.

 From the driver in the mainline kernel (and also the backported driver, so it 
hasn't changed):

drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c, line 317-320

#define BRCMF_SDIO_FW_NAME      "brcm/brcmfmac-sdio.bin"
#define BRCMF_SDIO_NV_NAME      "brcm/brcmfmac-sdio.txt"
MODULE_FIRMWARE(BRCMF_SDIO_FW_NAME);
MODULE_FIRMWARE(BRCMF_SDIO_NV_NAME);

I'll create a recipe to populate the nvram file separately from the kernel 
firmware.  I can also do the rename there - is that what you are suggesting?  If 
that is the case, then everyone that wants to use the brcmfmac driver will need 
to create their own recipe to do the copy (or a patch to the kernel to rename 
the files that the driver expects).

In the end, I'll submit 2 patches instead of this 1 patch:
- linux-firmware_git.bbappend - which will split the binaries only.
- wandboard-wifi-support.bb - which will add the nvram file (.txt) and rename 
the binaries as the driver expects.

Then the image/machine/conf should only have to include the 
wandboard-wifi-support recipe.  I really don't think that renaming the .bin file 
makes the linux-firmware recipe machine-specific, but I think it should be done 
in the packages-split step when it is filtering out the bcm4329-specific files 
for inclusion into the image.  That way, the user through the selection of 
linux-firmware-bcm4329 definitely gets the bcm4329 firmware file.

John


On 3/16/13 9:31 AM, Otavio Salvador wrote:
> On Sat, Mar 16, 2013 at 10:45 AM, John Weber <rjohnweber at gmail.com> wrote:
>> Adds linux-firmware bbappend recipe to provide support for the Broadcom
>> BCM4329 Wifi device.  Also adds a .txt file for nvram support.
>>
>> Signed-off-by: John Weber <rjohnweber at gmail.com>
>
> Thinking about how it was done, I'd say you could do it:
>
>   * Make this to split the binaries but without renaming it
>
>   * Add a new recipe (let's say wandboard-wifi-support) which rdepends
> on the binary package and installs the .txt file for nvram as well.
>
> So we avoid to make linux-firmware machine specific. We cannot have
> more than one package with same contents in filesystem (without being
> different recipe name) so we'd need to complicate it a lot, using the
> extra recipe makes it easy.
>
>



More information about the meta-freescale mailing list