ti-bt: add a systemd unit and enable
authorMatt Porter <mporter@konsulko.com>
Wed, 13 Dec 2017 15:55:51 +0000 (10:55 -0500)
committerHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Tue, 20 Mar 2018 10:03:44 +0000 (19:03 +0900)
We need to provide a systemd unit for UIM to be started at boot.  We
also do not want the blacklist that Cogent has created, so delete that.

Bug-AGL: SPEC-1175
Change-Id: Ia35a6007722d4e42a7a76fe9d8d26b90b073f73b
Signed-off-by: Matt Porter <mporter@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service [new file with mode: 0644]
meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend [new file with mode: 0644]

diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service
new file mode 100644 (file)
index 0000000..214e607
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=User Mode Init Manager for TI shared transport
+Before=bluetooth.service
+
+[Service]
+ExecStartPre=-/sbin/modprobe -q btwilink
+ExecStart=/usr/bin/uim -f /sys/devices/platform/kim
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend
new file mode 100644 (file)
index 0000000..45138b6
--- /dev/null
@@ -0,0 +1,15 @@
+inherit systemd
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://ti-uim.service"
+
+SYSTEMD_SERVICE_${PN} = "ti-uim.service"
+
+do_install_append() {
+    # We do not want the blacklist
+    rm -f ${D}/${sysconfdir}/modprobe.d/ti_bt.conf
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/ti-uim.service ${D}${systemd_unitdir}/system
+}