blob: a13c6328bcc28cc8ad4dbf93c44ec17c80198ced [file] [log] [blame]
Brad Bishop86ee1cf2016-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 Bishop0fe80462016-08-17 20:27:37 -04006inherit obmc-phosphor-dbus-service
7
8DEPENDS += "obmc-mapper systemd"
Brad Bishop86ee1cf2016-06-27 14:53:52 -04009
Brad Bishopecd773d2016-08-31 23:43:19 -040010DEPENDS += "obmc-mapper systemd"
11
Brad Bishop86ee1cf2016-06-27 14:53:52 -040012SKELETON_DIR = "op-pwrctl"
Brad Bishop0fe80462016-08-17 20:27:37 -040013
14FMT = "org.openbmc.control.Power@{0}.service"
15DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_POWER_INSTANCES')}"
16
17SYSTEMD_SERVICE_${PN} += " \
18 op-power-start@.service \
19 op-wait-power-on@.service \
20 op-power-stop@.service \
21 op-wait-power-off@.service \
22 "
23
24SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/power_control"
25
26START_TMPL = "op-power-start@.service"
27START_TGTFMT = "obmc-chassis-start@{1}.target"
28START_INSTFMT = "op-power-start@{0}.service"
29START_FMT = "../${START_TMPL}:${START_TGTFMT}.wants/${START_INSTFMT}"
30
31STOP_TMPL = "op-power-stop@.service"
32STOP_TGTFMT = "obmc-chassis-stop@{1}.target"
33STOP_INSTFMT = "op-power-stop@{0}.service"
34STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.wants/${STOP_INSTFMT}"
35
36ON_TMPL = "op-wait-power-on@.service"
37ON_INSTFMT = "op-wait-power-on@{0}.service"
38ON_FMT = "../${ON_TMPL}:${START_TGTFMT}.wants/${ON_INSTFMT}"
39
40OFF_TMPL = "op-wait-ppower-off@.service"
41OFF_INSTFMT = "op-wait-power-off@{0}.service"
42OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.wants/${OFF_INSTFMT}"
43
44SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
45SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
46SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
47SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"