Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 1 | SUMMARY = "Phosphor LED Group Management Daemon" |
| 2 | DESCRIPTION = "Daemon to cater to triggering actions on LED groups" |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 3 | PR = "r1" |
Patrick Venture | 9ea4aaf | 2018-10-24 12:55:20 -0700 | [diff] [blame] | 4 | PV = "1.0+git${SRCPV}" |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 5 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 6 | require ${PN}.inc |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 7 | |
George Liu | c6b0164 | 2021-04-16 10:14:02 +0800 | [diff] [blame] | 8 | inherit meson pkgconfig python3native |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 9 | inherit obmc-phosphor-dbus-service obmc-phosphor-systemd |
| 10 | |
Vishwanatha Subbanna | 9f410cc | 2021-03-23 13:52:11 +0000 | [diff] [blame] | 11 | PACKAGECONFIG ??= "" |
George Liu | c6b0164 | 2021-04-16 10:14:02 +0800 | [diff] [blame] | 12 | PACKAGECONFIG[use-json] = "-Duse-json=enabled, -Duse-json=disabled" |
| 13 | PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled" |
| 14 | PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \ |
| 15 | -Dmonitor-operational-status=disabled" |
Vishwanatha Subbanna | 9f410cc | 2021-03-23 13:52:11 +0000 | [diff] [blame] | 16 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 17 | SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor" |
| 18 | PACKAGE_BEFORE_PN += "${PN}-faultmonitor" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 19 | |
Vishwanatha Subbanna | d784469 | 2020-03-30 07:16:17 -0500 | [diff] [blame] | 20 | DEPENDS += "${PYTHON_PN}-native" |
| 21 | DEPENDS += "${PYTHON_PN}-pyyaml-native" |
| 22 | DEPENDS += "${PYTHON_PN}-inflection-native" |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 23 | DEPENDS += "autoconf-archive-native" |
Patrick Williams | 4b32c9a | 2020-03-31 16:43:15 -0500 | [diff] [blame] | 24 | DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" |
Brad Bishop | 44f3cce | 2019-03-22 23:41:42 -0400 | [diff] [blame] | 25 | DEPENDS += "systemd" |
Ratan Gupta | 0e64291 | 2017-03-14 14:50:04 +0530 | [diff] [blame] | 26 | DEPENDS += "phosphor-logging" |
George Liu | be9f477 | 2020-07-01 15:29:50 +0800 | [diff] [blame] | 27 | DEPENDS += "nlohmann-json" |
Ratan Gupta | 0e64291 | 2017-03-14 14:50:04 +0530 | [diff] [blame] | 28 | |
Vishwanatha Subbanna | 7f07e7d | 2017-02-11 22:10:23 +0530 | [diff] [blame] | 29 | DEPENDS += "virtual/${PN}-config-native" |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 30 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 31 | RDEPENDS_${PN} += "bash" |
Vishwanatha Subbanna | ef3d69e | 2020-10-08 10:24:37 -0500 | [diff] [blame] | 32 | |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 33 | S = "${WORKDIR}/git" |
| 34 | |
Andrew Geissler | 297da45 | 2019-03-28 20:52:34 +0000 | [diff] [blame] | 35 | FILES_${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor" |
Vishwanatha Subbanna | 96d8365 | 2017-01-23 16:04:35 +0530 | [diff] [blame] | 36 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 37 | DBUS_SERVICE_${PN} += "xyz.openbmc_project.LED.GroupManager.service" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 38 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 39 | SYSTEMD_SERVICE_${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 40 | SYSTEMD_SERVICE_${PN}-faultmonitor += "obmc-fru-fault-monitor.service" |
| 41 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 42 | SYSTEMD_LINK_${PN} += "../obmc-led-group-start@.service:multi-user.target.wants/obmc-led-group-start@bmc_booted.service" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 43 | |
| 44 | STATES = "start stop" |
| 45 | TMPLFMT = "obmc-led-group-{0}@.service" |
| 46 | TGTFMT = "obmc-power-{0}@0.target" |
| 47 | INSTFMT = "obmc-led-group-{0}@power_on.service" |
| 48 | FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}" |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 49 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'STATES')}" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 50 | |
Vishwanatha Subbanna | e922ca6 | 2017-07-19 02:25:13 -0500 | [diff] [blame] | 51 | # Install the override to set up a Conflicts relation |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 52 | SYSTEMD_OVERRIDE_${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 53 | |
William A. Kennington III | 643d973 | 2021-05-29 15:15:42 -0700 | [diff] [blame] | 54 | EXTRA_OEMESON += "-Dtests=disabled" |
Seires Li | 220e194 | 2021-06-10 02:11:11 +0800 | [diff] [blame^] | 55 | |
| 56 | do_compile_prepend() { |
| 57 | if [ -f "${LED_YAML_PATH}/led.yaml" ]; then |
| 58 | cp "${LED_YAML_PATH}/led.yaml" "${S}/led.yaml" |
| 59 | elif [ -f "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" ]; then |
| 60 | cp "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" "${S}/led.yaml" |
| 61 | elif [ -f "${WORKDIR}/led.yaml" ]; then |
| 62 | cp "${WORKDIR}/led.yaml" "${S}/led.yaml" |
| 63 | fi |
| 64 | } |