meta-google: ipmi: add target for disabling ipmi in bare metal

Change-Id: Icb932ef7505f7177ff5b2b9bfeb2fd31352523eb
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/meta-google/recipes-google/ipmi/bare-metal-active.bb b/meta-google/recipes-google/ipmi/bare-metal-active.bb
new file mode 100644
index 0000000..181b741
--- /dev/null
+++ b/meta-google/recipes-google/ipmi/bare-metal-active.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Systemd target for enable/disable ipmi in bare-metal setup"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://gbmc-bare-metal-active.target"
+S = "${WORKDIR}"
+
+DEPENDS += " \
+  systemd \
+  "
+
+inherit systemd
+
+SYSTEMD_SERVICE:${PN} += " \
+  gbmc-bare-metal-active.target \
+  "
+
+do_install() {
+  install -d -m0755 ${D}${systemd_system_unitdir}
+  install -m0644 ${WORKDIR}/gbmc-bare-metal-active.target ${D}${systemd_system_unitdir}/
+}
diff --git a/meta-google/recipes-google/ipmi/bare-metal-active/gbmc-bare-metal-active.target b/meta-google/recipes-google/ipmi/bare-metal-active/gbmc-bare-metal-active.target
new file mode 100644
index 0000000..736aed3
--- /dev/null
+++ b/meta-google/recipes-google/ipmi/bare-metal-active/gbmc-bare-metal-active.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Untrusted customer OS is running on host CPU