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>
diff --git a/common/recipes-core/systemd/obmc-targets.bb b/common/recipes-core/systemd/obmc-targets.bb
index 26fbcd1..ac7835e 100644
--- a/common/recipes-core/systemd/obmc-targets.bb
+++ b/common/recipes-core/systemd/obmc-targets.bb
@@ -32,7 +32,12 @@
HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running"
# Track all host action targets
-# - start: Service to run to start the host
+# - start: Will run startmin target, this target used for any additional
+# services that user needs for an initial power on of host.
+# For example, resetting the host reboot count could be put in
+# this target so on any fresh power on, this count is reset.
+# - startmin: Minimum services required to start the host. This target will
+# be called by reboot and start target.
# - stop: Services to run to shutdown the host
# - quiesce: Target to enter on host boot failure
# - shutdown: Tell host to shutdown, then stop system
@@ -42,7 +47,7 @@
# multiple services and one of them is the quiesce target.
# - timeout: Target to run when host watchdog times out
# - reboot: Reboot the host
-HOST_ACTION_TARGETS = "start stop quiesce reset shutdown crash timeout reboot"
+HOST_ACTION_TARGETS = "start startmin stop quiesce reset shutdown crash timeout reboot"
CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target"
CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target"