blob: d05e67fb9cdce4870ca76f9ad4bf5acac8903b54 [file] [log] [blame]
Matt Spinler5c7c3882016-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 Bostic1fd06ed2017-06-07 16:12:27 -050011SRC_URI += "file://vrm-control.sh \
12 file://ir35221-unbind-bind.sh"
Matt Spinler5c7c3882016-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 Bostic1fd06ed2017-06-07 16:12:27 -050017 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Matt Spinler5c7c3882016-12-20 09:28:21 -060018}
19
20TMPL = "vrm-control@.service"
21INSTFMT = "vrm-control@{0}.service"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050022TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
23FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinler5c7c3882016-12-20 09:28:21 -060024
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050025TMPL_ON_IRBIND = "ir35221-on-bind@.service"
26INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
Matt Spinlerdd8cfa62018-05-25 12:34:32 -050027FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050028
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 Spinler41291922017-12-05 15:25:53 -060033SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Christopher Bostic1fd06ed2017-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')}"