meta-facebook: phosphor-state-manager: support host power reset and chassis power cycle
Summary:
Add service and script to support host reset and chassis
power cycle.
Tested:
Change property to trigger host and chassis
target and check the power status.
Change-Id: Ie21903f5bc5bbebeaf31153c52d1605cd35619a0
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
index 53f7f8c..42c7117 100644
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
+++ b/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -1,27 +1,37 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-DEFAULT_TARGETS:append = " \
- obmc-chassis-poweron@{}.target.wants/chassis-poweron@{}.service \
- obmc-chassis-hard-poweroff@{}.target.wants/chassis-poweroff@{}.service \
+HOST_DEFAULT_TARGETS:append = " \
obmc-host-shutdown@{}.target.wants/host-poweroff@{}.service \
obmc-host-start@{}.target.wants/host-poweron@{}.service \
obmc-host-reboot@{}.target.wants/host-powercycle@{}.service \
+ obmc-host-force-warm-reboot@{}.target.wants/host-powerreset@{}.service \
"
-DEFAULT_TARGETS:remove = " \
+
+CHASSIS_DEFAULT_TARGETS:append = " \
+ obmc-chassis-poweron@{}.target.wants/chassis-poweron@{}.service \
+ obmc-chassis-hard-poweroff@{}.target.wants/chassis-poweroff@{}.service \
+ obmc-chassis-powercycle@{}.target.wants/chassis-powercycle@{}.service \
+"
+
+CHASSIS_DEFAULT_TARGETS:remove = " \
obmc-chassis-poweroff@{}.target.requires/obmc-powered-off@{}.service \
"
SRC_URI:append:greatlakes = " \
file://chassis-poweroff@.service \
file://chassis-poweron@.service \
+ file://chassis-powercycle@.service \
file://host-poweroff@.service \
file://host-poweron@.service \
file://host-powercycle@.service \
+ file://host-powerreset@.service \
file://chassis-poweroff \
file://chassis-poweron \
+ file://chassis-powercycle \
file://host-poweroff \
file://host-poweron \
file://host-powercycle \
+ file://host-powerreset \
file://power-cmd \
"
@@ -34,9 +44,11 @@
install -d ${D}${libexecdir}
install -m 0777 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/
install -m 0777 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/
+ install -m 0777 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/
install -m 0777 ${WORKDIR}/host-poweroff ${D}${libexecdir}/
install -m 0777 ${WORKDIR}/host-poweron ${D}${libexecdir}/
install -m 0777 ${WORKDIR}/host-powercycle ${D}${libexecdir}/
+ install -m 0777 ${WORKDIR}/host-powerreset ${D}${libexecdir}/
install -m 0777 ${WORKDIR}/power-cmd ${D}${libexecdir}/
}
FILES:${PN} += " /lib/systemd/system/*.service"