Lei YU | aaad5a5 | 2016-12-27 14:43:14 +0800 | [diff] [blame] | 1 | SUMMARY = "Romulus AVSBus control" |
| 2 | PR = "r1" |
| 3 | |
| 4 | inherit obmc-phosphor-systemd |
| 5 | inherit obmc-phosphor-license |
| 6 | |
| 7 | RDEPENDS_${PN} += "i2c-tools bash" |
| 8 | |
| 9 | S = "${WORKDIR}" |
| 10 | SRC_URI += "file://avsbus-workaround.sh \ |
| 11 | file://avsbus-enable.sh \ |
| 12 | file://avsbus-disable.sh" |
| 13 | |
| 14 | do_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 | |
| 24 | TMPL_EN= "avsbus-enable@.service" |
| 25 | TMPL_DIS= "avsbus-disable@.service" |
| 26 | TMPL_WA= "avsbus-workaround@.service" |
| 27 | INSTFMT_EN= "avsbus-enable@{0}.service" |
| 28 | INSTFMT_DIS= "avsbus-disable@{0}.service" |
| 29 | INSTFMT_WA= "avsbus-workaround@{0}.service" |
Lei YU | d43ec21 | 2017-02-14 16:47:45 +0800 | [diff] [blame] | 30 | TGTFMT = "obmc-power-chassis-on@{0}.target" |
Lei YU | aaad5a5 | 2016-12-27 14:43:14 +0800 | [diff] [blame] | 31 | FMT_EN = "../${TMPL_EN}:${TGTFMT}.wants/${INSTFMT_EN}" |
| 32 | FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.wants/${INSTFMT_DIS}" |
| 33 | FMT_WA = "../${TMPL_WA}:${TGTFMT}.wants/${INSTFMT_WA}" |
| 34 | |
| 35 | SYSTEMD_SERVICE_${PN} += "${TMPL_EN}" |
| 36 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |
| 37 | SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}" |
| 38 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |
| 39 | SYSTEMD_SERVICE_${PN} += "${TMPL_WA}" |
| 40 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" |