Brad Bishop | 86ee1cf | 2016-06-27 14:53:52 -0400 | [diff] [blame] | 1 | SUMMARY = "org.openbmc.control.Power implemention for OpenPOWER" |
| 2 | DESCRIPTION = "A power control implementation suitable for OpenPOWER systems." |
| 3 | PR = "r1" |
| 4 | |
| 5 | inherit skeleton-gdbus |
Brad Bishop | 0fe8046 | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 6 | inherit obmc-phosphor-dbus-service |
| 7 | |
Brad Bishop | 1122eb0 | 2016-10-05 20:10:23 -0400 | [diff] [blame] | 8 | DEPENDS += "phosphor-mapper systemd" |
Brad Bishop | ecd773d | 2016-08-31 23:43:19 -0400 | [diff] [blame] | 9 | |
Brad Bishop | 86ee1cf | 2016-06-27 14:53:52 -0400 | [diff] [blame] | 10 | SKELETON_DIR = "op-pwrctl" |
Brad Bishop | 0fe8046 | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 11 | |
| 12 | FMT = "org.openbmc.control.Power@{0}.service" |
| 13 | DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_POWER_INSTANCES')}" |
| 14 | |
| 15 | SYSTEMD_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 | |
| 22 | SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/power_control" |
| 23 | |
| 24 | START_TMPL = "op-power-start@.service" |
| 25 | START_TGTFMT = "obmc-chassis-start@{1}.target" |
| 26 | START_INSTFMT = "op-power-start@{0}.service" |
| 27 | START_FMT = "../${START_TMPL}:${START_TGTFMT}.wants/${START_INSTFMT}" |
| 28 | |
| 29 | STOP_TMPL = "op-power-stop@.service" |
| 30 | STOP_TGTFMT = "obmc-chassis-stop@{1}.target" |
| 31 | STOP_INSTFMT = "op-power-stop@{0}.service" |
| 32 | STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.wants/${STOP_INSTFMT}" |
| 33 | |
| 34 | ON_TMPL = "op-wait-power-on@.service" |
| 35 | ON_INSTFMT = "op-wait-power-on@{0}.service" |
| 36 | ON_FMT = "../${ON_TMPL}:${START_TGTFMT}.wants/${ON_INSTFMT}" |
| 37 | |
Andrew Geissler | e2be4bb | 2016-12-19 09:05:39 -0600 | [diff] [blame] | 38 | OFF_TMPL = "op-wait-power-off@.service" |
Brad Bishop | 0fe8046 | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 39 | OFF_INSTFMT = "op-wait-power-off@{0}.service" |
| 40 | OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.wants/${OFF_INSTFMT}" |
| 41 | |
| 42 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 43 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 44 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 45 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |