meta-amd: Add recipe for power control.
This patch adds gpio configuration and power-util script for power on,
off and reset.
Change-Id: I43d80f02ae5dce21c6639430dac76989ada287eb
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@amd.com>
diff --git a/recipes-amd/amd-powerctrl/amd-powerctrl.bb b/recipes-amd/amd-powerctrl/amd-powerctrl.bb
new file mode 100644
index 0000000..a94356f
--- /dev/null
+++ b/recipes-amd/amd-powerctrl/amd-powerctrl.bb
@@ -0,0 +1,26 @@
+FILESEXTRAPATHS_append := "${THISDIR}/files:"
+
+inherit obmc-phosphor-systemd
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ab6ba4709f1286c534f36392ac1dcd27"
+
+S = "${WORKDIR}/"
+
+SRC_URI = "file://setup_gpio.sh \
+ file://power-util \
+ file://host-gpio.service \
+ file://host-poweroff.service \
+ file://host-poweron.service \
+ file://LICENSE"
+
+DEPENDS = "systemd"
+RDEPENDS_${PN} = "bash"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "host-gpio.service host-poweron.service host-poweroff.service"
+
+do_install() {
+ install -d ${D}/usr/sbin
+ install -m 0755 ${S}setup_gpio.sh ${D}/${sbindir}/
+ install -m 0755 ${S}power-util ${D}/${sbindir}/
+}