Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 1 | SUMMARY = "Witherspoon AVSBus control" |
| 2 | PR = "r1" |
Patrick Venture | baccb76 | 2018-11-05 20:19:02 -0800 | [diff] [blame] | 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 5 | |
| 6 | inherit obmc-phosphor-systemd |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 7 | |
| 8 | RDEPENDS_${PN} += "i2c-tools" |
| 9 | |
| 10 | S = "${WORKDIR}" |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 11 | SRC_URI += "file://power-workarounds.sh \ |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 12 | file://avsbus-enable.sh \ |
| 13 | file://avsbus-disable.sh" |
| 14 | |
| 15 | do_install() { |
| 16 | install -d ${D}${bindir} |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 17 | install -m 0755 ${WORKDIR}/power-workarounds.sh \ |
| 18 | ${D}${bindir}/power-workarounds.sh |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 19 | install -m 0755 ${WORKDIR}/avsbus-disable.sh \ |
| 20 | ${D}${bindir}/avsbus-disable.sh |
| 21 | install -m 0755 ${WORKDIR}/avsbus-enable.sh \ |
| 22 | ${D}${bindir}/avsbus-enable.sh |
| 23 | } |
| 24 | |
| 25 | TMPL_EN= "avsbus-enable@.service" |
| 26 | TMPL_DIS= "avsbus-disable@.service" |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 27 | TMPL_WA= "power-workarounds@.service" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 28 | INSTFMT_EN= "avsbus-enable@{0}.service" |
| 29 | INSTFMT_DIS= "avsbus-disable@{0}.service" |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 30 | INSTFMT_WA= "power-workarounds@{0}.service" |
Josh D. King | 5df2fe9 | 2017-04-06 14:43:46 -0500 | [diff] [blame] | 31 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
Andrew Geissler | 1710097 | 2017-02-08 15:54:25 -0600 | [diff] [blame] | 32 | FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}" |
| 33 | FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}" |
| 34 | FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 35 | |
| 36 | SYSTEMD_SERVICE_${PN} += "${TMPL_EN}" |
| 37 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |
| 38 | SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}" |
| 39 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |
| 40 | SYSTEMD_SERVICE_${PN} += "${TMPL_WA}" |
| 41 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" |