blob: ec7eecaf994d9dcd6e948c7c29b6b32ef4f2aa14 [file] [log] [blame]
Sergey Solomin7f8a4f92016-11-28 15:03:24 -06001SUMMARY = "Witherspoon P9 power on"
2DESCRIPTION = "Witherspoon power on workaround"
3PR = "r1"
4
5inherit obmc-phosphor-systemd
6inherit obmc-phosphor-license
7
8RDEPENDS_${PN} += "i2c-tools"
9
10PROVIDES += 'virtual/p9-vcs-workaround'
11RPROVIDES_${PN} += 'virtual-p9-vcs-workaround'
12
13S = "${WORKDIR}"
14SRC_URI += "file://vcs_off.sh \
15 file://vcs_on.sh \
16 file://ucd_disable_vcs.sh"
17
18do_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
26TMPL_OFF = "vcs_off@.service"
Matt Spinler085288b2016-12-20 13:11:58 -060027TMPL_OFF_PO = "vcs_off_poweroff@.service"
Sergey Solomin7f8a4f92016-11-28 15:03:24 -060028TMPL_ON = "vcs_on@.service"
29TMPL_UCD = "ucd_disable_vcs@.service"
30INSTFMT_OFF = "vcs_off@{0}.service"
Matt Spinler085288b2016-12-20 13:11:58 -060031INSTFMT_OFF_PO = "vcs_off_poweroff@{0}.service"
Sergey Solomin7f8a4f92016-11-28 15:03:24 -060032INSTFMT_ON = "vcs_on@{0}.service"
33INSTFMT_UCD = "ucd_disable_vcs@{0}.service"
Andrew Geisslera95b7bd2017-01-30 12:42:40 -060034TGTFMT = "obmc-power-chassis-on@{0}.target"
35TGTFMT_OFF= "obmc-power-chassis-off@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060036FMT_OFF = "../${TMPL_OFF}:${TGTFMT}.requires/${INSTFMT_OFF}"
37FMT_ON = "../${TMPL_ON}:${TGTFMT}.requires/${INSTFMT_ON}"
38FMT_UCD = "../${TMPL_UCD}:${TGTFMT}.requires/${INSTFMT_UCD}"
39FMT_OFF_PO = "../${TMPL_OFF_PO}:${TGTFMT_OFF}.requires/${INSTFMT_OFF_PO}"
Sergey Solomin7f8a4f92016-11-28 15:03:24 -060040
41SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}"
42SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}"
43SYSTEMD_SERVICE_${PN} += "${TMPL_ON}"
44SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
45SYSTEMD_SERVICE_${PN} += "${TMPL_UCD}"
46SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_UCD', 'OBMC_CHASSIS_INSTANCES')}"
Matt Spinler085288b2016-12-20 13:11:58 -060047SYSTEMD_SERVICE_${PN} += "${TMPL_OFF_PO}"
48SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_PO', 'OBMC_CHASSIS_INSTANCES')}"
Sergey Solomin7f8a4f92016-11-28 15:03:24 -060049