blob: a09cdc750ea3a538475764e6f8e48fceccf1f71b [file] [log] [blame]
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06001SUMMARY = "Witherspoon AVSBus control"
2PR = "r1"
3
4inherit obmc-phosphor-systemd
5inherit obmc-phosphor-license
6
7RDEPENDS_${PN} += "i2c-tools"
8
9S = "${WORKDIR}"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050010SRC_URI += "file://power-workarounds.sh \
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060011 file://avsbus-enable.sh \
12 file://avsbus-disable.sh"
13
14do_install() {
15 install -d ${D}${bindir}
Andrew Geisslere3836fe2017-07-28 15:50:00 -050016 install -m 0755 ${WORKDIR}/power-workarounds.sh \
17 ${D}${bindir}/power-workarounds.sh
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060018 install -m 0755 ${WORKDIR}/avsbus-disable.sh \
19 ${D}${bindir}/avsbus-disable.sh
20 install -m 0755 ${WORKDIR}/avsbus-enable.sh \
21 ${D}${bindir}/avsbus-enable.sh
22}
23
24TMPL_EN= "avsbus-enable@.service"
25TMPL_DIS= "avsbus-disable@.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050026TMPL_WA= "power-workarounds@.service"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060027INSTFMT_EN= "avsbus-enable@{0}.service"
28INSTFMT_DIS= "avsbus-disable@{0}.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050029INSTFMT_WA= "power-workarounds@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050030TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060031FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
32FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
33FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060034
35SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
36SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
37SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
38SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
39SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
40SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"