Brad Bishop | 5f9be07 | 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 | 1d525fa | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 6 | inherit obmc-phosphor-dbus-service |
| 7 | |
Brad Bishop | 12e3d60 | 2016-10-05 20:10:23 -0400 | [diff] [blame] | 8 | DEPENDS += "phosphor-mapper systemd" |
Brad Bishop | 860fcde | 2016-08-31 23:43:19 -0400 | [diff] [blame] | 9 | |
Brad Bishop | 5f9be07 | 2016-06-27 14:53:52 -0400 | [diff] [blame] | 10 | SKELETON_DIR = "op-pwrctl" |
Brad Bishop | 1d525fa | 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" |
Andrew Geissler | d8819ed | 2017-01-23 14:40:26 -0600 | [diff] [blame^] | 25 | START_TGTFMT = "obmc-power-chassis-on@{1}.target" |
Brad Bishop | 1d525fa | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 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" |
Andrew Geissler | d8819ed | 2017-01-23 14:40:26 -0600 | [diff] [blame^] | 30 | STOP_TGTFMT = "obmc-power-chassis-off@{1}.target" |
Brad Bishop | 1d525fa | 2016-08-17 20:27:37 -0400 | [diff] [blame] | 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 | 9349072 | 2016-12-19 09:05:39 -0600 | [diff] [blame] | 38 | OFF_TMPL = "op-wait-power-off@.service" |
Brad Bishop | 1d525fa | 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')}" |
Andrew Geissler | d8819ed | 2017-01-23 14:40:26 -0600 | [diff] [blame^] | 46 | |
| 47 | # TODO - Will delete this next block of code in later commit once everything |
| 48 | # moved over to new targets |
| 49 | START_TGTFMT_TBDEL = "obmc-chassis-start@{1}.target" |
| 50 | STOP_TGTFMT_TBDEL = "obmc-chassis-stop@{1}.target" |
| 51 | START_FMT_TBDEL = "../${START_TMPL}:${START_TGTFMT_TBDEL}.wants/${START_INSTFMT}" |
| 52 | STOP_FMT_TBDEL = "../${STOP_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${STOP_INSTFMT}" |
| 53 | ON_FMT_TBDEL = "../${ON_TMPL}:${START_TGTFMT_TBDEL}.wants/${ON_INSTFMT}" |
| 54 | OFF_FMT_TBDEL = "../${OFF_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${OFF_INSTFMT}" |
| 55 | |
| 56 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 57 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 58 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |
| 59 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" |