openpower-occ-control: initial recipe
Resolves openbmc/openbmc#1040.
Change-Id: I692812389b5bc078da510c8df23b37475188b9b0
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
new file mode 100644
index 0000000..f3d6373
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
@@ -0,0 +1,27 @@
+SUMMARY = "OpenPOWER OCC controller"
+DESCRIPTION = "Application to contol the OpenPOWER On-Chip-Controller"
+HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
+PR = "r1"
+
+inherit autotools pkgconfig
+
+require ${PN}.inc
+
+DBUS_SERVICE_${PN} += "org.open_power.OCC.PassThrough.service"
+
+DEPENDS += " \
+ sdbusplus \
+ sdbusplus-native \
+ phosphor-logging \
+ openpower-dbus-interfaces \
+ openpower-dbus-interfaces-native \
+ autoconf-archive-native \
+ "
+
+RDEPENDS_${PN} += " \
+ sdbusplus \
+ phosphor-logging \
+ openpower-dbus-interfaces \
+ "
+
+S = "${WORKDIR}/git"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
new file mode 100644
index 0000000..6e75638
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/openpower-occ-control"
+SRCREV = "02ba9ecca446f606a26e897cd9381e26d3abeb53"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.PassThrough.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.PassThrough.service
new file mode 100644
index 0000000..dbf34d5
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.PassThrough.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenPOWER OCC controller
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+ExecStart={sbindir}/openpower-occ-control
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}