blob: e2c09e1bf4a6ee07ce974c592a9966aeb842bbe1 [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
33TGTFMT_OFF = "obmc-chassis-poweroff@{0}.target"
34
35TMPL_OFF_IRBIND = "ir35221-off-bind@.service"
36INSTFMT_OFF_IRBIND = "ir35221-off-bind@{0}.service"
37FMT_OFF_IRBIND = "../${TMPL_OFF_IRBIND}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_IRBIND}"
38
39TMPL_OFF_IRUNBIND = "ir35221-off-unbind@.service"
40INSTFMT_OFF_IRUNBIND = "ir35221-off-unbind@{0}.service"
41FMT_OFF_IRUNBIND = "../${TMPL_OFF_IRUNBIND}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_IRUNBIND}"
42
43SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND} ${TMPL_OFF_IRUNBIND} ${TMPL_OFF_IRBIND}"
44SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
45SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
46SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"
47SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
48SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"