blob: 36416e949d8a54a23db6caca4e853ce92308b18b [file] [log] [blame]
Matt Spinler5c7c3882016-12-20 09:28:21 -06001SUMMARY = "Witherspoon VRM Overrides"
2DESCRIPTION = "Sets Witherspoon VRMs to custom voltages"
3PR = "r1"
Brad Bishop6738f352018-11-07 13:04:06 -08004LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinler5c7c3882016-12-20 09:28:21 -06006
7inherit obmc-phosphor-systemd
Matt Spinler5c7c3882016-12-20 09:28:21 -06008
9RDEPENDS_${PN} += "i2c-tools bash"
10
11S = "${WORKDIR}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050012SRC_URI += "file://vrm-control.sh \
13 file://ir35221-unbind-bind.sh"
Matt Spinler5c7c3882016-12-20 09:28:21 -060014
15do_install() {
16 install -d ${D}${bindir}
17 install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050018 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Matt Spinler5c7c3882016-12-20 09:28:21 -060019}
20
21TMPL = "vrm-control@.service"
22INSTFMT = "vrm-control@{0}.service"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050023TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
24FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinler5c7c3882016-12-20 09:28:21 -060025
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050026TMPL_ON_IRBIND = "ir35221-on-bind@.service"
27INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
Matt Spinlerdd8cfa62018-05-25 12:34:32 -050028FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050029
30TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service"
31INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service"
32FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}"
33
Matt Spinler41291922017-12-05 15:25:53 -060034SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050035SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
36SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
37SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"