Chanh Nguyen | 803ae91 | 2021-02-25 17:50:05 +0700 | [diff] [blame] | 1 | SUMMARY = "MTJade fault-led application" |
| 2 | PR = "r1" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 5 | |
| 6 | inherit obmc-phosphor-systemd |
| 7 | |
| 8 | DEPENDS += "virtual/obmc-gpio-monitor" |
| 9 | RDEPENDS_${PN} += "virtual/obmc-gpio-monitor" |
| 10 | |
| 11 | S = "${WORKDIR}" |
| 12 | SRC_URI += "file://toggle_fault_led.sh" |
| 13 | |
| 14 | do_install() { |
| 15 | install -d ${D}${bindir} |
| 16 | install -m 0755 ${WORKDIR}/toggle_fault_led.sh \ |
| 17 | ${D}${bindir}/toggle_fault_led.sh |
| 18 | } |
| 19 | |
| 20 | OBMC_FAULT_MONITOR_INSTANCES = "s0_fault_alert s1_fault_alert" |
| 21 | |
| 22 | SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/gpio/s0_fault_alert \ |
| 23 | obmc/gpio/s1_fault_alert \ |
| 24 | " |
| 25 | |
| 26 | TMPL = "phosphor-gpio-monitor@.service" |
| 27 | INSTFMT = "phosphor-gpio-monitor@{0}.service" |
| 28 | TGT = "multi-user.target" |
| 29 | FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}" |
| 30 | |
| 31 | SYSTEMD_SERVICE_${PN} += "ampere_fault_led.service" |
| 32 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_FAULT_MONITOR_INSTANCES')}" |
| 33 | |