blob: e1c8aedb7d051efb670d174c65239b4fd170a382 [file] [log] [blame]
Matt Spinlerc1037472016-12-20 09:28:21 -06001SUMMARY = "Witherspoon VRM Overrides"
2DESCRIPTION = "Sets Witherspoon VRMs to custom voltages"
3PR = "r1"
4
5inherit obmc-phosphor-systemd
6inherit obmc-phosphor-license
7
8RDEPENDS_${PN} += "i2c-tools bash"
9
10S = "${WORKDIR}"
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050011SRC_URI += "file://vrm-control.sh \
12 file://ir35221-unbind-bind.sh"
Matt Spinlerc1037472016-12-20 09:28:21 -060013
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050017 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Matt Spinlerc1037472016-12-20 09:28:21 -060018}
19
20TMPL = "vrm-control@.service"
21INSTFMT = "vrm-control@{0}.service"
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050022TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
23FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinlerc1037472016-12-20 09:28:21 -060024
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050025TMPL_ON_IRBIND = "ir35221-on-bind@.service"
26INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
27FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRBIND}"
28
29TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service"
30INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service"
31FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}"
32
Matt Spinlereecf1c22017-12-05 15:25:53 -060033SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050034SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
35SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
36SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"