Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 1 | SUMMARY = "Phosphor Systemd targets" |
Gunnar Mills | fb51a9a | 2018-01-09 16:40:15 -0600 | [diff] [blame] | 2 | DESCRIPTION = "Provides well known Systemd synchronization points for OpenBMC." |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 3 | HOMEPAGE = "http://github.com/openbmc" |
| 4 | PR = "r1" |
Patrick Venture | 776991a | 2018-11-03 14:20:22 -0700 | [diff] [blame] | 5 | LICENSE = "Apache-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 7 | |
| 8 | inherit obmc-phosphor-systemd |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 9 | inherit allarch |
| 10 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 11 | # Chassis power synchronization targets |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 12 | # - start-pre: Services to run before we start power on process |
| 13 | # - start: Services to run to do the chassis power on |
| 14 | # - on: Services to run once power is on |
| 15 | # - stop-pre,stop,off: Same as above but applied to powering off |
| 16 | # - reset-on: Services to check if chassis power is on after bmc reset |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 17 | CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on" |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 18 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 19 | # Chassis action power targets |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 20 | # - on: Services to run to power on the chassis |
| 21 | # - off: Services to run to power off the chassis |
Matthew Barth | 1851aa6 | 2018-01-10 09:16:28 -0600 | [diff] [blame] | 22 | # - powered-off: Services to run once chassis power is off |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 23 | # - reset: Services to check chassis power state and update chassis "on" target |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 24 | # - hard-off: Services to force an immediate power off of the chassis |
Matthew Barth | 1851aa6 | 2018-01-10 09:16:28 -0600 | [diff] [blame] | 25 | CHASSIS_ACTION_TARGETS = "poweron poweroff powered-off powerreset hard-poweroff" |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 26 | |
| 27 | # Track all host synchronization point targets |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 28 | # - start-pre: Services to run before we start host boot |
| 29 | # - starting: Services to run to do the host boot |
| 30 | # - started: Services to run once the host is booted |
| 31 | # - stop-pre,stopping,stopped: Same as above but applied to shutting down the host |
| 32 | # - reset-running: Services to check if host is running after bmc reset |
| 33 | HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running" |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 34 | |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 35 | # Track all host action targets |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 36 | # - start: Will run startmin target, this target used for any additional |
| 37 | # services that user needs for an initial power on of host. |
| 38 | # For example, resetting the host reboot count could be put in |
| 39 | # this target so on any fresh power on, this count is reset. |
| 40 | # - startmin: Minimum services required to start the host. This target will |
| 41 | # be called by reboot and start target. |
Josh D. King | 3c7a8ef | 2017-04-11 09:48:10 -0500 | [diff] [blame] | 42 | # - stop: Services to run to shutdown the host |
| 43 | # - quiesce: Target to enter on host boot failure |
| 44 | # - shutdown: Tell host to shutdown, then stop system |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 45 | # - reset: Services to check if host is running and update host "start" target |
Vishwanatha Subbanna | 49c4e50 | 2017-04-04 16:41:02 +0530 | [diff] [blame] | 46 | # - crash: Target to run when host crashes. it is very much similar to |
| 47 | # quiesce target but the only delta is that this target contains |
| 48 | # multiple services and one of them is the quiesce target. |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 49 | # - timeout: Target to run when host watchdog times out |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 50 | # - reboot: Reboot the host |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 51 | HOST_ACTION_TARGETS = "start startmin stop quiesce reset shutdown crash timeout reboot" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 52 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 53 | CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 54 | CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 55 | HOST_SYNCH_FMT = "obmc-host-{0}@.target" |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 56 | HOST_ACTION_FMT = "obmc-host-{0}@.target" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 57 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 58 | CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target" |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 59 | CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-{0}@{1}.target" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 60 | HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target" |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 61 | HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" |
Matt Spinler | 393c9b1 | 2017-05-16 11:57:20 -0500 | [diff] [blame] | 62 | FAN_LINK_FMT = "obmc-fan-control-ready@.target:obmc-fan-control-ready@{0}.target" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 63 | |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 64 | # Targets to be executed on checkstop and watchdog timeout |
| 65 | HOST_ERROR_TARGETS = "crash timeout" |
| 66 | |
Vishwanatha Subbanna | 49c4e50 | 2017-04-04 16:41:02 +0530 | [diff] [blame] | 67 | QUIESCE_TMPL = "obmc-host-quiesce@.target" |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 68 | CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target" |
| 69 | QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target" |
| 70 | QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}" |
Vishwanatha Subbanna | 49c4e50 | 2017-04-04 16:41:02 +0530 | [diff] [blame] | 71 | |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 72 | SYSTEMD_SERVICE_${PN} += " \ |
| 73 | obmc-mapper.target \ |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 74 | obmc-fans-ready.target \ |
| 75 | obmc-fan-control.target \ |
Matt Spinler | 393c9b1 | 2017-05-16 11:57:20 -0500 | [diff] [blame] | 76 | obmc-fan-control-ready@.target \ |
Matt Spinler | 4c2af63 | 2017-06-08 12:20:07 -0500 | [diff] [blame] | 77 | obmc-fan-watchdog-takeover.target \ |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 78 | obmc-standby.target \ |
| 79 | " |
| 80 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 81 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" |
| 82 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 83 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" |
| 84 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 85 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 86 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 87 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 88 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 89 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" |
Matt Spinler | 393c9b1 | 2017-05-16 11:57:20 -0500 | [diff] [blame] | 90 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 91 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |