All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] configs/bananapi_m2_zero: bump versions and add WiFi support
Date: Wed, 19 May 2021 21:19:37 +0200	[thread overview]
Message-ID: <20210519211937.4c57db2e@gmx.net> (raw)
In-Reply-To: <20210519113811.GT2268078@scaer>

Hello Yann,

On Wed, 19 May 2021 13:38:11 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Vincent, All,
> 
> On 2021-05-08 22:16 +0200, Vincent Stehl? via buildroot spake thusly:
> > - Bump kernel to version 5.12.2.
> > - Bump U-Boot to version 2021.04.
> > 
> > Also, adapt the SD card name in the boot script to follow Linux naming.
> > While at it, add comments to make the defconfig more readable.
> > 
> > The Banana Pi M2 Zero comprises an AMPAK AP6212 module with a Broadcom
> > bcm43438/a1 WiFi chip. Add the necessary firmware and tools to support it
> > and update documentation. We switch to mdev for /dev management, so that
> > the WiFi driver get auto-loaded.
> > 
> > Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
> > ---  
> [--SNIP--]
> > diff --git a/board/bananapi/bananapi-m2-zero/firmware-links.sh b/board/bananapi/bananapi-m2-zero/firmware-links.sh
> > new file mode 100755
> > index 0000000000..7f320fb1a5
> > --- /dev/null
> > +++ b/board/bananapi/bananapi-m2-zero/firmware-links.sh
> > @@ -0,0 +1,9 @@
> > +#!/bin/sh
> > +# Create the necessary WiFi firmware symbolic links for the brcmfmac driver
> > +set -eu
> > +
> > +cd "$1/lib/firmware"
> > +[ -d brcm ] || mkdir -v brcm
> > +cd brcm
> > +ln -svf ../ap6212/nvram.txt brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt
> > +ln -svf ../ap6212/fw_bcm43438a1_apsta.bin brcmfmac43430-sdio.bin  
> 
> In linux-firmware, there is the WHENCE file which describes the links to
> install, and we parse that in linux-firmware.mk.
> 
> Why can't we do similarly with armbian-firmware.mk?
> 
> Yeah, it misses WHENCE or something similar, but we should do it
> nonethelessC, like so:
> 
>     diff --git a/package/armbian-firmware/armbian-firmware.mk b/package/armbian-firmware/armbian-firmware.mk
>     index 0ed069025d..51bc5b903d 100644
>     --- a/package/armbian-firmware/armbian-firmware.mk
>     +++ b/package/armbian-firmware/armbian-firmware.mk
>     @@ -11,6 +11,13 @@ ARMBIAN_FIRMWARE_SITE_METHOD = git
>      # AP6212 WiFi/BT combo firmware
>      ifeq ($(BR2_PACKAGE_ARMBIAN_FIRMWARE_AP6212),y)
>      ARMBIAN_FIRMWARE_DIRS += ap6212
>     +define ARMBIAN_FIRMWARE_AP6212_LINKS
>     +	ln -svf ../ap6212/nvram.txt \
>     +		$(TARGET_DIR)/lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt
>     +	ln -svf ../ap6212/fw_bcm43438a1_apsta.bin \
>     +		$(TARGET_DIR)/lib/firmware/brcm/brcmfmac43430-sdio.bin
>     +endef
>     +ARMBIAN_FIRMWARE_POST_INSTALL_TARGET_HOOKS += ARMBIAN_FIRMWARE_AP6212_LINKS
>      endif
>      
>      # AP6256 WiFi/BT combo firmware
> 
> Also, if one look at armbian-firmware, there is already a brcm/
> sub-directory, and that already has brcm/brcmfmac43430-sdio.bin. Of
> course, the two are different...
> 
> Additionally, linux-firmware has brcm/brcmfmac43430a0-sdio.bin and
> brcm/brcmfmac43430-sdio.AP6212.txt, again with different content. The
> latter states "NVRAM config file for the Ampak AP6212 43430 WiFi/BT
> module".
> 
> So, this is quite a mess. Why do we have to use the armbian-fw ones,
> instead of those from linux-firmware? We are using an upstream kernel,
> and supposedly, drivers in there are supposed (as I understand it) to
> only require blobs from linux-firmware...
> 
> By the way, where does the weird 'brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt'
> name comes from? Is that a 'compatible' string from the DT?

It is the naming schema for (wifi) firmware configuration files:

brcmfmac43430-sdio.<vendor>,<board>.txt

See e.g. [1] for raspberry pi examples..., I think the board name comes from
the dtb entries...

Regards,
peter

[1] http://lists.busybox.net/pipermail/buildroot/2021-March/306920.html

> 
> Regards,
> Yann E. MORIN.
> 

  reply	other threads:[~2021-05-19 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 20:16 [Buildroot] [PATCH] configs/bananapi_m2_zero: bump versions and add WiFi support Vincent Stehlé
2021-05-19 11:38 ` Yann E. MORIN
2021-05-19 19:19   ` Peter Seiderer [this message]
2021-05-22 16:56   ` Vincent Stehlé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210519211937.4c57db2e@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.