blob: 49fcf447b9fb592c9e3aa7b390e70179bfe5d17a [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"
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}"
Ben_Paib24a3e52019-07-15 16:19:02 +080013SRC_URI = "file://ir35221-unbind-bind.sh"
14SRC_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
Ben_Paib24a3e52019-07-15 16:19:02 +080021do_install_append_ibm-ac-server() {
22 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
Ben_Paib24a3e52019-07-15 16:19:02 +080038SYSTEMD_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')}"