summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/pi-bluetooth
diff options
context:
space:
mode:
authorPeter A. Bigot <pab@pabigot.com>2018-11-14 07:48:51 -0600
committerAndrei Gherzan <andrei@gherzan.ro>2018-11-23 16:25:34 +0200
commitf752e9238366db7a6e134bbc00ef1f7697cb7eba (patch)
treed66af7c4f2c9c152711fa9a78497f6ffc93ddeb7 /recipes-connectivity/pi-bluetooth
parentbfc35b773ff405394d066d7d8efb32ced3ac0410 (diff)
downloadmeta-raspberrypi-f752e9238366db7a6e134bbc00ef1f7697cb7eba.tar.gz
bluez5: use pi-bluetooth package for startup infrastructure
RPi-Distro has augmented their bluetooth infrastructure to support new features. It also correctly handles restart, which fixes problems when faults cause hciattach to exit. Replace brcm43438.service with the upstream ones. Resolves: #330 Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Diffstat (limited to 'recipes-connectivity/pi-bluetooth')
-rw-r--r--recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch28
-rw-r--r--recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb32
2 files changed, 56 insertions, 4 deletions
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
new file mode 100644
index 0000000..4583905
--- /dev/null
+++ b/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch
@@ -0,0 +1,28 @@
1From af91c96951a11f81f5cea88a0010161592c89310 Mon Sep 17 00:00:00 2001
2From: "Peter A. Bigot" <pab@pabigot.com>
3Date: Wed, 14 Nov 2018 09:19:51 -0600
4Subject: [PATCH] bthelper: correct path for hciconfig under Yocto
5
6Upstream-Status: Inapproprate [OE-specific]
7Signed-off-by: Peter A. Bigot <pab@pabigot.com>
8---
9 usr/bin/bthelper | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/usr/bin/bthelper b/usr/bin/bthelper
13index 255fdeb..4e1a1a4 100755
14--- a/usr/bin/bthelper
15+++ b/usr/bin/bthelper
16@@ -10,7 +10,7 @@ fi
17
18 dev="$1"
19 # Need to bring hci up before looking at MAC as it can be all zeros during init
20-/bin/hciconfig "$dev" up
21-/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0
22+/usr/bin/hciconfig "$dev" up
23+/usr/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0
24 /usr/bin/hcitool -i "$dev" cmd 0x3f 0x1c 0x01 0x02 0x00 0x01 0x01 > /dev/null
25
26--
272.17.1
28
diff --git a/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb b/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb
index e185f25..b2401b9 100644
--- a/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb
+++ b/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb
@@ -6,17 +6,41 @@ LIC_FILES_CHKSUM = "\
6 file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ 6 file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \
7" 7"
8 8
9SRC_URI = "git://github.com/RPi-Distro/pi-bluetooth" 9SRC_URI = "\
10SRCREV = "2a7477966bb3c69838b224f3ea92cb49a88124d5" 10 git://github.com/RPi-Distro/pi-bluetooth \
11UPSTREAM_VERSION_UNKNOWN = "1" 11 file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \
12"
13SRCREV = "2e1a393955910aea67bbf3c921be35a66e8a8fbe"
14PV = "1.1+git${SRCPV}"
12 15
13S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
14 17
18# hciuart.service replaces what was brcm43438.service
19inherit systemd
20SYSTEMD_SERVICE_${PN} = "\
21 hciuart.service \
22 bthelper@.service \
23"
24
15inherit allarch 25inherit allarch
16 26
17do_install() { 27do_install() {
28 install -d ${D}${sysconfdir}/udev/rules.d
29 install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d
30
18 install -d ${D}${bindir} 31 install -d ${D}${bindir}
32 install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir}
19 install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} 33 install -m 0755 ${S}/usr/bin/btuart ${D}${bindir}
34
35 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
36 install -d ${D}${systemd_system_unitdir}
37 install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service
38 install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service
39 fi
20} 40}
21 41
22FILES_${PN} = "${bindir}" 42FILES_${PN} = "\
43 ${bindir} \
44 ${sysconfdir} \
45 ${systemd_unitdir}/system \
46"