Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" |
| 2 | HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" |
| 3 | SECTION = "kernel" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "\ |
| 6 | file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ |
| 7 | " |
| 8 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 9 | SRC_URI = "\ |
| 10 | git://github.com/RPi-Distro/pi-bluetooth \ |
| 11 | file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \ |
| 12 | " |
| 13 | SRCREV = "2e1a393955910aea67bbf3c921be35a66e8a8fbe" |
| 14 | PV = "1.1+git${SRCPV}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | # hciuart.service replaces what was brcm43438.service |
| 19 | inherit systemd |
| 20 | SYSTEMD_SERVICE_${PN} = "\ |
| 21 | hciuart.service \ |
| 22 | bthelper@.service \ |
| 23 | " |
| 24 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | inherit allarch |
| 26 | |
| 27 | do_install() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 28 | install -d ${D}${sysconfdir}/udev/rules.d |
| 29 | install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d |
| 30 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 31 | install -d ${D}${bindir} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir} |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 33 | install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 40 | } |
| 41 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | FILES_${PN} = "\ |
| 43 | ${bindir} \ |
| 44 | ${sysconfdir} \ |
| 45 | ${systemd_unitdir}/system \ |
| 46 | " |