Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 1 | SUMMARY = "Phosphor State Management" |
| 2 | DESCRIPTION = "Phosphor State Manager provides a set of system state \ |
| 3 | management daemons. It is suitable for use on a wide variety of OpenBMC \ |
| 4 | platforms." |
| 5 | HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager" |
| 6 | PR = "r1" |
Patrick Venture | e22ac6b | 2018-10-21 08:23:40 -0700 | [diff] [blame] | 7 | PV = "1.0+git${SRCPV}" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 8 | LICENSE = "Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 10 | |
| 11 | STATE_MGR_PACKAGES = " \ |
| 12 | ${PN}-host \ |
| 13 | ${PN}-chassis \ |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 14 | ${PN}-bmc \ |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 15 | ${PN}-discover \ |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 16 | ${PN}-host-check \ |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 17 | ${PN}-reset-sensor-states \ |
Andrew Geissler | f26fd90 | 2019-09-23 19:11:20 +0000 | [diff] [blame] | 18 | ${PN}-systemd-target-monitor \ |
Andrew Geissler | 77cfb0f | 2020-01-14 14:21:24 -0600 | [diff] [blame] | 19 | ${PN}-obmc-targets \ |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 20 | " |
Brad Bishop | f6f49d5 | 2018-04-11 11:44:15 -0400 | [diff] [blame] | 21 | PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}" |
| 22 | ALLOW_EMPTY_${PN} = "1" |
Brad Bishop | c3f1057 | 2017-03-01 16:08:45 -0500 | [diff] [blame] | 23 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 24 | DBUS_PACKAGES = "${STATE_MGR_PACKAGES}" |
| 25 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 26 | SYSTEMD_PACKAGES = "${PN}-discover \ |
| 27 | ${PN}-reset-sensor-states \ |
Andrew Geissler | f26fd90 | 2019-09-23 19:11:20 +0000 | [diff] [blame] | 28 | ${PN}-systemd-target-monitor \ |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 29 | " |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 30 | |
| 31 | # The host-check function will check if the host is running |
| 32 | # after a BMC reset. |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 33 | # The reset-sensor-states function will reset the host |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 34 | # sensors on a BMC reset or system power loss. |
| 35 | # Neither is required for host state function but are |
| 36 | # recommended to deal properly with these reset scenarios. |
| 37 | RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 38 | |
Andrew Geissler | 77cfb0f | 2020-01-14 14:21:24 -0600 | [diff] [blame] | 39 | # The obmc-targets are the base targets required to boot a computer system |
| 40 | RRECOMMENDS_${PN}-host += "${PN}-obmc-targets" |
| 41 | |
Andrew Geissler | c1debbb | 2019-12-11 14:51:20 -0600 | [diff] [blame] | 42 | inherit meson pkgconfig |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 43 | inherit obmc-phosphor-dbus-service |
| 44 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 45 | DEPENDS += "sdbusplus" |
William A. Kennington III | f0e6674 | 2018-10-18 01:34:43 -0700 | [diff] [blame] | 46 | DEPENDS += "sdeventplus" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 47 | DEPENDS += "phosphor-logging" |
Patrick Williams | d0486d8 | 2017-01-30 11:06:16 -0600 | [diff] [blame] | 48 | DEPENDS += "phosphor-dbus-interfaces" |
Brad Bishop | cc51cd9 | 2018-10-18 17:07:53 -0400 | [diff] [blame] | 49 | DEPENDS += "libcereal" |
Andrew Geissler | f26fd90 | 2019-09-23 19:11:20 +0000 | [diff] [blame] | 50 | DEPENDS += "nlohmann-json" |
| 51 | DEPENDS += "cli11" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 52 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 53 | FILES_${PN}-host = "${bindir}/phosphor-host-state-manager" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 54 | DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 55 | DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service" |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 56 | SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 57 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 58 | FILES_${PN}-chassis = "${bindir}/phosphor-chassis-state-manager" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 59 | DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service" |
| 60 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 61 | FILES_${PN}-chassis += "${bindir}/obmcutil" |
| 62 | |
| 63 | FILES_${PN}-bmc = "${bindir}/phosphor-bmc-state-manager" |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 64 | DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service" |
| 65 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 66 | FILES_${PN}-discover = "${bindir}/phosphor-discover-system-state" |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 67 | SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service" |
| 68 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 69 | FILES_${PN}-host-check = "${bindir}/phosphor-host-check" |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 70 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service" |
| 71 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service" |
| 72 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 73 | SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service" |
| 74 | |
Andrew Geissler | f26fd90 | 2019-09-23 19:11:20 +0000 | [diff] [blame] | 75 | FILES_${PN}-systemd-target-monitor = " \ |
| 76 | ${bindir}/phosphor-systemd-target-monitor \ |
| 77 | ${sysconfdir}/phosphor-systemd-target-monitor/phosphor-target-monitor-default.json \ |
| 78 | " |
| 79 | SYSTEMD_SERVICE_${PN}-systemd-target-monitor += "phosphor-systemd-target-monitor.service" |
| 80 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 81 | RESET_CHECK_TMPL = "phosphor-reset-host-check@.service" |
| 82 | RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target" |
| 83 | RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service" |
| 84 | RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}" |
| 85 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 86 | SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service" |
| 87 | SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target" |
| 88 | SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service" |
| 89 | SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}" |
| 90 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 91 | RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service" |
| 92 | RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target" |
| 93 | RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service" |
| 94 | RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}" |
| 95 | |
| 96 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 97 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 98 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 99 | SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 100 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 101 | # Force the standby target to run the host reset check target |
| 102 | RESET_TMPL_CTRL = "obmc-host-reset@.target" |
Patrick Venture | d607cfb | 2019-04-04 12:15:22 -0700 | [diff] [blame] | 103 | SYSD_TGT = "multi-user.target" |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 104 | RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target" |
| 105 | RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}" |
| 106 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}" |
| 107 | |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 108 | TMPL = "phosphor-discover-system-state@.service" |
| 109 | INSTFMT = "phosphor-discover-system-state@{0}.service" |
Patrick Venture | d607cfb | 2019-04-04 12:15:22 -0700 | [diff] [blame] | 110 | FMT = "../${TMPL}:multi-user.target.wants/${INSTFMT}" |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 111 | SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 112 | |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 113 | # Force the shutdown target to run the chassis-poweroff target |
| 114 | CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target" |
Andrew Geissler | 191400b | 2017-05-26 17:40:03 -0500 | [diff] [blame] | 115 | HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target" |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 116 | CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target" |
| 117 | HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}" |
| 118 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
Andrew Geissler | 191400b | 2017-05-26 17:40:03 -0500 | [diff] [blame] | 119 | |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 120 | # Force the host reboot target to run the shutdown target |
| 121 | HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target" |
| 122 | HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target" |
| 123 | HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target" |
| 124 | HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}" |
| 125 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}" |
| 126 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 127 | # And also force the reboot target to call the host startmin service |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 128 | HOST_REBOOT_SVC = "phosphor-reboot-host@.service" |
| 129 | HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service" |
| 130 | HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}" |
| 131 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 132 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 133 | # Force the host-start target to call the host-startmin target |
| 134 | HOST_STARTMIN_TMPL = "obmc-host-startmin@.target" |
| 135 | HOST_START_TGTFMT = "obmc-host-start@{0}.target" |
| 136 | HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target" |
| 137 | HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}" |
| 138 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}" |
| 139 | |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 140 | # Force the host-start target to call the reboot count reset service |
| 141 | HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service" |
| 142 | HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service" |
| 143 | HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}" |
| 144 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 145 | |
Andrew Geissler | accb484 | 2020-02-10 13:47:12 -0600 | [diff] [blame] | 146 | # Force warm reboot target to call soft power off |
| 147 | HOST_WARM_REBOOT_TGTFMT = "obmc-host-warm-reboot@{0}.target" |
| 148 | HOST_WARM_REBOOT_SOFT_SVC = "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 149 | HOST_WARM_REBOOT_SOFT_SVC_FMT = "../${HOST_WARM_REBOOT_SOFT_SVC}:${HOST_WARM_REBOOT_TGTFMT}.requires/${HOST_WARM_REBOOT_SOFT_SVC}" |
| 150 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_SOFT_SVC_FMT', 'OBMC_HOST_INSTANCES')}" |
| 151 | |
| 152 | # Force warm reboot target to call host stop |
| 153 | HOST_WARM_REBOOT_STOP_TMPL="obmc-host-stop@.target" |
| 154 | HOST_WARM_REBOOT_STOP_REQUIRES="obmc-host-force-warm-reboot@{0}.target" |
| 155 | HOST_WARM_REBOOT_STOP_TMPL_INST="obmc-host-stop@{0}.target" |
| 156 | HOST_WARM_REBOOT_STOP_TARGET_FMT = "../${HOST_WARM_REBOOT_STOP_TMPL}:${HOST_WARM_REBOOT_STOP_REQUIRES}.requires/${HOST_WARM_REBOOT_STOP_TMPL_INST}" |
| 157 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_STOP_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" |
| 158 | |
| 159 | # Force warm reboot target to call reboot host |
| 160 | HOST_WARM_REBOOT_FORCE_TGTFMT = "obmc-host-force-warm-reboot@{0}.target" |
| 161 | HOST_WARM_REBOOT_SVC = "phosphor-reboot-host@.service" |
| 162 | HOST_WARM_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service" |
| 163 | HOST_WARM_REBOOT_SVC_FMT = "../${HOST_WARM_REBOOT_SVC}:${HOST_WARM_REBOOT_FORCE_TGTFMT}.requires/${HOST_WARM_REBOOT_SVC_INST}" |
| 164 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES')}" |
| 165 | |
| 166 | # Warm reboot to call force warm reboot |
| 167 | # Warm reboot will be graceful due to to it also containing soft power off |
| 168 | HOST_WARM_REBOOT_FORCE_TGT = "obmc-host-force-warm-reboot@.target" |
| 169 | HOST_WARM_REBOOT_FORCE_TARGET_FMT = "../${HOST_WARM_REBOOT_FORCE_TGT}:${HOST_WARM_REBOOT_TGTFMT}.requires/${HOST_WARM_REBOOT_FORCE_TGTFMT}" |
| 170 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" |
| 171 | |
| 172 | # Diagnostic target to call force warm reboot target |
| 173 | HOST_DIAG_TGTFMT = "obmc-host-diagnostic-mode@0.target" |
| 174 | HOST_DIAG_TARGET_FMT = "../${HOST_WARM_REBOOT_FORCE_TGT}:${HOST_DIAG_TGTFMT}.requires/${HOST_WARM_REBOOT_FORCE_TGTFMT}" |
| 175 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_DIAG_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" |
Andrew Geissler | 77cfb0f | 2020-01-14 14:21:24 -0600 | [diff] [blame] | 176 | |
| 177 | # Chassis power synchronization targets |
| 178 | # - start-pre: Services to run before we start power on process |
| 179 | # - start: Services to run to do the chassis power on |
| 180 | # - on: Services to run once power is on |
| 181 | # - stop-pre,stop,off: Same as above but applied to powering off |
| 182 | # - reset-on: Services to check if chassis power is on after bmc reset |
| 183 | CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on" |
| 184 | |
| 185 | # Chassis action power targets |
| 186 | # - on: Services to run to power on the chassis |
| 187 | # - off: Services to run to power off the chassis |
| 188 | # - powered-off: Services to run once chassis power is off |
| 189 | # - reset: Services to check chassis power state and update chassis "on" target |
| 190 | # - hard-off: Services to force an immediate power off of the chassis |
| 191 | CHASSIS_ACTION_TARGETS = "poweron poweroff powered-off powerreset hard-poweroff" |
| 192 | |
| 193 | # Track all host synchronization point targets |
| 194 | # - start-pre: Services to run before we start host boot |
| 195 | # - starting: Services to run to do the host boot |
| 196 | # - started: Services to run once the host is booted |
| 197 | # - stop-pre,stopping,stopped: Same as above but applied to shutting down the host |
| 198 | # - reset-running: Services to check if host is running after bmc reset |
| 199 | HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running" |
| 200 | |
| 201 | # Track all host action targets |
| 202 | # - start: Will run startmin target, this target used for any additional |
| 203 | # services that user needs for an initial power on of host. |
| 204 | # For example, resetting the host reboot count could be put in |
| 205 | # this target so on any fresh power on, this count is reset. |
| 206 | # - startmin: Minimum services required to start the host. This target will |
| 207 | # be called by reboot and start target. |
| 208 | # - stop: Services to run to shutdown the host |
| 209 | # - quiesce: Target to enter on host boot failure |
| 210 | # - shutdown: Tell host to shutdown, then stop system |
| 211 | # - reset: Services to check if host is running and update host "start" target |
| 212 | # - crash: Target to run when host crashes. it is very much similar to |
| 213 | # quiesce target but the only delta is that this target contains |
| 214 | # multiple services and one of them is the quiesce target. |
| 215 | # - timeout: Target to run when host watchdog times out |
Andrew Geissler | accb484 | 2020-02-10 13:47:12 -0600 | [diff] [blame] | 216 | # - reboot: Reboot the host with a chassis power cycle included |
| 217 | # - warm-reboot: Reboot the host without a chassis power cycle. |
| 218 | # - force-warm-reboot: Reboot the host without a chassis power cycle and without |
| 219 | # notifying the host. |
| 220 | # - diagnostic-mode: This will be entered when the host is collecting diagnostic |
| 221 | # data for itself. |
| 222 | HOST_ACTION_TARGETS = "start startmin stop quiesce reset shutdown crash timeout " |
| 223 | HOST_ACTION_TARGETS += "reboot warm-reboot force-warm-reboot diagnostic-mode" |
Andrew Geissler | 77cfb0f | 2020-01-14 14:21:24 -0600 | [diff] [blame] | 224 | |
| 225 | CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" |
| 226 | CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target" |
| 227 | HOST_SYNCH_FMT = "obmc-host-{0}@.target" |
| 228 | HOST_ACTION_FMT = "obmc-host-{0}@.target" |
| 229 | |
| 230 | CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target" |
| 231 | CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-{0}@{1}.target" |
| 232 | HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target" |
| 233 | HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" |
| 234 | FAN_LINK_FMT = "obmc-fan-control-ready@.target:obmc-fan-control-ready@{0}.target" |
| 235 | |
| 236 | # Targets to be executed on checkstop and watchdog timeout |
| 237 | HOST_ERROR_TARGETS = "crash timeout" |
| 238 | |
| 239 | QUIESCE_TMPL = "obmc-host-quiesce@.target" |
| 240 | CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target" |
| 241 | QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target" |
| 242 | QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}" |
| 243 | |
| 244 | SYSTEMD_SERVICE_${PN}-obmc-targets += " \ |
| 245 | obmc-mapper.target \ |
| 246 | obmc-fans-ready.target \ |
| 247 | obmc-fan-control.target \ |
| 248 | obmc-fan-control-ready@.target \ |
| 249 | obmc-fan-watchdog-takeover.target \ |
| 250 | " |
| 251 | |
| 252 | SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" |
| 253 | SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" |
| 254 | SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" |
| 255 | SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" |
| 256 | |
| 257 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 258 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 259 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 260 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 261 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
| 262 | SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 263 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 264 | SRC_URI += "git://github.com/openbmc/phosphor-state-manager" |
Andrew Geissler | f04576b | 2020-03-12 13:01:46 +0000 | [diff] [blame] | 265 | SRCREV = "4ca6f3f4fe136a593df8e3a61adf6620cd4ca45c" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 266 | |
| 267 | S = "${WORKDIR}/git" |