blob: 3c618a6b5d212eedf6ecc809e44f88842f5506e7 [file] [log] [blame]
Matt Spinler76e9a062016-12-20 10:59:13 -06001SUMMARY = "Witherspoon AVSBus control"
2PR = "r1"
Brad Bishop6738f352018-11-07 13:04:06 -08003LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinler76e9a062016-12-20 10:59:13 -06005
6inherit obmc-phosphor-systemd
Matt Spinler76e9a062016-12-20 10:59:13 -06007
8RDEPENDS_${PN} += "i2c-tools"
9
10S = "${WORKDIR}"
Adriana Kobylak00435012019-05-09 11:44:47 -050011
12SRC_URI += "file://avsbus-disable.sh \
Matt Spinlerde4c6b02019-06-12 10:03:29 -050013 file://avsbus-enable.sh"
Matt Spinler76e9a062016-12-20 10:59:13 -060014
15do_install() {
16 install -d ${D}${bindir}
Adriana Kobylak00435012019-05-09 11:44:47 -050017 install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
18 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Matt Spinler76e9a062016-12-20 10:59:13 -060019}
20
21TMPL_EN= "avsbus-enable@.service"
22TMPL_DIS= "avsbus-disable@.service"
Matt Spinler76e9a062016-12-20 10:59:13 -060023INSTFMT_EN= "avsbus-enable@{0}.service"
24INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. Kingb9ee5362017-04-06 14:43:46 -050025TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler3c35a8c2017-02-08 15:54:25 -060026FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
27FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Matt Spinler76e9a062016-12-20 10:59:13 -060028
29SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
30SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
31SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
32SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"