blob: d4a594eb9f19ff0534ceb9a2667787267948b357 [file] [log] [blame]
Brad Bishop5f9be072016-06-27 14:53:52 -04001SUMMARY = "org.openbmc.control.Power implemention for OpenPOWER"
2DESCRIPTION = "A power control implementation suitable for OpenPOWER systems."
3PR = "r1"
4
5inherit skeleton-gdbus
Brad Bishop1d525fa2016-08-17 20:27:37 -04006inherit obmc-phosphor-dbus-service
7
Brad Bishop12e3d602016-10-05 20:10:23 -04008DEPENDS += "phosphor-mapper systemd"
Brad Bishop860fcde2016-08-31 23:43:19 -04009
Brad Bishop5f9be072016-06-27 14:53:52 -040010SKELETON_DIR = "op-pwrctl"
Brad Bishop1d525fa2016-08-17 20:27:37 -040011
12FMT = "org.openbmc.control.Power@{0}.service"
13DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_POWER_INSTANCES')}"
14
15SYSTEMD_SERVICE_${PN} += " \
16 op-power-start@.service \
17 op-wait-power-on@.service \
18 op-power-stop@.service \
19 op-wait-power-off@.service \
20 "
21
22SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/power_control"
23
24START_TMPL = "op-power-start@.service"
Andrew Geisslerd8819ed2017-01-23 14:40:26 -060025START_TGTFMT = "obmc-power-chassis-on@{1}.target"
Brad Bishop1d525fa2016-08-17 20:27:37 -040026START_INSTFMT = "op-power-start@{0}.service"
27START_FMT = "../${START_TMPL}:${START_TGTFMT}.wants/${START_INSTFMT}"
28
29STOP_TMPL = "op-power-stop@.service"
Andrew Geisslerd8819ed2017-01-23 14:40:26 -060030STOP_TGTFMT = "obmc-power-chassis-off@{1}.target"
Brad Bishop1d525fa2016-08-17 20:27:37 -040031STOP_INSTFMT = "op-power-stop@{0}.service"
32STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.wants/${STOP_INSTFMT}"
33
34ON_TMPL = "op-wait-power-on@.service"
35ON_INSTFMT = "op-wait-power-on@{0}.service"
36ON_FMT = "../${ON_TMPL}:${START_TGTFMT}.wants/${ON_INSTFMT}"
37
Andrew Geissler93490722016-12-19 09:05:39 -060038OFF_TMPL = "op-wait-power-off@.service"
Brad Bishop1d525fa2016-08-17 20:27:37 -040039OFF_INSTFMT = "op-wait-power-off@{0}.service"
40OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.wants/${OFF_INSTFMT}"
41
42SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
43SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
44SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
45SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geisslerd8819ed2017-01-23 14:40:26 -060046
47# TODO - Will delete this next block of code in later commit once everything
48# moved over to new targets
49START_TGTFMT_TBDEL = "obmc-chassis-start@{1}.target"
50STOP_TGTFMT_TBDEL = "obmc-chassis-stop@{1}.target"
51START_FMT_TBDEL = "../${START_TMPL}:${START_TGTFMT_TBDEL}.wants/${START_INSTFMT}"
52STOP_FMT_TBDEL = "../${STOP_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${STOP_INSTFMT}"
53ON_FMT_TBDEL = "../${ON_TMPL}:${START_TGTFMT_TBDEL}.wants/${ON_INSTFMT}"
54OFF_FMT_TBDEL = "../${OFF_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${OFF_INSTFMT}"
55
56SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
57SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
58SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
59SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"