blob: fe946344114e15d77c16b8cc6545e52c26b129a8 [file] [log] [blame]
Matt Spinlerc1037472016-12-20 09:28:21 -06001SUMMARY = "Witherspoon VRM Overrides"
2DESCRIPTION = "Sets Witherspoon VRMs to custom voltages"
3PR = "r1"
Patrick Venture40ad4b42018-11-05 20:19:24 -08004LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinlerc1037472016-12-20 09:28:21 -06006
Brad Bishopd2cb8b62019-07-17 13:05:31 -04007inherit allarch
Matt Spinlerc1037472016-12-20 09:28:21 -06008inherit obmc-phosphor-systemd
Matt Spinlerc1037472016-12-20 09:28:21 -06009
10RDEPENDS_${PN} += "i2c-tools bash"
11
12S = "${WORKDIR}"
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050013SRC_URI += "file://vrm-control.sh \
14 file://ir35221-unbind-bind.sh"
Matt Spinlerc1037472016-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 Bosticdc8e2b62017-06-07 16:12:27 -050019 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Matt Spinlerc1037472016-12-20 09:28:21 -060020}
21
22TMPL = "vrm-control@.service"
23INSTFMT = "vrm-control@{0}.service"
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050024TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
25FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinlerc1037472016-12-20 09:28:21 -060026
Christopher Bosticdc8e2b62017-06-07 16:12:27 -050027TMPL_ON_IRBIND = "ir35221-on-bind@.service"
28INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
Matt Spinlerfcf49f82018-05-25 12:34:32 -050029FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}"
Christopher Bosticdc8e2b62017-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 Spinlereecf1c22017-12-05 15:25:53 -060035SYSTEMD_SERVICE_${PN} += "${TMPL} ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Christopher Bosticdc8e2b62017-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')}"