blob: 3c3be27c72f2a4928fca31dfa633bd4c3ca7354a [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}"
10SRC_URI += "file://avsbus-workaround.sh \
11 file://avsbus-enable.sh \
12 file://avsbus-disable.sh"
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 ${WORKDIR}/avsbus-workaround.sh \
17 ${D}${bindir}/avsbus-workaround.sh
18 install -m 0755 ${WORKDIR}/avsbus-disable.sh \
19 ${D}${bindir}/avsbus-disable.sh
20 install -m 0755 ${WORKDIR}/avsbus-enable.sh \
21 ${D}${bindir}/avsbus-enable.sh
22}
23
24TMPL_EN= "avsbus-enable@.service"
25TMPL_DIS= "avsbus-disable@.service"
26TMPL_WA= "avsbus-workaround@.service"
27INSTFMT_EN= "avsbus-enable@{0}.service"
28INSTFMT_DIS= "avsbus-disable@{0}.service"
29INSTFMT_WA= "avsbus-workaround@{0}.service"
Lei YUd97f2cb2017-02-14 16:47:45 +080030TGTFMT = "obmc-power-chassis-on@{0}.target"
Lei YUfeb59cb2017-02-20 10:22:27 +080031FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
32FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
33FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
Lei YU3dd1eea2016-12-27 14:43:14 +080034
35SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
36SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
37SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
38SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
39SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
40SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"