Lei YU | b3cb381 | 2016-12-22 16:15:03 +0800 | [diff] [blame] | 1 | SUMMARY = "Romulus CPLD Trigger" |
| 2 | DESCRIPTION = "Romulus power on workaround to trigger CPLD to continue power sequence" |
| 3 | PR = "r0" |
| 4 | |
| 5 | inherit obmc-phosphor-systemd |
| 6 | inherit obmc-phosphor-license |
| 7 | |
| 8 | RDEPENDS_${PN} += "obmc-pydevtools" |
| 9 | |
| 10 | PROVIDES += 'virtual/p9-vcs-workaround' |
| 11 | RPROVIDES_${PN} += 'virtual-p9-vcs-workaround' |
| 12 | |
| 13 | S = "${WORKDIR}" |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 14 | SRC_URI += "file://cpld_trigger.sh \ |
| 15 | file://cpld_reset.sh" |
Lei YU | b3cb381 | 2016-12-22 16:15:03 +0800 | [diff] [blame] | 16 | |
| 17 | do_install() { |
| 18 | install -d ${D}${bindir} |
| 19 | install -m 0755 ${WORKDIR}/cpld_trigger.sh ${D}${bindir}/cpld_trigger.sh |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 20 | install -m 0755 ${WORKDIR}/cpld_reset.sh ${D}${bindir}/cpld_reset.sh |
Lei YU | b3cb381 | 2016-12-22 16:15:03 +0800 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | TMPL = "cpld_trigger@.service" |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 24 | TMPL_RESET = "cpld_reset@.service" |
Lei YU | b3cb381 | 2016-12-22 16:15:03 +0800 | [diff] [blame] | 25 | INSTFMT = "cpld_trigger@{0}.service" |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 26 | INSTFMT_RESET = "cpld_reset@{0}.service" |
Lei YU | d43ec21 | 2017-02-14 16:47:45 +0800 | [diff] [blame] | 27 | TGTFMT = "obmc-power-chassis-on@{0}.target" |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 28 | TGTFMT_RESET = "obmc-power-chassis-off@{0}.target" |
Lei YU | f2e1231 | 2017-02-20 10:22:27 +0800 | [diff] [blame] | 29 | FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" |
| 30 | FMT_RESET = "../${TMPL_RESET}:${TGTFMT_RESET}.requires/${INSTFMT_RESET}" |
Lei YU | b3cb381 | 2016-12-22 16:15:03 +0800 | [diff] [blame] | 31 | |
| 32 | SYSTEMD_SERVICE_${PN} += "${TMPL}" |
| 33 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" |
| 34 | |
Lei YU | 65725b2 | 2017-02-14 20:41:35 +0800 | [diff] [blame] | 35 | SYSTEMD_SERVICE_${PN} += "${TMPL_RESET}" |
| 36 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_RESET', 'OBMC_CHASSIS_INSTANCES')}" |