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/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb
index 062f9af..4959a3b 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb
@@ -23,7 +23,7 @@
 # Install the override to set up a Conflicts relation
 SYSTEMD_OVERRIDE_${PN} +="checkstop.conf:phosphor-gpio-monitor@checkstop.service.d/checkstop.conf"
 
-STATES = "start"
+STATES = "startmin"
 GPIO_MONITOR_TMPL = "phosphor-gpio-monitor@.service"
 GPIO_MONITOR_TGTFMT = "phosphor-gpio-monitor@{1}.service"
 CHECKSTOP_MONITOR_FMT = "../${GPIO_MONITOR_TMPL}:obmc-host-{0}@{2}.target.wants/${GPIO_MONITOR_TGTFMT}"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
index 0d7d534..24b1b9c 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
@@ -16,7 +16,7 @@
 
 TMPL = "start_host@.service"
 INSTFMT = "start_host@{0}.service"
-TGTFMT = "obmc-host-start@{0}.target"
+TGTFMT = "obmc-host-startmin@{0}.target"
 FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
 
 SYSTEMD_SERVICE_${PN} += "${TMPL}"
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
index a113045..a07f3ce 100644
--- 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
@@ -50,10 +50,10 @@
 
 OCC_ENABLE = "enable"
 OCC_DISABLE = "disable"
-HOST_START = "start"
+HOST_START = "startmin"
 HOST_STOP = "stop"
 
-# Ensure host-stop and host-start targets require needed occ states
+# Ensure host-stop and host-startmin targets require needed occ states
 OCC_TMPL = "op-occ-{0}@.service"
 HOST_TGTFMT = "obmc-host-{1}@{2}.target"
 OCC_INSTFMT = "op-occ-{0}@{2}.service"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/avsbus-disable@.service b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/avsbus-disable@.service
index 39da992..9cf322b 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/avsbus-disable@.service
+++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/avsbus-disable@.service
@@ -2,7 +2,7 @@
 Description=Disable AVSBus on VRMs
 Wants=obmc-power-stop-pre@%i.target
 Before=obmc-power-stop-pre@%i.target
-Conflicts=obmc-host-start@%i.target
+Conflicts=obmc-host-startmin@%i.target
 ConditionPathExists=!/run/openbmc/chassis@%i-on
 
 [Service]
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/vcs-off@.service b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/vcs-off@.service
index f809ca4..d230781 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/vcs-off@.service
+++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/vcs-off@.service
@@ -2,7 +2,7 @@
 Description=Turn VCS rails off
 Wants=obmc-power-stop-pre@%i.target
 Before=obmc-power-stop-pre@%i.target
-Conflicts=obmc-host-start@%i.target
+Conflicts=obmc-host-startmin@%i.target
 
 [Service]
 ExecStart=/usr/bin/env zaius_vcs.sh off