aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch13
-rw-r--r--recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch16
-rw-r--r--recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch13
-rw-r--r--recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch25
-rw-r--r--recipes-connectivity/bluez5/bluez5/0004-Move-the-hciattach-firmware-into-lib-firmware.patch31
-rw-r--r--recipes-connectivity/bluez5/bluez5_%.bbappend8
-rw-r--r--recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch35
-rw-r--r--recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.17.bb (renamed from recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb)22
8 files changed, 95 insertions, 68 deletions
diff --git a/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch
index 3bc02c4..b019743 100644
--- a/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch
+++ b/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch
@@ -1,17 +1,19 @@
-From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
+From 8e8321cd597d3d9d342a8a3533ad10751dde5885 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:40:46 +0000
-Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
+Subject: [PATCH] bcm43xx: Add bcm43xx-3wire variant
---
+Upstream-Status: Pending
+
tools/hciattach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hciattach.c b/tools/hciattach.c
-index 59a76a7..5861d33 100644
+index 276a4e56e..7d01d8b74 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
-@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
+@@ -1078,6 +1078,9 @@ struct uart_t uart[] = {
{ "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
@@ -21,6 +23,3 @@ index 59a76a7..5861d33 100644
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
---
-1.9.1
-
diff --git a/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch b/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
index 5a0a434..6c13490 100644
--- a/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
+++ b/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
@@ -1,17 +1,20 @@
-From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
+From 96e5e5eef04c6c4ae83d4d822a536cfa87605ae2 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:39:09 +0000
-Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware download
+Subject: [PATCH] bcm43xx: The UART speed must be reset after the firmware
+ download
---
+Upstream-Status: Pending
+
tools/hciattach_bcm43xx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
-index 81f38cb..0b792e0 100644
+index b89fc1b50..de01a6aea 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
-@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
+@@ -350,11 +350,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
@@ -24,7 +27,7 @@ index 81f38cb..0b792e0 100644
if (bcm43xx_load_firmware(fd, fw_path))
return -1;
-@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
+@@ -364,6 +361,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
}
@@ -32,6 +35,3 @@ index 81f38cb..0b792e0 100644
if (bcm43xx_reset(fd))
return -1;
}
---
-1.9.1
-
diff --git a/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch b/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch
index f9f09eb..1529023 100644
--- a/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch
+++ b/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch
@@ -1,17 +1,19 @@
-From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
+From 05c3e145b5aa62e7e759932ea99f94d495b651c3 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 20 Jan 2016 16:00:37 +0000
-Subject: [PATCH 3/4] Increase firmware load timeout to 30s
+Subject: [PATCH] Increase firmware load timeout to 30s
---
+Upstream-Status: Pending
+
tools/hciattach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
-index 5861d33..4141796 100644
+index 7d01d8b74..465bb17dd 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
-@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
+@@ -1227,7 +1227,7 @@ int main(int argc, char *argv[])
{
struct uart_t *u = NULL;
int detach, printpid, raw, opt, i, n, ld, err;
@@ -20,6 +22,3 @@ index 5861d33..4141796 100644
int init_speed = 0;
int send_break = 0;
pid_t pid;
---
-1.9.1
-
diff --git a/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch b/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch
deleted file mode 100644
index dadce35..0000000
--- a/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil@raspberrypi.org>
-Date: Tue, 23 Feb 2016 17:52:29 +0000
-Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
-
----
- tools/hciattach_bcm43xx.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
-index 0b792e0..207f668 100644
---- a/tools/hciattach_bcm43xx.c
-+++ b/tools/hciattach_bcm43xx.c
-@@ -43,7 +43,7 @@
- #include "hciattach.h"
-
- #ifndef FIRMWARE_DIR
--#define FIRMWARE_DIR "/etc/firmware"
-+#define FIRMWARE_DIR "/lib/firmware"
- #endif
-
- #define FW_EXT ".hcd"
---
-1.9.1
-
diff --git a/recipes-connectivity/bluez5/bluez5/0004-Move-the-hciattach-firmware-into-lib-firmware.patch b/recipes-connectivity/bluez5/bluez5/0004-Move-the-hciattach-firmware-into-lib-firmware.patch
new file mode 100644
index 0000000..9cf03ed
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5/0004-Move-the-hciattach-firmware-into-lib-firmware.patch
@@ -0,0 +1,31 @@
+From 744f894e42d05b1dee917cc221ed3c1815990459 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 23 Feb 2016 17:52:29 +0000
+Subject: [PATCH] Move the hciattach firmware into /lib/firmware
+
+* FIRMWARE_DIR is now used by all hciattach firmware (not just bcm43xx) since 5.66 with:
+ commit d9253248363b995e44c1f5e393ed1c7aa4ec81ce
+ Author: Marek Vasut <marex@denx.de>
+ Date: Tue Nov 1 12:53:33 2022 +0100
+ Subject: tools: Make hciattach_* firmware path build-time configurable
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+Upstream-Status: Pending
+
+ tools/hciattach.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/hciattach.h b/tools/hciattach.h
+index dfa4c1e7a..e88484766 100644
+--- a/tools/hciattach.h
++++ b/tools/hciattach.h
+@@ -41,7 +41,7 @@
+ #define HCI_UART_VND_DETECT 5
+
+ #ifndef FIRMWARE_DIR
+-#define FIRMWARE_DIR "/etc/firmware"
++#define FIRMWARE_DIR "/lib/firmware"
+ #endif
+
+ int read_hci_event(int fd, unsigned char *buf, int size);
diff --git a/recipes-connectivity/bluez5/bluez5_%.bbappend b/recipes-connectivity/bluez5/bluez5_%.bbappend
index d1a07a4..c5d905b 100644
--- a/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -1,10 +1,10 @@
-FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend:rpi := "${THISDIR}/${PN}:"
-SRC_URI_append_rpi = "\
+SRC_URI:append:rpi = "\
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://0004-Move-the-hciattach-firmware-into-lib-firmware.patch \
"
-RDEPENDS_${PN}_append_rpi = " pi-bluetooth"
+RDEPENDS:${PN}:append:rpi = " pi-bluetooth"
diff --git a/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch b/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch
index 45b43c7..8766a77 100644
--- a/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch
+++ b/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch
@@ -3,25 +3,38 @@ From: "Peter A. Bigot" <pab@pabigot.com>
Date: Wed, 14 Nov 2018 09:19:51 -0600
Subject: [PATCH] bthelper: correct path for hciconfig under Yocto
-Upstream-Status: Inapproprate [OE-specific]
+Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
- usr/bin/bthelper | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ usr/bin/bthelper | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr/bin/bthelper b/usr/bin/bthelper
-index af597e5..5de84f6 100755
+index 2133fbc..1fc9245 100755
--- a/usr/bin/bthelper
+++ b/usr/bin/bthelper
-@@ -10,7 +10,7 @@ fi
+@@ -12,8 +12,8 @@ fi
+ dev=$1
- dev="$1"
# Need to bring hci up before looking at MAC as it can be all zeros during init
--/bin/hciconfig "$dev" up
--/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0
-+/usr/bin/hciconfig "$dev" up
-+/usr/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0
- /usr/bin/hcitool -i "$dev" cmd 0x3f 0x1c 0x01 0x02 0x00 0x01 0x01 > /dev/null
+-/bin/hciconfig $dev up
+-if ! /bin/hciconfig $dev | grep -q "Bus: UART"; then
++/usr/bin/hciconfig $dev up
++if ! /usr/bin/hciconfig $dev | grep -q "Bus: UART"; then
+ echo Not a UART-attached BT Modem
+ exit 0
+ fi
+@@ -26,7 +26,7 @@ if ( /usr/bin/hcitool -i $dev dev | grep -q -E '\s43:4[35]:' ); then
+ BDADDR=`printf '0x%02x 0x%02x 0x%02x 0xeb 0x27 0xb8' $((0x$B3 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B1 ^ 0xaa))`
+ /usr/bin/hcitool -i $dev cmd 0x3f 0x001 $BDADDR
+- /bin/hciconfig $dev reset
++ /usr/bin/hciconfig $dev reset
+ else
+ echo Raspberry Pi BDADDR already set
+ fi
+--
+2.31.1
+
diff --git a/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb b/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.17.bb
index ccf714b..1c3daff 100644
--- a/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb
+++ b/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.17.bb
@@ -7,19 +7,21 @@ LIC_FILES_CHKSUM = "\
"
SRC_URI = "\
- git://github.com/RPi-Distro/pi-bluetooth \
+ git://github.com/RPi-Distro/pi-bluetooth;branch=master;protocol=https \
file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \
"
-SRCREV = "cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace"
+SRCREV = "fd4775bf90e037551532fc214a958074830bb80d"
S = "${WORKDIR}/git"
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'update-rc.d', d)}
# hciuart.service replaces what was brcm43438.service
-inherit systemd
-SYSTEMD_SERVICE_${PN} = "\
+SYSTEMD_SERVICE:${PN} = "\
hciuart.service \
bthelper@.service \
"
+INITSCRIPT_NAME = "btuart"
+INITSCRIPT_PARAMS = "start 18 2 3 4 5 ."
do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
@@ -33,15 +35,23 @@ do_install() {
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service
install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service
+ else
+ install -d ${D}${sysconfdir}/init.d/
+ cat > ${WORKDIR}/btuart.init << EOF
+#!/bin/sh
+/usr/bin/btuart
+EOF
+ install -m 0755 ${WORKDIR}/btuart.init ${D}${sysconfdir}/init.d/btuart
+ sed -i -e 's:TAG+="systemd".*$:RUN+="/usr/bin/bthelper %k":' ${D}${sysconfdir}/udev/rules.d/90-pi-bluetooth.rules
fi
}
-FILES_${PN} = "\
+FILES:${PN} = "\
${bindir} \
${sysconfdir} \
${systemd_unitdir}/system \
"
-RDEPENDS_${PN} += " \
+RDEPENDS:${PN} += " \
udev-rules-rpi \
"