Sergey Solomin | 67305e3 | 2016-11-28 15:03:24 -0600 | [diff] [blame] | 1 | SUMMARY = "Witherspoon P9 power on" |
| 2 | DESCRIPTION = "Witherspoon power on workaround" |
| 3 | PR = "r1" |
| 4 | |
| 5 | inherit obmc-phosphor-systemd |
| 6 | inherit obmc-phosphor-license |
| 7 | |
| 8 | RDEPENDS_${PN} += "i2c-tools" |
| 9 | |
| 10 | PROVIDES += 'virtual/p9-vcs-workaround' |
| 11 | RPROVIDES_${PN} += 'virtual-p9-vcs-workaround' |
| 12 | |
| 13 | S = "${WORKDIR}" |
| 14 | SRC_URI += "file://vcs_off.sh \ |
| 15 | file://vcs_on.sh \ |
| 16 | file://ucd_disable_vcs.sh" |
| 17 | |
| 18 | do_install() { |
| 19 | install -d ${D}${bindir} |
| 20 | install -m 0755 ${WORKDIR}/vcs_off.sh ${D}${bindir}/vcs_off.sh |
| 21 | install -m 0755 ${WORKDIR}/vcs_on.sh ${D}${bindir}/vcs_on.sh |
| 22 | install -m 0755 ${WORKDIR}/ucd_disable_vcs.sh \ |
| 23 | ${D}${bindir}/ucd_disable_vcs.sh |
| 24 | } |
| 25 | |
| 26 | TMPL_OFF = "vcs_off@.service" |
Matt Spinler | 01e9468 | 2016-12-20 13:11:58 -0600 | [diff] [blame] | 27 | TMPL_OFF_PO = "vcs_off_poweroff@.service" |
Sergey Solomin | 67305e3 | 2016-11-28 15:03:24 -0600 | [diff] [blame] | 28 | TMPL_ON = "vcs_on@.service" |
| 29 | TMPL_UCD = "ucd_disable_vcs@.service" |
| 30 | INSTFMT_OFF = "vcs_off@{0}.service" |
Matt Spinler | 01e9468 | 2016-12-20 13:11:58 -0600 | [diff] [blame] | 31 | INSTFMT_OFF_PO = "vcs_off_poweroff@{0}.service" |
Sergey Solomin | 67305e3 | 2016-11-28 15:03:24 -0600 | [diff] [blame] | 32 | INSTFMT_ON = "vcs_on@{0}.service" |
| 33 | INSTFMT_UCD = "ucd_disable_vcs@{0}.service" |
Josh D. King | 9d5d7f4 | 2017-04-06 14:43:46 -0500 | [diff] [blame] | 34 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
| 35 | TGTFMT_OFF= "obmc-chassis-poweroff@{0}.target" |
Andrew Geissler | 163fc00 | 2017-02-08 15:54:25 -0600 | [diff] [blame] | 36 | FMT_OFF = "../${TMPL_OFF}:${TGTFMT}.requires/${INSTFMT_OFF}" |
| 37 | FMT_ON = "../${TMPL_ON}:${TGTFMT}.requires/${INSTFMT_ON}" |
| 38 | FMT_UCD = "../${TMPL_UCD}:${TGTFMT}.requires/${INSTFMT_UCD}" |
| 39 | FMT_OFF_PO = "../${TMPL_OFF_PO}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_PO}" |
Sergey Solomin | 67305e3 | 2016-11-28 15:03:24 -0600 | [diff] [blame] | 40 | |
| 41 | SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}" |
| 42 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}" |
| 43 | SYSTEMD_SERVICE_${PN} += "${TMPL_ON}" |
| 44 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" |
| 45 | SYSTEMD_SERVICE_${PN} += "${TMPL_UCD}" |
| 46 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_UCD', 'OBMC_CHASSIS_INSTANCES')}" |
Matt Spinler | 01e9468 | 2016-12-20 13:11:58 -0600 | [diff] [blame] | 47 | SYSTEMD_SERVICE_${PN} += "${TMPL_OFF_PO}" |
| 48 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_PO', 'OBMC_CHASSIS_INSTANCES')}" |
Sergey Solomin | 67305e3 | 2016-11-28 15:03:24 -0600 | [diff] [blame] | 49 | |