Xo Wang | 9baac6f | 2016-12-15 15:24:22 -0800 | [diff] [blame] | 1 | SUMMARY = "Zaius VCS rail control" |
| 2 | DESCRIPTION = "VCS voltage rail control implementation for Zaius" |
| 3 | PR = "r0" |
| 4 | |
| 5 | inherit obmc-phosphor-systemd |
| 6 | inherit obmc-phosphor-license |
| 7 | |
| 8 | PROVIDES += 'virtual/p9-vcs-workaround' |
| 9 | RPROVIDES_${PN} += 'virtual-p9-vcs-workaround' |
| 10 | |
| 11 | TMPL_OFF = "vcs-off@.service" |
| 12 | TMPL_ON = "vcs-on@.service" |
| 13 | INSTFMT_OFF = "vcs-off@{0}.service" |
| 14 | INSTFMT_ON = "vcs-on@{0}.service" |
| 15 | TGTFMT_OFF = "obmc-chassis-stop@{0}.target" |
| 16 | TGTFMT_ON = "obmc-chassis-start@{0}.target" |
| 17 | FMT_OFF = "../${TMPL_OFF}:${TGTFMT_OFF}.wants/${INSTFMT_OFF}" |
| 18 | FMT_ON = "../${TMPL_ON}:${TGTFMT_ON}.wants/${INSTFMT_ON}" |
| 19 | |
| 20 | SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}" |
| 21 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}" |
| 22 | SYSTEMD_SERVICE_${PN} += "${TMPL_ON}" |
| 23 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" |
| 24 | |
| 25 | SRC_URI += "file://zaius_vcs.sh" |
| 26 | RDEPENDS_${PN} += "i2c-tools" |
| 27 | |
| 28 | do_install() { |
| 29 | install -d ${D}${bindir} |
| 30 | install -m 0755 ${WORKDIR}/zaius_vcs.sh ${D}${bindir}/zaius_vcs.sh |
| 31 | } |