Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 1 | SUMMARY = "Witherspoon VRM Overrides" |
| 2 | DESCRIPTION = "Sets Witherspoon VRMs to custom voltages" |
| 3 | PR = "r1" |
| 4 | |
| 5 | inherit obmc-phosphor-systemd |
| 6 | inherit obmc-phosphor-license |
| 7 | |
| 8 | RDEPENDS_${PN} += "i2c-tools bash" |
| 9 | |
| 10 | S = "${WORKDIR}" |
Christopher Bostic | dc8e2b6 | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 11 | SRC_URI += "file://vrm-control.sh \ |
| 12 | file://ir35221-unbind-bind.sh" |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 13 | |
| 14 | do_install() { |
| 15 | install -d ${D}${bindir} |
| 16 | install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh |
Christopher Bostic | dc8e2b6 | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 17 | install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | TMPL = "vrm-control@.service" |
| 21 | INSTFMT = "vrm-control@{0}.service" |
Christopher Bostic | dc8e2b6 | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 22 | TGTFMT_ON = "obmc-chassis-poweron@{0}.target" |
| 23 | FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}" |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 24 | |
Christopher Bostic | dc8e2b6 | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 25 | TMPL_ON_IRBIND = "ir35221-on-bind@.service" |
| 26 | INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service" |
| 27 | FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRBIND}" |
| 28 | |
| 29 | TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service" |
| 30 | INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service" |
| 31 | FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}" |
| 32 | |
| 33 | TGTFMT_OFF = "obmc-chassis-poweroff@{0}.target" |
| 34 | |
| 35 | TMPL_OFF_IRBIND = "ir35221-off-bind@.service" |
| 36 | INSTFMT_OFF_IRBIND = "ir35221-off-bind@{0}.service" |
| 37 | FMT_OFF_IRBIND = "../${TMPL_OFF_IRBIND}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_IRBIND}" |
| 38 | |
| 39 | TMPL_OFF_IRUNBIND = "ir35221-off-unbind@.service" |
| 40 | INSTFMT_OFF_IRUNBIND = "ir35221-off-unbind@{0}.service" |
| 41 | FMT_OFF_IRUNBIND = "../${TMPL_OFF_IRUNBIND}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_IRUNBIND}" |
| 42 | |
| 43 | SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND} ${TMPL_OFF_IRUNBIND} ${TMPL_OFF_IRBIND}" |
| 44 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" |
| 45 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}" |
| 46 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}" |
| 47 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_IRBIND', 'OBMC_CHASSIS_INSTANCES')}" |
| 48 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}" |