Brad Bishop | e306073 | 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 | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 10 | # Chassis power synchronization targets |
Andrew Geissler | e4577f6 | 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 | efb04a1 | 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 | e4577f6 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 17 | |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 18 | # Chassis action power targets |
Andrew Geissler | e4577f6 | 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 | e4577f6 | 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 | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 22 | CHASSIS_ACTION_TARGETS = "on off reset" |
Andrew Geissler | e4577f6 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 23 | |
| 24 | # Track all host synchronization point targets |
Josh D. King | efb04a1 | 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 | e4577f6 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 31 | |
Andrew Geissler | c91cfcb | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 32 | # Track all host action targets |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 33 | # - start: Service to run to start the host |
Andrew Geissler | e4577f6 | 2017-03-05 20:36:50 -0600 | [diff] [blame] | 34 | # - stop: Services to run to shutdown the host |
| 35 | # - quiesce: Target to enter on host boot failure |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 36 | # - reset: Services to check if host is running and update host "start" target |
| 37 | HOST_ACTION_TARGETS = "start stop quiesce reset" |
Brad Bishop | e306073 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 38 | |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 39 | CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" |
| 40 | CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" |
Andrew Geissler | c91cfcb | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 41 | HOST_SYNCH_FMT = "obmc-host-{0}@.target" |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 42 | HOST_ACTION_FMT = "obmc-host-{0}@.target" |
Brad Bishop | e306073 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 43 | |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 44 | CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target" |
| 45 | CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-power{0}@{1}.target" |
Andrew Geissler | c91cfcb | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 46 | HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target" |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 47 | HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" |
Brad Bishop | e306073 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 48 | |
| 49 | SYSTEMD_SERVICE_${PN} += " \ |
| 50 | obmc-mapper.target \ |
Brad Bishop | 4bd2773 | 2016-08-30 00:21:14 -0400 | [diff] [blame] | 51 | obmc-webserver-pre.target \ |
Brad Bishop | e306073 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 52 | obmc-fans-ready.target \ |
| 53 | obmc-fan-control.target \ |
| 54 | obmc-standby.target \ |
| 55 | " |
| 56 | |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 57 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" |
| 58 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" |
Andrew Geissler | c91cfcb | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 59 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" |
| 60 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" |
Brad Bishop | e306073 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 61 | |
Josh D. King | efb04a1 | 2017-04-06 15:56:37 -0500 | [diff] [blame^] | 62 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 63 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
Andrew Geissler | c91cfcb | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 64 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 65 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" |