blob: f7ed43038c8fb23ab923628aafa5382a2630fb62 [file] [log] [blame]
Lei YU3dd1eea2016-12-27 14:43:14 +08001SUMMARY = "Romulus AVSBus control"
2PR = "r1"
Brad Bishop6738f352018-11-07 13:04:06 -08003LICENSE = "Apache-2.0"
Brad Bishopd77088a2019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Lei YU3dd1eea2016-12-27 14:43:14 +08005
6inherit obmc-phosphor-systemd
Lei YU3dd1eea2016-12-27 14:43:14 +08007
8RDEPENDS_${PN} += "i2c-tools bash"
9
10S = "${WORKDIR}"
Joel Stanley8b98be12018-10-31 12:24:32 +103011SRC_URI += "file://avsbus-enable.sh \
Lei YU3dd1eea2016-12-27 14:43:14 +080012 file://avsbus-disable.sh"
13
14do_install() {
15 install -d ${D}${bindir}
Lei YU3dd1eea2016-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 YU3dd1eea2016-12-27 14:43:14 +080024INSTFMT_EN= "avsbus-enable@{0}.service"
25INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. Kingb9ee5362017-04-06 14:43:46 -050026TGTFMT = "obmc-chassis-poweron@{0}.target"
Lei YUfeb59cb2017-02-20 10:22:27 +080027FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
28FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Lei YU3dd1eea2016-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')}"