blob: f7ed43038c8fb23ab923628aafa5382a2630fb62 [file] [log] [blame]
Lei YUaaad5a52016-12-27 14:43:14 +08001SUMMARY = "Romulus AVSBus control"
2PR = "r1"
Patrick Ventureb97d3f12018-11-05 20:06:29 -08003LICENSE = "Apache-2.0"
Brad Bishopcbbb0e52019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Lei YUaaad5a52016-12-27 14:43:14 +08005
6inherit obmc-phosphor-systemd
Lei YUaaad5a52016-12-27 14:43:14 +08007
8RDEPENDS_${PN} += "i2c-tools bash"
9
10S = "${WORKDIR}"
Joel Stanleybaedc912018-10-31 12:24:32 +103011SRC_URI += "file://avsbus-enable.sh \
Lei YUaaad5a52016-12-27 14:43:14 +080012 file://avsbus-disable.sh"
13
14do_install() {
15 install -d ${D}${bindir}
Lei YUaaad5a52016-12-27 14:43:14 +080016 install -m 0755 ${WORKDIR}/avsbus-disable.sh \
17 ${D}${bindir}/avsbus-disable.sh
18 install -m 0755 ${WORKDIR}/avsbus-enable.sh \
19 ${D}${bindir}/avsbus-enable.sh
20}
21
22TMPL_EN= "avsbus-enable@.service"
23TMPL_DIS= "avsbus-disable@.service"
Lei YUaaad5a52016-12-27 14:43:14 +080024INSTFMT_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"
Lei YUf2e12312017-02-20 10:22:27 +080027FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
28FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Lei YUaaad5a52016-12-27 14:43:14 +080029
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')}"