blob: d2804dfcadcfa5a172674ddebb00be7fc05fa1dd [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
Brad Bishop3168dfa2019-06-19 16:32:15 -04006inherit allarch
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06007inherit obmc-phosphor-systemd
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06008
9RDEPENDS_${PN} += "i2c-tools"
10
11S = "${WORKDIR}"
Adriana Kobylakcd6c8352019-05-09 11:44:47 -050012
13SRC_URI += "file://avsbus-disable.sh \
Matt Spinler65ced222019-06-12 10:03:29 -050014 file://avsbus-enable.sh"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060015
16do_install() {
17 install -d ${D}${bindir}
Adriana Kobylakcd6c8352019-05-09 11:44:47 -050018 install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
19 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060020}
21
22TMPL_EN= "avsbus-enable@.service"
23TMPL_DIS= "avsbus-disable@.service"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060024INSTFMT_EN= "avsbus-enable@{0}.service"
25INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050026TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060027FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
28FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060029
30SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
31SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
32SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
33SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"