blob: 252d2cbfcc75711e97868d2041ff547653460076 [file] [log] [blame]
Lei YUaaad5a52016-12-27 14:43:14 +08001SUMMARY = "Romulus AVSBus control"
2PR = "r1"
3
4inherit obmc-phosphor-systemd
5inherit obmc-phosphor-license
6
7RDEPENDS_${PN} += "i2c-tools bash"
8
9S = "${WORKDIR}"
Joel Stanleybaedc912018-10-31 12:24:32 +103010SRC_URI += "file://avsbus-enable.sh \
Lei YUaaad5a52016-12-27 14:43:14 +080011 file://avsbus-disable.sh"
12
13do_install() {
14 install -d ${D}${bindir}
Lei YUaaad5a52016-12-27 14:43:14 +080015 install -m 0755 ${WORKDIR}/avsbus-disable.sh \
16 ${D}${bindir}/avsbus-disable.sh
17 install -m 0755 ${WORKDIR}/avsbus-enable.sh \
18 ${D}${bindir}/avsbus-enable.sh
19}
20
21TMPL_EN= "avsbus-enable@.service"
22TMPL_DIS= "avsbus-disable@.service"
Lei YUaaad5a52016-12-27 14:43:14 +080023INSTFMT_EN= "avsbus-enable@{0}.service"
24INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050025TGTFMT = "obmc-chassis-poweron@{0}.target"
Lei YUf2e12312017-02-20 10:22:27 +080026FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
27FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Lei YUaaad5a52016-12-27 14:43:14 +080028
29SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
30SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
31SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
32SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"