1SUMMARY = "AVSBus control"
2PR = "r1"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6inherit allarch
7inherit obmc-phosphor-systemd
8
9RDEPENDS:${PN} += "i2c-tools"
10
11S = "${WORKDIR}"
12
13SRC_URI += "file://avsbus-enable.sh"
14SRC_URI:append:witherspoon = " file://avsbus-disable.sh"
15
16do_install() {
17        install -d ${D}${bindir}
18        install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
19}
20
21do_install:append:witherspoon() {
22        install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
23}
24
25TMPL_EN= "avsbus-enable@.service"
26TMPL_DIS= "avsbus-disable@.service"
27INSTFMT_EN= "avsbus-enable@{0}.service"
28INSTFMT_DIS= "avsbus-disable@{0}.service"
29TGTFMT = "obmc-chassis-poweron@{0}.target"
30FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
31FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
32
33SYSTEMD_SERVICE:${PN} += "${TMPL_EN}"
34SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
35SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_DIS}"
36SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
37