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}" |
Adriana Kobylak | d95d6af | 2019-03-19 10:40:36 -0500 | [diff] [blame] | 11 | SRC_URI_append_swift = " file://swift-avsbus-disable.sh" |
| 12 | SRC_URI_append_swift = " file://swift-avsbus-enable.sh" |
| 13 | SRC_URI_append_swift = " file://swift-power-workarounds.sh" |
| 14 | SRC_URI_append_witherspoon = " file://witherspoon-avsbus-disable.sh" |
| 15 | SRC_URI_append_witherspoon = " file://witherspoon-avsbus-enable.sh" |
| 16 | SRC_URI_append_witherspoon = " file://witherspoon-power-workarounds.sh" |
| 17 | SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-disable.sh" |
| 18 | SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-enable.sh" |
| 19 | SRC_URI_append_witherspoon-128 = " file://witherspoon-power-workarounds.sh" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 20 | |
| 21 | do_install() { |
| 22 | install -d ${D}${bindir} |
Adriana Kobylak | d95d6af | 2019-03-19 10:40:36 -0500 | [diff] [blame] | 23 | } |
| 24 | do_install_append_swift() { |
| 25 | install -m 0755 ${WORKDIR}/swift-avsbus-disable.sh \ |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 26 | ${D}${bindir}/avsbus-disable.sh |
Adriana Kobylak | d95d6af | 2019-03-19 10:40:36 -0500 | [diff] [blame] | 27 | install -m 0755 ${WORKDIR}/swift-avsbus-enable.sh \ |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 28 | ${D}${bindir}/avsbus-enable.sh |
Adriana Kobylak | d95d6af | 2019-03-19 10:40:36 -0500 | [diff] [blame] | 29 | install -m 0755 ${WORKDIR}/swift-power-workarounds.sh \ |
| 30 | ${D}${bindir}/power-workarounds.sh |
| 31 | } |
| 32 | do_install_append_witherspoon() { |
| 33 | install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \ |
| 34 | ${D}${bindir}/avsbus-disable.sh |
| 35 | install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \ |
| 36 | ${D}${bindir}/avsbus-enable.sh |
| 37 | install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \ |
| 38 | ${D}${bindir}/power-workarounds.sh |
| 39 | } |
| 40 | do_install_append_witherspoon-128() { |
| 41 | install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \ |
| 42 | ${D}${bindir}/avsbus-disable.sh |
| 43 | install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \ |
| 44 | ${D}${bindir}/avsbus-enable.sh |
| 45 | install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \ |
| 46 | ${D}${bindir}/power-workarounds.sh |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | TMPL_EN= "avsbus-enable@.service" |
| 50 | TMPL_DIS= "avsbus-disable@.service" |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 51 | TMPL_WA= "power-workarounds@.service" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 52 | INSTFMT_EN= "avsbus-enable@{0}.service" |
| 53 | INSTFMT_DIS= "avsbus-disable@{0}.service" |
Andrew Geissler | e3836fe | 2017-07-28 15:50:00 -0500 | [diff] [blame] | 54 | INSTFMT_WA= "power-workarounds@{0}.service" |
Josh D. King | 5df2fe9 | 2017-04-06 14:43:46 -0500 | [diff] [blame] | 55 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
Andrew Geissler | 1710097 | 2017-02-08 15:54:25 -0600 | [diff] [blame] | 56 | FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}" |
| 57 | FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}" |
| 58 | FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 59 | |
| 60 | SYSTEMD_SERVICE_${PN} += "${TMPL_EN}" |
| 61 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |
| 62 | SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}" |
| 63 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |
| 64 | SYSTEMD_SERVICE_${PN} += "${TMPL_WA}" |
| 65 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" |