Ben_Pai | c53430a | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 1 | SUMMARY = "VRM Overrides" |
| 2 | DESCRIPTION = "Sets VRMs to custom voltages" |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 3 | PR = "r1" |
Patrick Venture | 40ad4b4 | 2018-11-05 20:19:24 -0800 | [diff] [blame] | 4 | LICENSE = "Apache-2.0" |
Brad Bishop | cbbb0e5 | 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 | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 6 | |
Brad Bishop | d2cb8b6 | 2019-07-17 13:05:31 -0400 | [diff] [blame] | 7 | inherit allarch |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 8 | inherit obmc-phosphor-systemd |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 9 | |
| 10 | RDEPENDS_${PN} += "i2c-tools bash" |
| 11 | |
| 12 | S = "${WORKDIR}" |
Ben_Pai | c53430a | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 13 | SRC_URI = "file://ir35221-unbind-bind.sh" |
| 14 | SRC_URI_append_ibm-ac-server = " file://vrm-control.sh" |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 15 | |
| 16 | do_install() { |
| 17 | install -d ${D}${bindir} |
Christopher Bostic | dc8e2b6 | 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 | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 19 | } |
| 20 | |
Ben_Pai | c53430a | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 21 | do_install_append_ibm-ac-server() { |
| 22 | install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh |
| 23 | } |
| 24 | |
Matt Spinler | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 25 | TMPL = "vrm-control@.service" |
| 26 | INSTFMT = "vrm-control@{0}.service" |
Christopher Bostic | dc8e2b6 | 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 | c103747 | 2016-12-20 09:28:21 -0600 | [diff] [blame] | 29 | |
Christopher Bostic | dc8e2b6 | 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 | fcf49f8 | 2018-05-25 12:34:32 -0500 | [diff] [blame] | 32 | FMT_ON_IRBIND = "../${TMPL_ON_IRBIND}:${TGTFMT_ON}.wants/${INSTFMT_ON_IRBIND}" |
Christopher Bostic | dc8e2b6 | 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 | |
Ben_Pai | c53430a | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 38 | SYSTEMD_SERVICE_${PN} += "${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}" |
| 39 | SYSTEMD_SERVICE_${PN}_append_ibm-ac-server = " ${TMPL}" |
| 40 | SYSTEMD_LINK_${PN}_append_ibm-ac-server = " ${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" |
Christopher Bostic | dc8e2b6 | 2017-06-07 16:12:27 -0500 | [diff] [blame] | 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')}" |