blob: ca45a1eb372f79c04b4a9d7d3869aa898e1bd6c9 [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"
4LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
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')}"