summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/state
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2018-03-27 13:56:26 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-04-06 00:44:50 +0000
commit5c76e0cf9f742cae4156c30c033af50be1135ab7 (patch)
treeb69cfbba5ec42153f48164c902945bc2328c4ad2 /meta-phosphor/common/recipes-phosphor/state
parentd1ce2b877602202f89f3f55864e83e7ca2764194 (diff)
downloadtalos-openbmc-5c76e0cf9f742cae4156c30c033af50be1135ab7.tar.gz
talos-openbmc-5c76e0cf9f742cae4156c30c033af50be1135ab7.zip
Introduce new host-startmin action target
Requirements have arisen for OpenBMC firmware to run certain services only during fresh power on operations. To achieve that, break the obmc-host-start action target into two targets. The existing obmc-host-start target will now call the new obmc-host-startmin target. The startmin target will be the minimum services required to start the host. The obmc-host-start target is where services that should only be called during a fresh power on can be placed. The initial use case for this is the obmc-host-reboot target. It will call this new obmc-host-startmin target to do the bare minimum on a reboot operation. This then allows the use case for OpenBMC to only reset the host reboot count on a fresh power on operation. A new service will be added to the obmc-host-start target to do this. If a reboot operation is issued, or a host watchdog is triggered to cause a reboot, this service would not be started, ensuring the reboot count is properly decremented. Tested: Verified on/off/reboot and ran CT regression suite. https://gerrit.openbmc-project.xyz/#/c/9821/ is required for reboots to work properly. Change-Id: I86df03e6d671178c1525f852e196c4102bb73cb6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/state')
-rw-r--r--meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service4
-rw-r--r--meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb11
2 files changed, 12 insertions, 3 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
index f8f017105..6158086e1 100644
--- a/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
+++ b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
@@ -9,7 +9,9 @@ After=obmc-host-stop@%i.target
# target this service is running in. OpenBMC needs a refactor of
# how it does its host reset path. Until then, this short term
# solution does the job.
-ExecStart=/bin/sh -c "sleep 5 && systemctl start obmc-host-start@%i.target"
+# Since this is a part of the reboot target, call the startmin
+# target which does the minimum required to start the host.
+ExecStart=/bin/sh -c "sleep 5 && systemctl start obmc-host-startmin@%i.target"
[Install]
diff --git a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
index 67988f538..993615651 100644
--- a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
@@ -116,13 +116,20 @@ HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target"
HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}"
SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}"
-# And also force the reboot target to call the host start service
+# And also force the reboot target to call the host startmin service
HOST_REBOOT_SVC = "phosphor-reboot-host@.service"
HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service"
HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}"
SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+# Force the host-start target to call the host-startmin target
+HOST_STARTMIN_TMPL = "obmc-host-startmin@.target"
+HOST_START_TGTFMT = "obmc-host-start@{0}.target"
+HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target"
+HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}"
+SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}"
+
SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
-SRCREV = "90e5ae705afa8b63e41815a57cf5858b4ca7e710"
+SRCREV = "969b2613fed44f5b504411b21a9c65d89ed28bf5"
S = "${WORKDIR}/git"
OpenPOWER on IntegriCloud