Skip to contentSkip to conversation

bluez5: add functions for raspberrypi0-wifi

PATCH New Yusuke Mitsuki 3 participants 11 messages Aug 24, 2017 – Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluez5: add functions for raspberrypi0-wifi

I could not use bluetooth with raspberrypi0-wifi.
hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not found.

Functions in bluez5_%.bbappend should be enabled with raspberrypi0-wifi too.

I know that these changes are redundant.

If you have any ideas for better solution, let me know.

Yusuke Mitsuki (1):
bluez5: add functions for raspberrypi0-wifi

 recipes-connectivity/bluez5/bluez5_%.bbappend | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 bluez5: add functions for raspberrypi0-wifi

hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not found.

Paches that in order to use bluetooth with BCM43430 are not enabled. Functions are only enabled with raspberrypi3 in bluez5_%.bbappend like as follows:

- SRC_URI_append_raspberrypi3
- do_install_append_raspberrypi3()
- FILES_${PN}_append_raspberrypi3
- SYSTEMD_SERVICE_${PN}_append_raspberrypi3

These should be enabled with raspberrypi0-wifi too.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
recipes-connectivity/bluez5/bluez5_%.bbappend +25 -0
index 956d776..075dc2b 100644
@@ -24,3 +24,28 @@ FILES_${PN}_append_raspberrypi3 = " \
     "
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+
+SRC_URI_append_raspberrypi0-wifi = " \
+    file://BCM43430A1.hcd \
+    file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
+    file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
+    file://0003-Increase-firmware-load-timeout-to-30s.patch \
+    file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
+    file://brcm43438.service \
+    "
+
+do_install_append_raspberrypi0-wifi() {
+    install -d ${D}/lib/firmware/brcm/
+    install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
+    fi
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " \
+    /lib/firmware/brcm/BCM43430A1.hcd \
+    "
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " brcm43438.service"
Signature · 1 line
2.7.4
#2 lore raw
Quoted 40 lines · Yusuke Mitsuki

hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not found.

Paches that in order to use bluetooth with BCM43430 are not enabled. Functions are only enabled with raspberrypi3 in bluez5_%.bbappend like as follows:

- SRC_URI_append_raspberrypi3
- do_install_append_raspberrypi3()
- FILES_${PN}_append_raspberrypi3
- SYSTEMD_SERVICE_${PN}_append_raspberrypi3

These should be enabled with raspberrypi0-wifi too.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
recipes-connectivity/bluez5/bluez5_%.bbappend +15 -0
index 956d776..075dc2b 100644
@@ -24,3 +24,28 @@ FILES_${PN}_append_raspberrypi3 = " \
     "
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+
+SRC_URI_append_raspberrypi0-wifi = " \
+    file://BCM43430A1.hcd \
+    file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
+    file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
+    file://0003-Increase-firmware-load-timeout-to-30s.patch \
+    file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
+    file://brcm43438.service \
+    "
+
+do_install_append_raspberrypi0-wifi() {
+    install -d ${D}/lib/firmware/brcm/
+    install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 51

Quoted 10 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +10 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
+    fi
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " \
+    /lib/firmware/brcm/BCM43430A1.hcd \
+    "
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " brcm43438.service"

I don't like the amount of duplication here. Could you define some common variables and use those in the appends? This will make it easier to change/upgrade in the future and avoid risk of the duplicates falling out of sync with each other.

Eg.

    RPI_WIFI_SOURCES = "...."

    SRC_URI_append_raspberrypi3 = "${RPI_WIFI_SOURCES}"
    SRC_URI_append_raspberrypi0-wifi = "${RPI_WIFI_SOURCES}"
Signature · 2 lines
Paul Barker
Togán Labs Ltd
#3 lore raw

okay. I will try.

2017-08-25 17:51 GMT+09:00 Paul Barker <[email protected]>:

Quoted 77 lines
Quoted 1 line · Yusuke Mitsuki

hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not

found.

Quoted 3 lines

Paches that in order to use bluetooth with BCM43430 are not enabled. Functions are only enabled with raspberrypi3 in bluez5_%.bbappend like

as follows:

Quoted 11 lines

- SRC_URI_append_raspberrypi3
- do_install_append_raspberrypi3()
- FILES_${PN}_append_raspberrypi3
- SYSTEMD_SERVICE_${PN}_append_raspberrypi3

These should be enabled with raspberrypi0-wifi too.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 25

+++++++++++++++++++++++++

Review

Quoted 3 lines
 1 file changed, 25 insertions(+)
(quoted diff) +0 -0

b/recipes-connectivity/bluez5/bluez5_%.bbappend

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 31

Quoted 12 lines

index 956d776..075dc2b 100644

recipes-connectivity/bluez5/bluez5_%.bbappend +5 -0
@@ -24,3 +24,28 @@ FILES_${PN}_append_raspberrypi3 = " \
     "
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+
+SRC_URI_append_raspberrypi0-wifi = " \
+    file://BCM43430A1.hcd \
+    file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
+    file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch

\

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    file://0003-Increase-firmware-load-timeout-to-30s.patch \
+    file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
+    file://brcm43438.service \
+    "
+
+do_install_append_raspberrypi0-wifi() {
+    install -d ${D}/lib/firmware/brcm/
+    install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/

BCM43430A1.hcd

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 41

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',

'false', d)}; then

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 43

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/brcm43438.service

${D}${systemd_unitdir}/system

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 51

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    fi
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " \
+    /lib/firmware/brcm/BCM43430A1.hcd \
+    "
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " brcm43438.service"

I don't like the amount of duplication here. Could you define some common variables and use those in the appends? This will make it easier to change/upgrade in the future and avoid risk of the duplicates falling out of sync with each other.

Eg.

    RPI_WIFI_SOURCES = "...."

    SRC_URI_append_raspberrypi3 = "${RPI_WIFI_SOURCES}"
    SRC_URI_append_raspberrypi0-wifi = "${RPI_WIFI_SOURCES}"

--
Paul Barker
Togán Labs Ltd

#4 lore raw
Quoted 78 lines · Yusuke Mitsuki

okay. I will try.

2017-08-25 17:51 GMT+09:00 Paul Barker <[email protected]>:

Quoted 74 lines
Quoted 1 line · Yusuke Mitsuki

hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not

found.

Quoted 3 lines

Paches that in order to use bluetooth with BCM43430 are not enabled. Functions are only enabled with raspberrypi3 in bluez5_%.bbappend like

as follows:

Quoted 11 lines

- SRC_URI_append_raspberrypi3
- do_install_append_raspberrypi3()
- FILES_${PN}_append_raspberrypi3
- SYSTEMD_SERVICE_${PN}_append_raspberrypi3

These should be enabled with raspberrypi0-wifi too.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 25

+++++++++++++++++++++++++

Review

Quoted 3 lines
 1 file changed, 25 insertions(+)
(quoted diff) +0 -0

b/recipes-connectivity/bluez5/bluez5_%.bbappend

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 31

Quoted 12 lines

index 956d776..075dc2b 100644

recipes-connectivity/bluez5/bluez5_%.bbappend +5 -0
@@ -24,3 +24,28 @@ FILES_${PN}_append_raspberrypi3 = " \
     "
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+
+SRC_URI_append_raspberrypi0-wifi = " \
+    file://BCM43430A1.hcd \
+    file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
+    file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch

\

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    file://0003-Increase-firmware-load-timeout-to-30s.patch \
+    file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
+    file://brcm43438.service \
+    "
+
+do_install_append_raspberrypi0-wifi() {
+    install -d ${D}/lib/firmware/brcm/
+    install -m 0644 ${WORKDIR}/BCM43430A1.hcd

${D}/lib/firmware/brcm/BCM43430A1.hcd

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 41

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',

'false', d)}; then

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 43

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/brcm43438.service

${D}${systemd_unitdir}/system

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 51

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    fi
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " \
+    /lib/firmware/brcm/BCM43430A1.hcd \
+    "
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " brcm43438.service"

I don't like the amount of duplication here. Could you define some common variables and use those in the appends? This will make it easier to change/upgrade in the future and avoid risk of the duplicates falling out of sync with each other.

Eg.

    RPI_WIFI_SOURCES = "...."

    SRC_URI_append_raspberrypi3 = "${RPI_WIFI_SOURCES}"
    SRC_URI_append_raspberrypi0-wifi = "${RPI_WIFI_SOURCES}"

I know Michal worked on this not long ago. Michal, could you give us some hints here? Maybe backport the changes in resinOS?

--
Andrei Gherzan

#5 lore raw

Sorry I am late.
I could not get time enough for this work.

I will send patches soon.

By the way, If the Michal's work that Andrei pointed and my patches are similar, please drop my patches.

2017-09-04 20:05 GMT+09:00 Andrei Gherzan <[email protected]>:

Quoted 91 lines
Quoted 78 lines · Yusuke Mitsuki

okay. I will try.

2017-08-25 17:51 GMT+09:00 Paul Barker <[email protected]>:

Quoted 74 lines
Quoted 1 line · Yusuke Mitsuki

hciattach on raspberrypi0-wifi failed because BCM43430A1.hcd is not

found.

Quoted 3 lines

Paches that in order to use bluetooth with BCM43430 are not enabled. Functions are only enabled with raspberrypi3 in bluez5_%.bbappend like

as follows:

Quoted 11 lines

- SRC_URI_append_raspberrypi3
- do_install_append_raspberrypi3()
- FILES_${PN}_append_raspberrypi3
- SYSTEMD_SERVICE_${PN}_append_raspberrypi3

These should be enabled with raspberrypi0-wifi too.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 25

+++++++++++++++++++++++++

Review

Quoted 3 lines
 1 file changed, 25 insertions(+)
(quoted diff) +0 -0

b/recipes-connectivity/bluez5/bluez5_%.bbappend

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 31

Quoted 12 lines

index 956d776..075dc2b 100644

recipes-connectivity/bluez5/bluez5_%.bbappend +5 -0
@@ -24,3 +24,28 @@ FILES_${PN}_append_raspberrypi3 = " \
     "
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+
+SRC_URI_append_raspberrypi0-wifi = " \
+    file://BCM43430A1.hcd \
+    file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
+    file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch

\

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    file://0003-Increase-firmware-load-timeout-to-30s.patch \
+    file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
+    file://brcm43438.service \
+    "
+
+do_install_append_raspberrypi0-wifi() {
+    install -d ${D}/lib/firmware/brcm/
+    install -m 0644 ${WORKDIR}/BCM43430A1.hcd

${D}/lib/firmware/brcm/BCM43430A1.hcd

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 41

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',

'false', d)}; then

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 43

Quoted 2 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +2 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/brcm43438.service

${D}${systemd_unitdir}/system

recipes-connectivity/bluez5/bluez5_%.bbappend FILES_${PN}_append_raspberrypi3 = " \ · line 51

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +8 -0
+    fi
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " \
+    /lib/firmware/brcm/BCM43430A1.hcd \
+    "
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " brcm43438.service"

I don't like the amount of duplication here. Could you define some common variables and use those in the appends? This will make it easier to change/upgrade in the future and avoid risk of the duplicates falling out of sync with each other.

Eg.

    RPI_WIFI_SOURCES = "...."

    SRC_URI_append_raspberrypi3 = "${RPI_WIFI_SOURCES}"
    SRC_URI_append_raspberrypi0-wifi = "${RPI_WIFI_SOURCES}"

I know Michal worked on this not long ago. Michal, could you give us some hints here? Maybe backport the changes in resinOS?

--
Andrei Gherzan

#6 lore raw

PATCH v2 1/2 bluez5: add functions/variables to enabling bluetooth on another raspberrypi

In reply to Yusuke Mitsuki

functions/variables in this bbappend implemented for only raspberrypi3.
But these must be able to used to enabling bluetooth on another raspberrypi that has bluetooth feature such as raspberrypi0-wifi.

The simple solution is a duplicating these but it is not good ideas for maintainance.

Add functions/variables follows to simplify to enabling bluetooth on another raspberrypi that has bluetooth.
- BCM_BT_SOURCES
- enable_bcm_bluetooth()
- BCM_BT_FIRMWARE
- BCM_BT_SERVICE

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
recipes-connectivity/bluez5/bluez5_%.bbappend +14 -4
index 956d776..b2fbf22 100644
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_raspberrypi3 = " \
+BCM_BT_SOURCES =  " \
     file://BCM43430A1.hcd \
     file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
     file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
@@ -9,7 +9,7 @@ SRC_URI_append_raspberrypi3 = " \
     file://brcm43438.service \
     "
 
-do_install_append_raspberrypi3() {
+enable_bcm_bluetooth() {
     install -d ${D}/lib/firmware/brcm/
     install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
 
@@ -19,8 +19,18 @@ do_install_append_raspberrypi3() {
     fi
 }
 
-FILES_${PN}_append_raspberrypi3 = " \
+BCM_BT_FIRMWARE =  " \
     /lib/firmware/brcm/BCM43430A1.hcd \
     "
 
-SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+BCM_BT_SERVICE =  " brcm43438.service"
+
+SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
+
+do_install_append_raspberrypi3() {
+    enable_bcm_bluetooth
+}
+
+FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
Signature · 1 line
2.7.4
#7 lore raw

PATCH v2 2/2 bluez5: enable bluetooth on raspberrypi0-wifi

Add functions/variable to enabling bluetooth on raspberrypi0-wifi.

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 12 ++++++++++++
 1 file changed, 12 insertions(+)
recipes-connectivity/bluez5/bluez5_%.bbappend +12 -0
index b2fbf22..03efd5c 100644
@@ -25,6 +25,7 @@ BCM_BT_FIRMWARE =  " \
 
 BCM_BT_SERVICE =  " brcm43438.service"
 
+# for raspberrypi3
 SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
 
 do_install_append_raspberrypi3() {
@@ -34,3 +35,14 @@ do_install_append_raspberrypi3() {
 FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
 
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
+
+# for raspberrypi0-wifi
+SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}"
+
+do_install_append_raspberrypi0-wifi() {
+    enable_bcm_bluetooth
+}
+
+FILES_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_FIRMWARE}"
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_SERVICE}"
Signature · 1 line
2.7.4
#8 lore raw

Re: [meta-raspberrypi][PATCH v2 1/2] bluez5: add functions/variables to enabling bluetooth on another raspberrypi

In reply to Yusuke Mitsuki
Quoted 59 lines · Yusuke Mitsuki

functions/variables in this bbappend implemented for only raspberrypi3.
But these must be able to used to enabling bluetooth on another raspberrypi that has bluetooth feature such as raspberrypi0-wifi.

The simple solution is a duplicating these but it is not good ideas for maintainance.

Add functions/variables follows to simplify to enabling bluetooth on another raspberrypi that has bluetooth.
- BCM_BT_SOURCES
- enable_bcm_bluetooth()
- BCM_BT_FIRMWARE
- BCM_BT_SERVICE

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
recipes-connectivity/bluez5/bluez5_%.bbappend +14 -5
index 956d776..b2fbf22 100644
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_raspberrypi3 = " \
+BCM_BT_SOURCES =  " \
     file://BCM43430A1.hcd \
     file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
     file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
@@ -9,7 +9,7 @@ SRC_URI_append_raspberrypi3 = " \
     file://brcm43438.service \
     "
 
-do_install_append_raspberrypi3() {
+enable_bcm_bluetooth() {
     install -d ${D}/lib/firmware/brcm/
     install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
 
@@ -19,8 +19,18 @@ do_install_append_raspberrypi3() {
     fi
 }
 
-FILES_${PN}_append_raspberrypi3 = " \
+BCM_BT_FIRMWARE =  " \
     /lib/firmware/brcm/BCM43430A1.hcd \
     "
 
-SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+BCM_BT_SERVICE =  " brcm43438.service"
+
+SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
+
+do_install_append_raspberrypi3() {
+    enable_bcm_bluetooth
+}
+
+FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
--
Quoted 2 lines

2.7.4

This and the follow up patch look excellent, should be easy to modify in the future if we need to.

We have switched to using github pull requests for meta-raspberrypi. Could you open a pull request on
https://github.com/agherzan/meta-raspberrypi with these changes please? Let me know if you have any issues doing that.

Thanks,

Signature · 2 lines
Paul Barker
Togán Labs Ltd
#9 lore raw

Re: [meta-raspberrypi][PATCH v2 1/2] bluez5: add functions/variables to enabling bluetooth on another raspberrypi

Quoted 73 lines · Paul Barker
Quoted 2 lines · Yusuke Mitsuki

functions/variables in this bbappend implemented for only raspberrypi3. But these must be able to used to enabling bluetooth on another

raspberrypi that has bluetooth feature such as raspberrypi0-wifi.

Quoted 2 lines

The simple solution is a duplicating these but it is not good ideas for

maintainance.

Quoted 2 lines

Add functions/variables follows to simplify to enabling bluetooth on

another raspberrypi that has bluetooth.

Review

Quoted 11 lines

- BCM_BT_SOURCES
- enable_bcm_bluetooth()
- BCM_BT_FIRMWARE
- BCM_BT_SERVICE

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/recipes-connectivity/bluez5/bluez5_%.bbappend

recipes-connectivity/bluez5/bluez5_%.bbappend line 6

Quoted 11 lines

index 956d776..b2fbf22 100644

recipes-connectivity/bluez5/bluez5_%.bbappend +1 -1
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_raspberrypi3 = " \
+BCM_BT_SOURCES =  " \
     file://BCM43430A1.hcd \
     file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
     file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch

\

recipes-connectivity/bluez5/bluez5_%.bbappend SRC_URI_append_raspberrypi3 = " \ · line 14

Quoted 8 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +1 -1
@@ -9,7 +9,7 @@ SRC_URI_append_raspberrypi3 = " \
     file://brcm43438.service \
     "
 
-do_install_append_raspberrypi3() {
+enable_bcm_bluetooth() {
     install -d ${D}/lib/firmware/brcm/
     install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/

BCM43430A1.hcd

Quoted 23 lines
recipes-connectivity/bluez5/bluez5_%.bbappend +12 -3
@@ -19,8 +19,18 @@ do_install_append_raspberrypi3() {
     fi
 }
 
-FILES_${PN}_append_raspberrypi3 = " \
+BCM_BT_FIRMWARE =  " \
     /lib/firmware/brcm/BCM43430A1.hcd \
     "
 
-SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+BCM_BT_SERVICE =  " brcm43438.service"
+
+SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
+
+do_install_append_raspberrypi3() {
+    enable_bcm_bluetooth
+}
+
+FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
--
Quoted 2 lines

2.7.4

This and the follow up patch look excellent, should be easy to modify in the future if we need to.

Quoted 5 lines

We have switched to using github pull requests for meta-raspberrypi. Could you open a pull request on
https://github.com/agherzan/meta-raspberrypi with these changes please? Let me know if you have any issues doing that.

+1 from my side. Thanks for this change. We still try to keep patches rolling to the mailing list too but the main development now happens through PRs in github.

--
Andrei Gherzan

#10 lore raw

Re: [meta-raspberrypi][PATCH v2 1/2] bluez5: add functions/variables to enabling bluetooth on another raspberrypi

Hello Andrei and Paul

Thanks for your replies.
I will create PR in github.

2017-09-07 2:52 GMT+09:00 Andrei Gherzan <[email protected]>:

Quoted 87 lines · Paul Barker
Quoted 74 lines
Quoted 65 lines · Yusuke Mitsuki

functions/variables in this bbappend implemented for only raspberrypi3. But these must be able to used to enabling bluetooth on another raspberrypi that has bluetooth feature such as raspberrypi0-wifi.

The simple solution is a duplicating these but it is not good ideas for maintainance.

Add functions/variables follows to simplify to enabling bluetooth on another raspberrypi that has bluetooth.
- BCM_BT_SOURCES
- enable_bcm_bluetooth()
- BCM_BT_FIRMWARE
- BCM_BT_SERVICE

---
 recipes-connectivity/bluez5/bluez5_%.bbappend | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
recipes-connectivity/bluez5/bluez5_%.bbappend +1 -1
index 956d776..b2fbf22 100644
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_raspberrypi3 = " \
+BCM_BT_SOURCES =  " \
     file://BCM43430A1.hcd \
     file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
 

file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \

recipes-connectivity/bluez5/bluez5_%.bbappend +1 -1
@@ -9,7 +9,7 @@ SRC_URI_append_raspberrypi3 = " \
     file://brcm43438.service \
     "
 
-do_install_append_raspberrypi3() {
+enable_bcm_bluetooth() {
     install -d ${D}/lib/firmware/brcm/
     install -m 0644 ${WORKDIR}/BCM43430A1.hcd

${D}/lib/firmware/brcm/BCM43430A1.hcd

recipes-connectivity/bluez5/bluez5_%.bbappend +12 -3
@@ -19,8 +19,18 @@ do_install_append_raspberrypi3() {
     fi
 }
 
-FILES_${PN}_append_raspberrypi3 = " \
+BCM_BT_FIRMWARE =  " \
     /lib/firmware/brcm/BCM43430A1.hcd \
     "
 
-SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
+BCM_BT_SERVICE =  " brcm43438.service"
+
+SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
+
+do_install_append_raspberrypi3() {
+    enable_bcm_bluetooth
+}
+
+FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
+
+SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
--
Quoted 2 lines

2.7.4

This and the follow up patch look excellent, should be easy to modify in the future if we need to.

Quoted 4 lines

We have switched to using github pull requests for meta-raspberrypi. Could you open a pull request on
https://github.com/agherzan/meta-raspberrypi with these changes please? Let me know if you have any issues doing that.

+1 from my side. Thanks for this change. We still try to keep patches rolling to the mailing list too but the main development now happens through PRs in github.

--
Andrei Gherzan