blob: fe946344114e15d77c16b8cc6545e52c26b129a8 [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
Brad Bishope3134ff2019-07-17 13:05:31 -04007inherit allarch
Matt Spinler5c7c3882016-12-20 09:28:21 -06008inherit obmc-phosphor-systemd
Matt Spinler5c7c3882016-12-20 09:28:21 -06009
10RDEPENDS_${PN} += "i2c-tools bash"
11
12S = "${WORKDIR}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050013SRC_URI += "file://vrm-control.sh \
14 file://ir35221-unbind-bind.sh"
Matt Spinler5c7c3882016-12-20 09:28:21 -060015
16do_install() {
17 install -d ${D}${bindir}
18 install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050019 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Matt Spinler5c7c3882016-12-20 09:28:21 -060020}
21
22TMPL = "vrm-control@.service"
23INSTFMT = "vrm-control@{0}.service"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050024TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
25FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinler5c7c3882016-12-20 09:28:21 -060026
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050027TMPL_ON_IRBIND = "ir35221-on-bind@.service"
28INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
Matt Spinlerdd8cfa62018-05-25 12:34:32 -050029FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050030
31TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service"
32INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service"
33FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}"
34
Matt Spinler41291922017-12-05 15:25:53 -060035SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050036SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
37SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
38SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"