Ben_Pai | b24a3e5 | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 1 | SUMMARY = "VRM Overrides" |
| 2 | DESCRIPTION = "Sets VRMs to custom voltages" |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 3 | PR = "r1" |
Brad Bishop | 6738f35 | 2018-11-07 13:04:06 -0800 | [diff] [blame] | 4 | LICENSE = "Apache-2.0" |
Brad Bishop | d77088a | 2019-09-13 13:06:15 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 6 | |
Brad Bishop | e3134ff | 2019-07-17 13:05:31 -0400 | [diff] [blame] | 7 | inherit allarch |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 8 | inherit obmc-phosphor-systemd |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 9 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 10 | RDEPENDS:${PN} += "i2c-tools bash" |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 11 | |
| 12 | S = "${WORKDIR}" |
Ben_Pai | b24a3e5 | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 13 | SRC_URI = "file://ir35221-unbind-bind.sh" |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 14 | SRC_URI:append:ibm-ac-server = " file://vrm-control.sh" |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 15 | |
| 16 | do_install() { |
| 17 | install -d ${D}${bindir} |
Christopher Bostic | 1fd06ed | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 18 | install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 19 | } |
| 20 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 21 | do_install:append:ibm-ac-server() { |
Ben_Pai | b24a3e5 | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 22 | install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh |
| 23 | } |
| 24 | |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 25 | TMPL = "vrm-control@.service" |
| 26 | INSTFMT = "vrm-control@{0}.service" |
Christopher Bostic | 1fd06ed | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 27 | TGTFMT_ON = "obmc-chassis-poweron@{0}.target" |
| 28 | FMT_ON = "../${TMPL}:${TGTFMT_ON}.requires/${INSTFMT}" |
Matt Spinler | 5c7c388 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 29 | |
Christopher Bostic | 1fd06ed | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 30 | TMPL_ON_IRBIND = "ir35221-on-bind@.service" |
| 31 | INSTFMT_ON_IRBIND = "ir35221-on-bind@{0}.service" |
Matt Spinler | dd8cfa6 | 2018-05-25 12:34:32 -0500 | [diff] [blame] | 32 | FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}" |
Christopher Bostic | 1fd06ed | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 33 | |
| 34 | TMPL_ON_IRUNBIND = "ir35221-on-unbind@.service" |
| 35 | INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service" |
| 36 | FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}" |
| 37 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 38 | SYSTEMD_SERVICE:${PN} += "${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}" |
| 39 | SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 40 | SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" |
| 41 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}" |
| 42 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}" |