blob: a1eb97fe80ffca9dc84aca291c3e5ea8d042062f [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi"
2HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth"
3SECTION = "kernel"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "\
6 file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \
7"
8
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009SRC_URI = "\
10 git://github.com/RPi-Distro/pi-bluetooth \
11 file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \
12"
Andrew Geisslera4353c82021-06-25 14:23:27 -050013SRCREV = "fd4775bf90e037551532fc214a958074830bb80d"
Brad Bishop316dfdd2018-06-25 12:45:53 -040014
15S = "${WORKDIR}/git"
16
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017# hciuart.service replaces what was brcm43438.service
18inherit systemd
19SYSTEMD_SERVICE_${PN} = "\
20 hciuart.service \
21 bthelper@.service \
22"
23
Brad Bishop316dfdd2018-06-25 12:45:53 -040024do_install() {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025 install -d ${D}${sysconfdir}/udev/rules.d
26 install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d
27
Brad Bishop316dfdd2018-06-25 12:45:53 -040028 install -d ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir}
Brad Bishop316dfdd2018-06-25 12:45:53 -040030 install -m 0755 ${S}/usr/bin/btuart ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031
32 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
33 install -d ${D}${systemd_system_unitdir}
34 install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service
35 install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service
36 fi
Brad Bishop316dfdd2018-06-25 12:45:53 -040037}
38
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039FILES_${PN} = "\
40 ${bindir} \
41 ${sysconfdir} \
42 ${systemd_unitdir}/system \
43"
Brad Bishop870eb532020-01-06 09:44:45 -050044
45RDEPENDS_${PN} += " \
46 udev-rules-rpi \
47"