blob: aa14203181ffeed52dd2bc5b6f86833c999bb472 [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"
15TGTFMT_OFF = "obmc-chassis-stop@{0}.target"
16TGTFMT_ON = "obmc-chassis-start@{0}.target"
17FMT_OFF = "../${TMPL_OFF}:${TGTFMT_OFF}.wants/${INSTFMT_OFF}"
18FMT_ON = "../${TMPL_ON}:${TGTFMT_ON}.wants/${INSTFMT_ON}"
19
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}