blob: 252d2cbfcc75711e97868d2041ff547653460076 [file] [log] [blame]
Lei YU3dd1eea2016-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 Stanley8b98be12018-10-31 12:24:32 +103010SRC_URI += "file://avsbus-enable.sh \
Lei YU3dd1eea2016-12-27 14:43:14 +080011 file://avsbus-disable.sh"
12
13do_install() {
14 install -d ${D}${bindir}
Lei YU3dd1eea2016-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 YU3dd1eea2016-12-27 14:43:14 +080023INSTFMT_EN= "avsbus-enable@{0}.service"
24INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. Kingb9ee5362017-04-06 14:43:46 -050025TGTFMT = "obmc-chassis-poweron@{0}.target"
Lei YUfeb59cb2017-02-20 10:22:27 +080026FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
27FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Lei YU3dd1eea2016-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')}"