Make phosphor-ipmi-kcs parameterized by device

The end goal is to run one ipmi bridge per interface, so that stopping
that bridge will effectively shut down ipmi on that interface.

By default, this enables KCS on /dev/ipmi-kcs3. If more than one KCS
interface is desired, they can be added in a bbbappend as follows:

phosphor-ipmi-kcs_%.bbappend:

ALT_KCS_DEV = "ipmi-kcs4"
SYSTEMD_SERVICE_${PN} += " \
    ${PN}@${ALT_KCS_DEV}.service \
    "

(From meta-phosphor rev: ed16aacb16b908a1bc0c46b7dff54c13802d3aa0)

Change-Id: Ib8acf989721f22abf9a95f006b12486972fd6f5a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service
deleted file mode 100644
index 328491f..0000000
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Phosphor IPMI KCS DBus Bridge
-
-[Service]
-Restart=always
-ExecStart={bindir}/kcsbridged --d="/dev/{KCS_DEVICE}"
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
index f50b354..652d83c 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
@@ -6,14 +6,14 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b1beb00e508e89da1ed2a541934f28c0"
 
 inherit autotools pkgconfig
-inherit obmc-phosphor-dbus-service
+inherit systemd
 
 PV = "1.0+git${SRCPV}"
 
 KCS_DEVICE ?= "ipmi-kcs3"
 
-DBUS_SERVICE_${PN} = "org.openbmc.HostIpmi.service"
-SYSTEMD_SUBSTITUTIONS += "KCS_DEVICE:${KCS_DEVICE}:org.openbmc.HostIpmi.service"
+SYSTEMD_SERVICE_${PN} = " ${PN}@${KCS_DEVICE}.service "
+FILES_${PN} += " ${systemd_system_unitdir}/${PN}@.service "
 
 PROVIDES += "virtual/obmc-host-ipmi-hw"
 RPROVIDES_${PN} += "virtual-obmc-host-ipmi-hw"
@@ -30,7 +30,7 @@
 
 S = "${WORKDIR}/git"
 SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "9ce5a9a0ba3fc08bf8f44f0582ea6df5819c09f3"
+SRCREV = "87e8e61c83da593a1cc271ab511313b14a321bfe"
 
 # This is how linux-libc-headers says to include custom uapi headers
 CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi"