blob: 6f83a9ed3e53e8afdfdf9cb8c58723d05bad441f [file] [log] [blame]
Brad Bishope94b9152016-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
Andrew Geissler44761d22017-01-23 14:40:26 -060010# Overall chassis and host control
Andrew Geissler997ed662017-03-05 20:36:50 -060011# - start: Services to run to start the host
12# - stop: Services to run to stop the host
Brad Bishope94b9152016-08-08 20:21:44 -040013CHASSIS_TARGETS = "start stop"
Andrew Geissler997ed662017-03-05 20:36:50 -060014
Andrew Geissler44761d22017-01-23 14:40:26 -060015# Synchronization targets
Andrew Geissler997ed662017-03-05 20:36:50 -060016# - start-pre: Services to run before we start power on process
17# - start: Services to run to do the chassis power on
18# - on: Services to run once power is on
19# - stop-pre,stop,off: Same as above but applied to powering off
20# - reset-on: Services to check if chassis power is on after bmc reset
21SYNCH_POWER_TARGETS = "start-pre start on stop-pre stop off reset-on"
22
Andrew Geissler44761d22017-01-23 14:40:26 -060023# Control chassis power
Andrew Geissler997ed662017-03-05 20:36:50 -060024# - on: Services to run to power on the chassis
25# - off: Services to run to power off the chassis
Andrew Geissler44761d22017-01-23 14:40:26 -060026CHASSIS_POWER_TARGETS = "on off"
Andrew Geissler997ed662017-03-05 20:36:50 -060027
28#TODO - After target renames #1205, combine this with CHASSIS_POWER_TARGETS
29# - reset: Services to check chassis power state and update chassis "on" target
30CHASSIS_POWER_TARGETS_2 = "reset"
31
32# Track all host synchronization point targets
33# - start-pre: Services to run before we start host boot
34# - start: Services to run to do the host boot
35# - started: Services to run once the host is booted
36# - stop-pre,stop,stopped: Same as above but applied to shutting down the host
Andrew Geissler9ccc3662017-01-04 11:11:00 -060037HOST_SYNCH_TARGETS = "start-pre start started stop-pre stop stopped"
Andrew Geissler997ed662017-03-05 20:36:50 -060038
Andrew Geissler9ccc3662017-01-04 11:11:00 -060039# Track all host action targets
Andrew Geissler997ed662017-03-05 20:36:50 -060040# - stop: Services to run to shutdown the host
41# - quiesce: Target to enter on host boot failure
Andrew Geisslerf128cea2017-01-29 19:53:51 -060042HOST_ACTION_TARGETS = "stop quiesce"
Brad Bishope94b9152016-08-08 20:21:44 -040043
44CHASSIS_FMT = "obmc-chassis-{0}@.target"
Andrew Geissler44761d22017-01-23 14:40:26 -060045SYNCH_POWER_FMT = "obmc-power-{0}@.target"
46CHASSIS_POWER_FMT = "obmc-power-chassis-{0}@.target"
Andrew Geissler997ed662017-03-05 20:36:50 -060047CHASSIS_POWER_FMT_2 = "obmc-chassis-{0}@.target"
Andrew Geissler9ccc3662017-01-04 11:11:00 -060048HOST_SYNCH_FMT = "obmc-host-{0}@.target"
49HOST_ACTION_FMT = "obmc-{0}-host@.target"
Brad Bishope94b9152016-08-08 20:21:44 -040050
51CHASSIS_LINK_FMT = "${CHASSIS_FMT}:obmc-chassis-{0}@{1}.target"
Andrew Geissler44761d22017-01-23 14:40:26 -060052SYNCH_POWER_LINK_FMT = "${SYNCH_POWER_FMT}:obmc-power-{0}@{1}.target"
53CHASSIS_POWER_LINK_FMT = "${CHASSIS_POWER_FMT}:obmc-power-chassis-{0}@{1}.target"
Andrew Geissler997ed662017-03-05 20:36:50 -060054CHASSIS_POWER_LINK_FMT_2 = "${CHASSIS_POWER_FMT_2}:obmc-chassis-{0}@{1}.target"
Andrew Geissler9ccc3662017-01-04 11:11:00 -060055HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target"
56HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-{0}-host@{1}.target"
Brad Bishope94b9152016-08-08 20:21:44 -040057
58SYSTEMD_SERVICE_${PN} += " \
59 obmc-mapper.target \
Brad Bishopd969da32016-08-30 00:21:14 -040060 obmc-webserver-pre.target \
Brad Bishope94b9152016-08-08 20:21:44 -040061 obmc-fans-ready.target \
62 obmc-fan-control.target \
63 obmc-standby.target \
64 "
65
66SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_FMT', 'CHASSIS_TARGETS')}"
Andrew Geissler44761d22017-01-23 14:40:26 -060067SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'SYNCH_POWER_FMT', 'SYNCH_POWER_TARGETS')}"
68SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT', 'CHASSIS_POWER_TARGETS')}"
Andrew Geissler997ed662017-03-05 20:36:50 -060069SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT_2', 'CHASSIS_POWER_TARGETS_2')}"
Andrew Geissler9ccc3662017-01-04 11:11:00 -060070SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}"
71SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}"
Brad Bishope94b9152016-08-08 20:21:44 -040072
73SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_FMT', 'CHASSIS_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler44761d22017-01-23 14:40:26 -060074SYSTEMD_LINK_${PN} += "${@compose_list(d, 'SYNCH_POWER_LINK_FMT', 'SYNCH_POWER_TARGETS', 'OBMC_POWER_INSTANCES')}"
75SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT', 'CHASSIS_POWER_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler997ed662017-03-05 20:36:50 -060076SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT_2', 'CHASSIS_POWER_TARGETS_2', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler9ccc3662017-01-04 11:11:00 -060077SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}"
78SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}"