blob: 36b77a03d8e21647585d3f14fe5567a76fe3644f [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
Adriana Kobylakb96c7502021-08-06 16:25:30 +00008RDEPENDS:${PN} += "i2c-tools bash"
Lei YU3dd1eea2016-12-27 14:43:14 +08009
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
Adriana Kobylakb96c7502021-08-06 16:25:30 +000030SYSTEMD_SERVICE:${PN} += "${TMPL_EN}"
Patrick Williamse83c2202021-09-01 16:17:33 -050031SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000032SYSTEMD_SERVICE:${PN} += "${TMPL_DIS}"
Patrick Williamse83c2202021-09-01 16:17:33 -050033SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"