diff options
4 files changed, 59 insertions, 50 deletions
diff --git a/recipes-connectivity/bluez5/bluez5/brcm43438.service b/recipes-connectivity/bluez5/bluez5/brcm43438.service deleted file mode 100644 index a51f6bc..0000000 --- a/recipes-connectivity/bluez5/bluez5/brcm43438.service +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Broadcom BCM43438 bluetooth HCI | ||
| 3 | ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins | ||
| 4 | Before=bluetooth.service | ||
| 5 | BindsTo=dev-serial1.device | ||
| 6 | After=dev-serial1.device | ||
| 7 | |||
| 8 | [Service] | ||
| 9 | Type=oneshot | ||
| 10 | RemainAfterExit=yes | ||
| 11 | ExecStart=/usr/bin/btuart | ||
| 12 | |||
| 13 | [Install] | ||
| 14 | WantedBy=multi-user.target | ||
diff --git a/recipes-connectivity/bluez5/bluez5_%.bbappend b/recipes-connectivity/bluez5/bluez5_%.bbappend index d1b84df..6651fb8 100644 --- a/recipes-connectivity/bluez5/bluez5_%.bbappend +++ b/recipes-connectivity/bluez5/bluez5_%.bbappend | |||
| @@ -5,41 +5,12 @@ BCM_BT_SOURCES = " \ | |||
| 5 | file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \ | 5 | file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \ |
| 6 | file://0003-Increase-firmware-load-timeout-to-30s.patch \ | 6 | file://0003-Increase-firmware-load-timeout-to-30s.patch \ |
| 7 | file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \ | 7 | file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \ |
| 8 | file://brcm43438.service \ | ||
| 9 | " | ||
| 10 | |||
| 11 | BCM_BT_SERVICE = "brcm43438.service" | ||
| 12 | |||
| 13 | enable_bcm_bluetooth() { | ||
| 14 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 15 | install -d ${D}${systemd_unitdir}/system | ||
| 16 | install -m 0644 ${WORKDIR}/${BCM_BT_SERVICE} ${D}${systemd_unitdir}/system | ||
| 17 | fi | ||
| 18 | } | ||
| 19 | |||
| 20 | BCM_BT_RDEPENDS = "\ | ||
| 21 | udev-rules-rpi \ | ||
| 22 | pi-bluetooth \ | ||
| 23 | " | 8 | " |
| 24 | 9 | ||
| 25 | # for raspberrypi3 | 10 | BCM_BT_RDEPENDS = "pi-bluetooth" |
| 26 | SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}" | ||
| 27 | |||
| 28 | do_install_append_raspberrypi3() { | ||
| 29 | enable_bcm_bluetooth | ||
| 30 | } | ||
| 31 | |||
| 32 | SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}" | ||
| 33 | 11 | ||
| 34 | RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}" | ||
| 35 | |||
| 36 | # for raspberrypi0-wifi | ||
| 37 | SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}" | 12 | SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}" |
| 38 | 13 | SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}" | |
| 39 | do_install_append_raspberrypi0-wifi() { | ||
| 40 | enable_bcm_bluetooth | ||
| 41 | } | ||
| 42 | |||
| 43 | SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_SERVICE}" | ||
| 44 | 14 | ||
| 45 | RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}" | 15 | RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}" |
| 16 | RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}" | ||
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 @@ | |||
| 1 | From af91c96951a11f81f5cea88a0010161592c89310 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Peter A. Bigot" <pab@pabigot.com> | ||
| 3 | Date: Wed, 14 Nov 2018 09:19:51 -0600 | ||
| 4 | Subject: [PATCH] bthelper: correct path for hciconfig under Yocto | ||
| 5 | |||
| 6 | Upstream-Status: Inapproprate [OE-specific] | ||
| 7 | Signed-off-by: Peter A. Bigot <pab@pabigot.com> | ||
| 8 | --- | ||
| 9 | usr/bin/bthelper | 4 ++-- | ||
| 10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/usr/bin/bthelper b/usr/bin/bthelper | ||
| 13 | index 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 | -- | ||
| 27 | 2.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 | ||
| 9 | SRC_URI = "git://github.com/RPi-Distro/pi-bluetooth" | 9 | SRC_URI = "\ |
| 10 | SRCREV = "2a7477966bb3c69838b224f3ea92cb49a88124d5" | 10 | git://github.com/RPi-Distro/pi-bluetooth \ |
| 11 | UPSTREAM_VERSION_UNKNOWN = "1" | 11 | file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \ |
| 12 | " | ||
| 13 | SRCREV = "2e1a393955910aea67bbf3c921be35a66e8a8fbe" | ||
| 14 | PV = "1.1+git${SRCPV}" | ||
| 12 | 15 | ||
| 13 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 14 | 17 | ||
| 18 | # hciuart.service replaces what was brcm43438.service | ||
| 19 | inherit systemd | ||
| 20 | SYSTEMD_SERVICE_${PN} = "\ | ||
| 21 | hciuart.service \ | ||
| 22 | bthelper@.service \ | ||
| 23 | " | ||
| 24 | |||
| 15 | inherit allarch | 25 | inherit allarch |
| 16 | 26 | ||
| 17 | do_install() { | 27 | do_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 | ||
| 22 | FILES_${PN} = "${bindir}" | 42 | FILES_${PN} = "\ |
| 43 | ${bindir} \ | ||
| 44 | ${sysconfdir} \ | ||
| 45 | ${systemd_unitdir}/system \ | ||
| 46 | " | ||
