blob: 5abe1be1faea06d5e96f013e50ac2240b2965d5e [file] [log] [blame]
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06001SUMMARY = "Witherspoon AVSBus control"
2PR = "r1"
Patrick Venturebaccb762018-11-05 20:19:02 -08003LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06005
6inherit obmc-phosphor-systemd
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06007
8RDEPENDS_${PN} += "i2c-tools"
9
10S = "${WORKDIR}"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050011SRC_URI += "file://power-workarounds.sh \
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060012 file://avsbus-enable.sh \
13 file://avsbus-disable.sh"
14
15do_install() {
16 install -d ${D}${bindir}
Andrew Geisslere3836fe2017-07-28 15:50:00 -050017 install -m 0755 ${WORKDIR}/power-workarounds.sh \
18 ${D}${bindir}/power-workarounds.sh
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060019 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
25TMPL_EN= "avsbus-enable@.service"
26TMPL_DIS= "avsbus-disable@.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050027TMPL_WA= "power-workarounds@.service"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060028INSTFMT_EN= "avsbus-enable@{0}.service"
29INSTFMT_DIS= "avsbus-disable@{0}.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050030INSTFMT_WA= "power-workarounds@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050031TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060032FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
33FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
34FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060035
36SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
37SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
38SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
39SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
40SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
41SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"