meta-agl-bsp: enable HCI UART for i.MX8MQ EVK
[AGL/meta-agl.git] / meta-agl-bsp / meta-freescale-layer / recipes-connectivity / hci-uart-helper / hci-uart-helper_1.0.bb
1 SUMMARY     = "Helper for enabling UART connected HCI Bluetooth devices"
2 LICENSE     = "MIT"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5 inherit systemd allarch
6
7 SRC_URI = "file://hci-uart-helper.service \
8            file://hci-uart-helper.sh \
9 "
10
11 COMPATIBLE_MACHINE = "imx8mqevk"
12
13 do_configure[noexec] = "1"
14 do_compile[noexec] = "1"
15
16 do_install() {
17     # Install helper script
18     install -d ${D}${sbindir}
19     install -m 0755 ${WORKDIR}/hci-uart-helper.sh ${D}${sbindir}/
20
21     # Install systemd unit
22     install -d ${D}${systemd_system_unitdir}/
23     install -m 0644 ${WORKDIR}/hci-uart-helper.service ${D}${systemd_system_unitdir}/
24     install -d ${D}${systemd_system_unitdir}/bluetooth.service.wants
25     ln -s ../hci-uart-helper.service ${D}${systemd_system_unitdir}/bluetooth.service.wants/
26 }
27
28 FILES_${PN} += "${systemd_system_unitdir}"
29
30 RDEPENDS_${PN} += "bluez5"