blob: 7b3eaa594893d4338e919a4c0a478d1ec0020e96 [file] [log] [blame]
Ben_Paib24a3e52019-07-15 16:19:02 +08001SUMMARY = "VRM Overrides"
2DESCRIPTION = "Sets VRMs to custom voltages"
Matt Spinler5c7c3882016-12-20 09:28:21 -06003PR = "r1"
Brad Bishop6738f352018-11-07 13:04:06 -08004LICENSE = "Apache-2.0"
Brad Bishopd77088a2019-09-13 13:06:15 -04005LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
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
Adriana Kobylakb96c7502021-08-06 16:25:30 +000010RDEPENDS:${PN} += "i2c-tools bash"
Matt Spinler5c7c3882016-12-20 09:28:21 -060011
12S = "${WORKDIR}"
Andrew Geissler319bf072022-07-18 15:14:27 -040013SRC_URI:append:ibm-ac-server = " file://ir35221-unbind-bind.sh"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000014SRC_URI:append:ibm-ac-server = " file://vrm-control.sh"
Matt Spinler5c7c3882016-12-20 09:28:21 -060015
Andrew Geissler319bf072022-07-18 15:14:27 -040016do_install:ibm-ac-server() {
Matt Spinler5c7c3882016-12-20 09:28:21 -060017 install -d ${D}${bindir}
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050018 install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
Ben_Paib24a3e52019-07-15 16:19:02 +080019 install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
20}
21
Matt Spinler5c7c3882016-12-20 09:28:21 -060022TMPL = "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
Andrew Geissler319bf072022-07-18 15:14:27 -040035SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000036SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050037SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler319bf072022-07-18 15:14:27 -040038SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
39SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"