Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 1 | SUMMARY = "Phosphor Systemd targets" |
| 2 | DESCRIPTION = "Provides well known Systemd syncronization points for OpenBMC." |
| 3 | HOMEPAGE = "http://github.com/openbmc" |
| 4 | PR = "r1" |
| 5 | |
| 6 | inherit obmc-phosphor-systemd |
| 7 | inherit obmc-phosphor-license |
| 8 | inherit allarch |
| 9 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 10 | # Chassis power synchronization targets |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 11 | # - start-pre: Services to run before we start power on process |
| 12 | # - start: Services to run to do the chassis power on |
| 13 | # - on: Services to run once power is on |
| 14 | # - stop-pre,stop,off: Same as above but applied to powering off |
| 15 | # - 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] | 16 | 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] | 17 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 18 | # Chassis action power targets |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 19 | # - on: Services to run to power on the chassis |
| 20 | # - off: Services to run to power off the chassis |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 21 | # - reset: Services to check chassis power state and update chassis "on" target |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 22 | CHASSIS_ACTION_TARGETS = "on off reset" |
Andrew Geissler | 997ed66 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 23 | |
| 24 | # Track all host synchronization point targets |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 25 | # - start-pre: Services to run before we start host boot |
| 26 | # - starting: Services to run to do the host boot |
| 27 | # - started: Services to run once the host is booted |
| 28 | # - stop-pre,stopping,stopped: Same as above but applied to shutting down the host |
| 29 | # - reset-running: Services to check if host is running after bmc reset |
| 30 | 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] | 31 | |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 32 | # Track all host action targets |
Josh D. King | 3c7a8ef | 2017-04-11 09:48:10 -0500 | [diff] [blame] | 33 | # - start: Service to run to start the host |
| 34 | # - stop: Services to run to shutdown the host |
| 35 | # - quiesce: Target to enter on host boot failure |
| 36 | # - shutdown: Tell host to shutdown, then stop system |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 37 | # - 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] | 38 | # - crash: Target to run when host crashes. it is very much similar to |
| 39 | # quiesce target but the only delta is that this target contains |
| 40 | # multiple services and one of them is the quiesce target. |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 41 | # - timeout: Target to run when host watchdog times out |
| 42 | HOST_ACTION_TARGETS = "start stop quiesce reset shutdown crash timeout" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 43 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 44 | CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" |
| 45 | CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 46 | HOST_SYNCH_FMT = "obmc-host-{0}@.target" |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 47 | HOST_ACTION_FMT = "obmc-host-{0}@.target" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 48 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 49 | CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target" |
| 50 | CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-power{0}@{1}.target" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 51 | 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] | 52 | HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" |
Matt Spinler | 393c9b1 | 2017-05-16 11:57:20 -0500 | [diff] [blame] | 53 | 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] | 54 | |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 55 | # Targets to be executed on checkstop and watchdog timeout |
| 56 | HOST_ERROR_TARGETS = "crash timeout" |
| 57 | |
Vishwanatha Subbanna | 49c4e50 | 2017-04-04 16:41:02 +0530 | [diff] [blame] | 58 | QUIESCE_TMPL = "obmc-host-quiesce@.target" |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 59 | CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target" |
| 60 | QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target" |
| 61 | QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}" |
Vishwanatha Subbanna | 49c4e50 | 2017-04-04 16:41:02 +0530 | [diff] [blame] | 62 | |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 63 | SYSTEMD_SERVICE_${PN} += " \ |
| 64 | obmc-mapper.target \ |
Brad Bishop | d969da3 | 2016-08-30 00:21:14 -0400 | [diff] [blame] | 65 | obmc-webserver-pre.target \ |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 66 | obmc-fans-ready.target \ |
| 67 | obmc-fan-control.target \ |
Matt Spinler | 393c9b1 | 2017-05-16 11:57:20 -0500 | [diff] [blame] | 68 | obmc-fan-control-ready@.target \ |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 69 | obmc-standby.target \ |
| 70 | " |
| 71 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 72 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" |
| 73 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 74 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" |
| 75 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 76 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 77 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 78 | 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] | 79 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 80 | 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] | 81 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
Vishwanatha Subbanna | fad0956 | 2017-06-12 14:48:29 +0530 | [diff] [blame] | 82 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |