blob: 4994183a0233b8e91ebed4c29f222e4c0ee2a06e [file] [log] [blame]
Chanh Nguyen803ae912021-02-25 17:50:05 +07001SUMMARY = "MTJade fault-led application"
2PR = "r1"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6inherit obmc-phosphor-systemd
7
8DEPENDS += "virtual/obmc-gpio-monitor"
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +00009RDEPENDS:${PN} += "virtual/obmc-gpio-monitor"
Chanh Nguyen803ae912021-02-25 17:50:05 +070010
11S = "${WORKDIR}"
12SRC_URI += "file://toggle_fault_led.sh"
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 ${WORKDIR}/toggle_fault_led.sh \
17 ${D}${bindir}/toggle_fault_led.sh
18}
19
20OBMC_FAULT_MONITOR_INSTANCES = "s0_fault_alert s1_fault_alert"
21
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000022SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/gpio/s0_fault_alert \
Chanh Nguyen803ae912021-02-25 17:50:05 +070023 obmc/gpio/s1_fault_alert \
24 "
25
26TMPL = "phosphor-gpio-monitor@.service"
27INSTFMT = "phosphor-gpio-monitor@{0}.service"
28TGT = "multi-user.target"
29FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
30
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000031SYSTEMD_SERVICE:${PN} += "ampere_fault_led.service"
32SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'OBMC_FAULT_MONITOR_INSTANCES')}"
Chanh Nguyen803ae912021-02-25 17:50:05 +070033