blob: cf8cb02b84bbbfc4b0bdc3c5dc7343c993784344 [file] [log] [blame]
Brad Bishope3060732016-08-08 20:21:44 -04001SUMMARY = "Phosphor Systemd targets"
2DESCRIPTION = "Provides well known Systemd syncronization points for OpenBMC."
3HOMEPAGE = "http://github.com/openbmc"
4PR = "r1"
5
6inherit obmc-phosphor-systemd
7inherit obmc-phosphor-license
8inherit allarch
9
Josh D. Kingefb04a12017-04-06 15:56:37 -050010# Chassis power synchronization targets
Andrew Geisslere4577f62017-03-05 20:36:50 -060011# - 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. Kingefb04a12017-04-06 15:56:37 -050016CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on"
Andrew Geisslere4577f62017-03-05 20:36:50 -060017
Josh D. Kingefb04a12017-04-06 15:56:37 -050018# Chassis action power targets
Andrew Geisslere4577f62017-03-05 20:36:50 -060019# - on: Services to run to power on the chassis
20# - off: Services to run to power off the chassis
Andrew Geisslere4577f62017-03-05 20:36:50 -060021# - reset: Services to check chassis power state and update chassis "on" target
Josh D. Kingefb04a12017-04-06 15:56:37 -050022CHASSIS_ACTION_TARGETS = "on off reset"
Andrew Geisslere4577f62017-03-05 20:36:50 -060023
24# Track all host synchronization point targets
Josh D. Kingefb04a12017-04-06 15:56:37 -050025# - 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
30HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running"
Andrew Geisslere4577f62017-03-05 20:36:50 -060031
Andrew Geisslerc91cfcb2017-01-04 11:11:00 -060032# Track all host action targets
Josh D. Kingefb04a12017-04-06 15:56:37 -050033# - start: Service to run to start the host
Andrew Geisslere4577f62017-03-05 20:36:50 -060034# - stop: Services to run to shutdown the host
35# - quiesce: Target to enter on host boot failure
Josh D. Kingefb04a12017-04-06 15:56:37 -050036# - reset: Services to check if host is running and update host "start" target
37HOST_ACTION_TARGETS = "start stop quiesce reset"
Brad Bishope3060732016-08-08 20:21:44 -040038
Josh D. Kingefb04a12017-04-06 15:56:37 -050039CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target"
40CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target"
Andrew Geisslerc91cfcb2017-01-04 11:11:00 -060041HOST_SYNCH_FMT = "obmc-host-{0}@.target"
Josh D. Kingefb04a12017-04-06 15:56:37 -050042HOST_ACTION_FMT = "obmc-host-{0}@.target"
Brad Bishope3060732016-08-08 20:21:44 -040043
Josh D. Kingefb04a12017-04-06 15:56:37 -050044CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target"
45CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-power{0}@{1}.target"
Andrew Geisslerc91cfcb2017-01-04 11:11:00 -060046HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target"
Josh D. Kingefb04a12017-04-06 15:56:37 -050047HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target"
Brad Bishope3060732016-08-08 20:21:44 -040048
49SYSTEMD_SERVICE_${PN} += " \
50 obmc-mapper.target \
Brad Bishop4bd27732016-08-30 00:21:14 -040051 obmc-webserver-pre.target \
Brad Bishope3060732016-08-08 20:21:44 -040052 obmc-fans-ready.target \
53 obmc-fan-control.target \
54 obmc-standby.target \
55 "
56
Josh D. Kingefb04a12017-04-06 15:56:37 -050057SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}"
58SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}"
Andrew Geisslerc91cfcb2017-01-04 11:11:00 -060059SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}"
60SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}"
Brad Bishope3060732016-08-08 20:21:44 -040061
Josh D. Kingefb04a12017-04-06 15:56:37 -050062SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
63SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geisslerc91cfcb2017-01-04 11:11:00 -060064SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}"
65SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}"