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 |
Josh D. King | 3c7a8ef | 2017-04-11 09:48:10 -0500 | [diff] [blame] | 38 | HOST_ACTION_TARGETS = "start stop quiesce reset shutdown" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 39 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 40 | CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" |
| 41 | CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 42 | HOST_SYNCH_FMT = "obmc-host-{0}@.target" |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 43 | HOST_ACTION_FMT = "obmc-host-{0}@.target" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 44 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 45 | CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target" |
| 46 | 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] | 47 | 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] | 48 | HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 49 | |
| 50 | SYSTEMD_SERVICE_${PN} += " \ |
| 51 | obmc-mapper.target \ |
Brad Bishop | d969da3 | 2016-08-30 00:21:14 -0400 | [diff] [blame] | 52 | obmc-webserver-pre.target \ |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 53 | obmc-fans-ready.target \ |
| 54 | obmc-fan-control.target \ |
| 55 | obmc-standby.target \ |
| 56 | " |
| 57 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 58 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" |
| 59 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" |
Andrew Geissler | 9ccc366 | 2017-01-04 11:11:00 -0600 | [diff] [blame] | 60 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" |
| 61 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" |
Brad Bishop | e94b915 | 2016-08-08 20:21:44 -0400 | [diff] [blame] | 62 | |
Josh D. King | a283e07 | 2017-04-06 15:56:37 -0500 | [diff] [blame] | 63 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" |
| 64 | 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] | 65 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 66 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" |