blob: 98fb89b5c58eaf20df414dafe110b11d6e7e32bb [file] [log] [blame]
Xo Wang9baac6f2016-12-15 15:24:22 -08001SUMMARY = "Zaius VCS rail control"
2DESCRIPTION = "VCS voltage rail control implementation for Zaius"
3PR = "r0"
4
5inherit obmc-phosphor-systemd
6inherit obmc-phosphor-license
7
8PROVIDES += 'virtual/p9-vcs-workaround'
9RPROVIDES_${PN} += 'virtual-p9-vcs-workaround'
10
11TMPL_OFF = "vcs-off@.service"
12TMPL_ON = "vcs-on@.service"
13INSTFMT_OFF = "vcs-off@{0}.service"
14INSTFMT_ON = "vcs-on@{0}.service"
Josh D. King6cf56c02017-04-06 15:56:37 -050015TGTFMT_OFF = "obmc-host-stop@{0}.target"
Josh D. Kingf5ba9272017-04-06 14:43:46 -050016TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
Xo Wang9baac6f2016-12-15 15:24:22 -080017FMT_OFF = "../${TMPL_OFF}:${TGTFMT_OFF}.wants/${INSTFMT_OFF}"
Matt Spinler12a619a2017-03-30 08:38:28 -050018FMT_ON = "../${TMPL_ON}:${TGTFMT_ON}.requires/${INSTFMT_ON}"
Xo Wang9baac6f2016-12-15 15:24:22 -080019
20SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}"
21SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}"
22SYSTEMD_SERVICE_${PN} += "${TMPL_ON}"
23SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
24
25SRC_URI += "file://zaius_vcs.sh"
26RDEPENDS_${PN} += "i2c-tools"
27
28do_install() {
29 install -d ${D}${bindir}
30 install -m 0755 ${WORKDIR}/zaius_vcs.sh ${D}${bindir}/zaius_vcs.sh
31}