All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] rpi-bt-firmware: new package
@ 2017-03-09 21:00 Baruch Siach
  2017-03-19 21:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2017-03-09 21:00 UTC (permalink / raw)
  To: buildroot

Add firmware file for the Raspberry Pi 3 Bluetooth module.

Note that to successfully download the firmware bluez5_utils needs a patch[1].

[1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: mention RPi Zero W in the commit log (Martin Bark)
---
 package/Config.in                          |  1 +
 package/rpi-bt-firmware/Config.in          |  7 +++++++
 package/rpi-bt-firmware/rpi-bt-firmware.mk | 21 +++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 package/rpi-bt-firmware/Config.in
 create mode 100644 package/rpi-bt-firmware/rpi-bt-firmware.mk

diff --git a/package/Config.in b/package/Config.in
index 9eb6a22f424a..f8413a3fa675 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -340,6 +340,7 @@ menu "Firmware"
 	source "package/b43-firmware/Config.in"
 	source "package/linux-firmware/Config.in"
 	source "package/rpi-firmware/Config.in"
+	source "package/rpi-bt-firmware/Config.in"
 	source "package/sunxi-boards/Config.in"
 	source "package/ts4900-fpga/Config.in"
 	source "package/ux500-firmware/Config.in"
diff --git a/package/rpi-bt-firmware/Config.in b/package/rpi-bt-firmware/Config.in
new file mode 100644
index 000000000000..5c6d608c232a
--- /dev/null
+++ b/package/rpi-bt-firmware/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_RPI_BT_FIRMWARE
+	bool "rpi-bt-firmware"
+	depends on BR2_arm || BR2_aarch64
+	help
+	  Raspberry Pi 3 and Zero W Broadcom BCM43438 Bluetooth module firmware.
+
+	  https://aur.archlinux.org/packages/pi-bluetooth
diff --git a/package/rpi-bt-firmware/rpi-bt-firmware.mk b/package/rpi-bt-firmware/rpi-bt-firmware.mk
new file mode 100644
index 000000000000..255da1926211
--- /dev/null
+++ b/package/rpi-bt-firmware/rpi-bt-firmware.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# rpi-bt-firmware
+#
+################################################################################
+
+RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
+RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git
+RPI_BT_FIRMWARE_SITE_METHOD = git
+RPI_BT_FIRMWARE_LICENSE = PROPRIETARY
+RPI_BT_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx
+
+# The BlueZ hciattach utility looks for firmware in /etc/firmware. Add a
+# compatibility symlink.
+define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
+	ln -sf ../lib/firmware $(TARGET_DIR)/etc/firmware
+	$(INSTALL) -D -m 0644 $(@D)/BCM43430A1.hcd \
+		$(TARGET_DIR)/lib/firmware/BCM43430A1.hcd
+endef
+
+$(eval $(generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-03-09 21:00 [Buildroot] [PATCH] rpi-bt-firmware: new package Baruch Siach
@ 2017-03-19 21:00 ` Thomas Petazzoni
  2017-03-20 21:30   ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2017-03-19 21:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  9 Mar 2017 23:00:34 +0200, Baruch Siach wrote:
> Add firmware file for the Raspberry Pi 3 Bluetooth module.
> 
> Note that to successfully download the firmware bluez5_utils needs a patch[1].
> 
> [1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html

Wonderful patch :)

> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

I think the name of the package is wrong, it shouldn't be
rpi-bt-firmware. Indeed, it has nothing to do with the RPi itself, but
with the WiFi chip. And other boards, such as
http://www.armadeus.org/wiki/index.php?title=OPOS6UL, use a WiFi chip
that need the same firmware. See
http://www.armadeus.org/wiki/index.php?title=Bluetooth#OPOS6UL where
they tell to use exactly that BCM43430A1.hcd firmware.

So perhaps the package should be bcrm-43430-firmware or something along
those lines.


> +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git

Is there a better upstream than this? I found
https://github.com/varigit/bcm_4343w_fw but I'm not sure it really
qualifies as "better".

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-03-19 21:00 ` Thomas Petazzoni
@ 2017-03-20 21:30   ` Baruch Siach
  2017-03-20 21:42     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2017-03-20 21:30 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Sun, Mar 19, 2017 at 10:00:43PM +0100, Thomas Petazzoni wrote:
> On Thu,  9 Mar 2017 23:00:34 +0200, Baruch Siach wrote:
> > Add firmware file for the Raspberry Pi 3 Bluetooth module.
> > 
> > Note that to successfully download the firmware bluez5_utils needs a patch[1].
> > 
> > [1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html
> 
> Wonderful patch :)
> 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> 
> I think the name of the package is wrong, it shouldn't be
> rpi-bt-firmware. Indeed, it has nothing to do with the RPi itself, but
> with the WiFi chip. And other boards, such as
> http://www.armadeus.org/wiki/index.php?title=OPOS6UL, use a WiFi chip
> that need the same firmware. See
> http://www.armadeus.org/wiki/index.php?title=Bluetooth#OPOS6UL where
> they tell to use exactly that BCM43430A1.hcd firmware.

Thanks for the link.

Do you have any indication that this is indeed the same file that RPi uses? My 
impression was that this firmware is tailored specifically for the RPi board, 
but I don't know for sure. That fact that Broadcom licenses the file may 
indicate that this is the same one. But ...

> So perhaps the package should be bcrm-43430-firmware or something along
> those lines.
> 
> 
> > +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> > +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git
> 
> Is there a better upstream than this? I found
> https://github.com/varigit/bcm_4343w_fw but I'm not sure it really
> qualifies as "better".

... this is not the same file:

ls -l bcm43430a1.hcd pi-bluetooth/BCM43430A1.hcd 
-rw-r--r-- 1 baruch baruch 14265 Mar 20 23:22 bcm43430a1.hcd
-rw-r--r-- 1 baruch baruch 35976 Jan 17 12:25 pi-bluetooth/BCM43430A1.hcd

I have not tested the Variscite firmware on the RPi, though. There is a small 
chance it might damage the hardware.

And since the git repo we use is named 'pi-bluetooth' maybe rpi-bt-firmware is 
not such a bad name after all.

barauch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-03-20 21:30   ` Baruch Siach
@ 2017-03-20 21:42     ` Thomas Petazzoni
  2017-03-21  5:41       ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2017-03-20 21:42 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 20 Mar 2017 23:30:39 +0200, Baruch Siach wrote:

> Do you have any indication that this is indeed the same file that RPi uses? My 
> impression was that this firmware is tailored specifically for the RPi board, 
> but I don't know for sure. That fact that Broadcom licenses the file may 
> indicate that this is the same one. But ...
> 
> > So perhaps the package should be bcrm-43430-firmware or something along
> > those lines.
> > 
> >   
> > > +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> > > +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git  
> > 
> > Is there a better upstream than this? I found
> > https://github.com/varigit/bcm_4343w_fw but I'm not sure it really
> > qualifies as "better".  
> 
> ... this is not the same file:
> 
> ls -l bcm43430a1.hcd pi-bluetooth/BCM43430A1.hcd 
> -rw-r--r-- 1 baruch baruch 14265 Mar 20 23:22 bcm43430a1.hcd
> -rw-r--r-- 1 baruch baruch 35976 Jan 17 12:25 pi-bluetooth/BCM43430A1.hcd

Gaah, what a mess. Why don't they just post it for integration in the
linux-firmware project? Why is it that RPi people always have to do
things the weird way?

> I have not tested the Variscite firmware on the RPi, though. There is a small 
> chance it might damage the hardware.
> 
> And since the git repo we use is named 'pi-bluetooth' maybe rpi-bt-firmware is 
> not such a bad name after all.

Yeah, indeed :-/

Can you resend the patch with just an extended explanation as to why
the package is named this way, and the fact that even though the
WiFi chip isn't RPi specific, the firmware might be.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-03-20 21:42     ` Thomas Petazzoni
@ 2017-03-21  5:41       ` Baruch Siach
  0 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2017-03-21  5:41 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Mar 20, 2017 at 10:42:06PM +0100, Thomas Petazzoni wrote:
> On Mon, 20 Mar 2017 23:30:39 +0200, Baruch Siach wrote:
> > Do you have any indication that this is indeed the same file that RPi 
> > uses? My impression was that this firmware is tailored specifically for 
> > the RPi board, but I don't know for sure. That fact that Broadcom licenses 
> > the file may indicate that this is the same one. But ...
> > 
> > > So perhaps the package should be bcrm-43430-firmware or something along
> > > those lines.
> > >   
> > > > +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> > > > +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git  
> > > 
> > > Is there a better upstream than this? I found
> > > https://github.com/varigit/bcm_4343w_fw but I'm not sure it really
> > > qualifies as "better".  
> > 
> > ... this is not the same file:
> > 
> > ls -l bcm43430a1.hcd pi-bluetooth/BCM43430A1.hcd 
> > -rw-r--r-- 1 baruch baruch 14265 Mar 20 23:22 bcm43430a1.hcd
> > -rw-r--r-- 1 baruch baruch 35976 Jan 17 12:25 pi-bluetooth/BCM43430A1.hcd
> 
> Gaah, what a mess. Why don't they just post it for integration in the
> linux-firmware project? Why is it that RPi people always have to do
> things the weird way?

I agree that the general attitude of the RPi community to the larger Open 
Source community resembles an island attitude to mainland. But in this case 
I'm not sure it is their fault. If indeed the firmware is board specific, 
putting it in linux-firmware under a "generic" name won't do much good I 
guess.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-03-07 10:34 ` Martin Bark
@ 2017-03-08  7:17   ` Baruch Siach
  0 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2017-03-08  7:17 UTC (permalink / raw)
  To: buildroot

Hi Martin,

On Tue, Mar 07, 2017 at 10:34:02AM +0000, Martin Bark wrote:
> On 1 February 2017 at 13:23, Baruch Siach <baruch@tkos.co.il> wrote:
> > Add firmware file for the Raspberry Pi 3 Bluetooth module.
> >
> > Note that to successfully download the firmware bluez5_utils needs a
> > patch[1].
> >
> > [1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html
> 
> This seems a minor patch, is it safe it just add it to blue5_utils?

Upstream rejected the patch, and Buildroot generally does not add feature 
patches. This is arguably not a "feature" patch, but I still don't think 
Buildroot should carry it.

> > +config BR2_PACKAGE_RPI_BT_FIRMWARE
> > +       bool "rpi-bt-firmware"
> > +       depends on BR2_arm || BR2_aarch64
> > +       help
> > +         Raspberry Pi 3 Broadcom BCM43438 Bluetooth module firmware.
> 
> I think this will also be needed on the raspberry pi zero w so might be
> worth updating the comment.

Have you tested it on the Pi Zero W?

> > +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> > +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git
> 
> Is aur a good place to pull this from? Hopefully one day BCM43430A1.hcd
> will make it's way into linux-firmware but until then it seems like
> raspbian is the source of this file so i think it's better to get it from
> them.

See below.

> > +RPI_BT_FIRMWARE_SITE_METHOD = git
> > +RPI_BT_FIRMWARE_LICENSE = PROPRIETARY
> > +RPI_BT_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx
> > +
> > +# The BlueZ hciattach utility looks for firmware in /etc/firmware. Add a
> > +# compatibility symlink.
> > +define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
> > +       ln -sf ../lib/firmware $(TARGET_DIR)/etc/firmware
> 
> +       $(INSTALL) -D -m 0644 $(@D)/BCM43430A1.hcd \
> > +               $(TARGET_DIR)/lib/firmware/BCM43430A1.hcd
> >
> 
> Given you have to patch hciattach_bcm43xx.c to use this firmware why not
> also correct the path to the firmware? Assuming BCM43430A1.hcd ends up in
> linux-firmware then it would reside in /lib/firmware/brcm.  If you patch
> the correct path to BCM43430A1.hcd then there is no need for the symlink.

I prefer to keep the upstream patch as minimal as possible. Also, although 
unlikely, upstream may change firmware search location to /lib/firmware. So I 
would like to keep compatibility with both paths.

> > +endef
> > +
> > +$(eval $(generic-package))
> 
> So i was thinking something more like this where we get the firmware from
> the raspbian package. what do you think?
> 
> RPI_BT_FIRMWARE_VERSION = 1.2
> RPI_BT_FIRMWARE_SOURCE=bluez-firmware_$(RPI_BT_FIRMWARE_VERSION).orig.tar.gz
> RPI_BT_FIRMWARE_SITE =
> https://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware

Does archive.raspberrypi.org keep older versions of source packages forever 
like snapshot.debian.org?

> RPI_BT_FIRMWARE_EXTRA_DOWNLOADS =
> bluez-firmware_$(RPI_BT_FIRMWARE_VERSION)-3+rpi1.debian.tar.xz
> RPI_BT_FIRMWARE_LICENSE = Proprietary
> RPI_BT_FIRMWARE_LICENSE_FILES = broadcom/BCM-LEGAL.txt
> 
> # Extract the Debian tarball inside the sources
> define RPI_BT_FIRMWARE_DEBIAN_EXTRACT
>         $(call suitable-extractor,$(notdir
> $(RPI_BT_FIRMWARE_EXTRA_DOWNLOADS))) \
>                 $(DL_DIR)/$(notdir $(RPI_BT_FIRMWARE_EXTRA_DOWNLOADS)) | \
>                 $(TAR) -C $(@D) $(TAR_OPTIONS) -
> endef
> RPI_BT_FIRMWARE_POST_EXTRACT_HOOKS += RPI_BT_FIRMWARE_DEBIAN_EXTRACT

This is overly complicated, in my opinion. I prefer my simpler approach.

> define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
> $(INSTALL) -D -m 0644 $(@D)/broadcom/BCM43430A1.hcd
> $(TARGET_DIR)/lib/firmware/brcm/BCM43430A1.hcd
> endef
> 
> Finally for this firmware to be useful don't we also need sysv and systemd
> scripts to call hciattach?

You may use either of the two Rpi UARTs to communicate with the Bluetooth 
module. I don't think we should hard code that decision into a startup script. 
This is something for local user to customize.

Thanks for reviewing.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
  2017-02-01 13:23 Baruch Siach
@ 2017-03-07 10:34 ` Martin Bark
  2017-03-08  7:17   ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Bark @ 2017-03-07 10:34 UTC (permalink / raw)
  To: buildroot

 Baruch Siach,

On 1 February 2017 at 13:23, Baruch Siach <baruch@tkos.co.il> wrote:

> Add firmware file for the Raspberry Pi 3 Bluetooth module.
>
> Note that to successfully download the firmware bluez5_utils needs a
> patch[1].
>
> [1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html


This seems a minor patch, is it safe it just add it to blue5_utils?


>
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/Config.in                          |  1 +
>  package/rpi-bt-firmware/Config.in          |  7 +++++++
>  package/rpi-bt-firmware/rpi-bt-firmware.mk | 21 +++++++++++++++++++++
>  3 files changed, 29 insertions(+)
>  create mode 100644 package/rpi-bt-firmware/Config.in
>  create mode 100644 package/rpi-bt-firmware/rpi-bt-firmware.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 44aaf0887ede..8ad7d27e9de0 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -336,6 +336,7 @@ menu "Firmware"
>         source "package/b43-firmware/Config.in"
>         source "package/linux-firmware/Config.in"
>         source "package/rpi-firmware/Config.in"
> +       source "package/rpi-bt-firmware/Config.in"
>         source "package/sunxi-boards/Config.in"
>         source "package/ts4900-fpga/Config.in"
>         source "package/ux500-firmware/Config.in"
> diff --git a/package/rpi-bt-firmware/Config.in b/package/rpi-bt-firmware/
> Config.in
> new file mode 100644
> index 000000000000..366ce9196941
> --- /dev/null
> +++ b/package/rpi-bt-firmware/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_RPI_BT_FIRMWARE
> +       bool "rpi-bt-firmware"
> +       depends on BR2_arm || BR2_aarch64
> +       help
> +         Raspberry Pi 3 Broadcom BCM43438 Bluetooth module firmware.
>

I think this will also be needed on the raspberry pi zero w so might be
worth updating the comment.


> +
> +         https://aur.archlinux.org/packages/pi-bluetooth
> diff --git a/package/rpi-bt-firmware/rpi-bt-firmware.mk
> b/package/rpi-bt-firmware/rpi-bt-firmware.mk
> new file mode 100644
> index 000000000000..255da1926211
> --- /dev/null
> +++ b/package/rpi-bt-firmware/rpi-bt-firmware.mk
> @@ -0,0 +1,21 @@
> +###########################################################
> #####################
> +#
> +# rpi-bt-firmware
> +#
> +###########################################################
> #####################
> +
> +RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
> +RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git


Is aur a good place to pull this from? Hopefully one day BCM43430A1.hcd
will make it's way into linux-firmware but until then it seems like
raspbian is the source of this file so i think it's better to get it from
them.


>
> +RPI_BT_FIRMWARE_SITE_METHOD = git
> +RPI_BT_FIRMWARE_LICENSE = PROPRIETARY
> +RPI_BT_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx
> +
> +# The BlueZ hciattach utility looks for firmware in /etc/firmware. Add a
> +# compatibility symlink.
> +define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
> +       ln -sf ../lib/firmware $(TARGET_DIR)/etc/firmware

+       $(INSTALL) -D -m 0644 $(@D)/BCM43430A1.hcd \
> +               $(TARGET_DIR)/lib/firmware/BCM43430A1.hcd
>

Given you have to patch hciattach_bcm43xx.c to use this firmware why not
also correct the path to the firmware? Assuming BCM43430A1.hcd ends up in
linux-firmware then it would reside in /lib/firmware/brcm.  If you patch
the correct path to BCM43430A1.hcd then there is no need for the symlink.


> +endef
> +
> +$(eval $(generic-package))
>


So i was thinking something more like this where we get the firmware from
the raspbian package. what do you think?

RPI_BT_FIRMWARE_VERSION = 1.2
RPI_BT_FIRMWARE_SOURCE=bluez-firmware_$(RPI_BT_FIRMWARE_VERSION).orig.tar.gz
RPI_BT_FIRMWARE_SITE =
https://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware
RPI_BT_FIRMWARE_EXTRA_DOWNLOADS =
bluez-firmware_$(RPI_BT_FIRMWARE_VERSION)-3+rpi1.debian.tar.xz
RPI_BT_FIRMWARE_LICENSE = Proprietary
RPI_BT_FIRMWARE_LICENSE_FILES = broadcom/BCM-LEGAL.txt

# Extract the Debian tarball inside the sources
define RPI_BT_FIRMWARE_DEBIAN_EXTRACT
        $(call suitable-extractor,$(notdir
$(RPI_BT_FIRMWARE_EXTRA_DOWNLOADS))) \
                $(DL_DIR)/$(notdir $(RPI_BT_FIRMWARE_EXTRA_DOWNLOADS)) | \
                $(TAR) -C $(@D) $(TAR_OPTIONS) -
endef
RPI_BT_FIRMWARE_POST_EXTRACT_HOOKS += RPI_BT_FIRMWARE_DEBIAN_EXTRACT

define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(@D)/broadcom/BCM43430A1.hcd
$(TARGET_DIR)/lib/firmware/brcm/BCM43430A1.hcd
endef



Finally for this firmware to be useful don't we also need sysv and systemd
scripts to call hciattach?

Thanks

Martin


--
> 2.11.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170307/e6299b20/attachment.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] rpi-bt-firmware: new package
@ 2017-02-01 13:23 Baruch Siach
  2017-03-07 10:34 ` Martin Bark
  0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2017-02-01 13:23 UTC (permalink / raw)
  To: buildroot

Add firmware file for the Raspberry Pi 3 Bluetooth module.

Note that to successfully download the firmware bluez5_utils needs a patch[1].

[1] http://www.spinics.net/lists/linux-bluetooth/msg69470.html

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/Config.in                          |  1 +
 package/rpi-bt-firmware/Config.in          |  7 +++++++
 package/rpi-bt-firmware/rpi-bt-firmware.mk | 21 +++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 package/rpi-bt-firmware/Config.in
 create mode 100644 package/rpi-bt-firmware/rpi-bt-firmware.mk

diff --git a/package/Config.in b/package/Config.in
index 44aaf0887ede..8ad7d27e9de0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -336,6 +336,7 @@ menu "Firmware"
 	source "package/b43-firmware/Config.in"
 	source "package/linux-firmware/Config.in"
 	source "package/rpi-firmware/Config.in"
+	source "package/rpi-bt-firmware/Config.in"
 	source "package/sunxi-boards/Config.in"
 	source "package/ts4900-fpga/Config.in"
 	source "package/ux500-firmware/Config.in"
diff --git a/package/rpi-bt-firmware/Config.in b/package/rpi-bt-firmware/Config.in
new file mode 100644
index 000000000000..366ce9196941
--- /dev/null
+++ b/package/rpi-bt-firmware/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_RPI_BT_FIRMWARE
+	bool "rpi-bt-firmware"
+	depends on BR2_arm || BR2_aarch64
+	help
+	  Raspberry Pi 3 Broadcom BCM43438 Bluetooth module firmware.
+
+	  https://aur.archlinux.org/packages/pi-bluetooth
diff --git a/package/rpi-bt-firmware/rpi-bt-firmware.mk b/package/rpi-bt-firmware/rpi-bt-firmware.mk
new file mode 100644
index 000000000000..255da1926211
--- /dev/null
+++ b/package/rpi-bt-firmware/rpi-bt-firmware.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# rpi-bt-firmware
+#
+################################################################################
+
+RPI_BT_FIRMWARE_VERSION = a439f892bf549ddfefa9ba7ad1999cc515f233bf
+RPI_BT_FIRMWARE_SITE = https://aur.archlinux.org/pi-bluetooth.git
+RPI_BT_FIRMWARE_SITE_METHOD = git
+RPI_BT_FIRMWARE_LICENSE = PROPRIETARY
+RPI_BT_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx
+
+# The BlueZ hciattach utility looks for firmware in /etc/firmware. Add a
+# compatibility symlink.
+define RPI_BT_FIRMWARE_INSTALL_TARGET_CMDS
+	ln -sf ../lib/firmware $(TARGET_DIR)/etc/firmware
+	$(INSTALL) -D -m 0644 $(@D)/BCM43430A1.hcd \
+		$(TARGET_DIR)/lib/firmware/BCM43430A1.hcd
+endef
+
+$(eval $(generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-21  5:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 21:00 [Buildroot] [PATCH] rpi-bt-firmware: new package Baruch Siach
2017-03-19 21:00 ` Thomas Petazzoni
2017-03-20 21:30   ` Baruch Siach
2017-03-20 21:42     ` Thomas Petazzoni
2017-03-21  5:41       ` Baruch Siach
  -- strict thread matches above, loose matches on Subject: below --
2017-02-01 13:23 Baruch Siach
2017-03-07 10:34 ` Martin Bark
2017-03-08  7:17   ` Baruch Siach

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.