blob: 8a9ef7faecbe353c46b6f054624607c6b65ff4bf [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}"
Ben_Paib24a3e52019-07-15 16:19:02 +080013SRC_URI = "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
16do_install() {
17 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
Matt Spinler5c7c3882016-12-20 09:28:21 -060019}
20
Adriana Kobylakb96c7502021-08-06 16:25:30 +000021do_install:append:ibm-ac-server() {
Ben_Paib24a3e52019-07-15 16:19:02 +080022 install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
23}
24
Matt Spinler5c7c3882016-12-20 09:28:21 -060025TMPL = "vrm-control@.service"
26INSTFMT = "vrm-control@{0}.service"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050027TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
28FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}"
Matt Spinler5c7c3882016-12-20 09:28:21 -060029
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050030TMPL_ON_IRBIND = "ir35221-on-bind@.service"
31INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service"
Matt Spinlerdd8cfa62018-05-25 12:34:32 -050032FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050033
34TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service"
35INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service"
36FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}"
37
Adriana Kobylakb96c7502021-08-06 16:25:30 +000038SYSTEMD_SERVICE:${PN} += "${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
39SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL}"
40SYSTEMD_LINK_${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
Christopher Bostic1fd06ed2017-06-07 16:12:27 -050041SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
42SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"