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 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -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 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 35 | FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor" |
Vishwanatha Subbanna | 96d8365 | 2017-01-23 16:04:35 +0530 | [diff] [blame] | 36 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -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 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 39 | SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service" |
| 40 | SYSTEMD_SERVICE:${PN}-faultmonitor += "obmc-fru-fault-monitor.service" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 41 | |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -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 | |
Andrew Geissler | 3f248dc | 2021-08-13 16:20:46 -0400 | [diff] [blame] | 44 | CHASSIS_TARGETS = "poweron poweroff" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 45 | STATES = "start stop" |
Andrew Geissler | 3f248dc | 2021-08-13 16:20:46 -0400 | [diff] [blame] | 46 | TMPLFMT = "obmc-led-group-{1}@.service" |
| 47 | TGTFMT = "obmc-chassis-{0}@0.target" |
| 48 | INSTFMT = "obmc-led-group-{1}@power_on.service" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 49 | FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 50 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 51 | |
Vishwanatha Subbanna | e922ca6 | 2017-07-19 02:25:13 -0500 | [diff] [blame] | 52 | # Install the override to set up a Conflicts relation |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 53 | 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] | 54 | |
Patrick Williams | ed104d4 | 2021-08-31 13:19:27 -0500 | [diff] [blame] | 55 | EXTRA_OEMESON:append = " -Dtests=disabled" |
Seires Li | 220e194 | 2021-06-10 02:11:11 +0800 | [diff] [blame] | 56 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 57 | do_compile:prepend() { |
Seires Li | 220e194 | 2021-06-10 02:11:11 +0800 | [diff] [blame] | 58 | if [ -f "${LED_YAML_PATH}/led.yaml" ]; then |
| 59 | cp "${LED_YAML_PATH}/led.yaml" "${S}/led.yaml" |
| 60 | elif [ -f "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" ]; then |
| 61 | cp "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" "${S}/led.yaml" |
| 62 | elif [ -f "${WORKDIR}/led.yaml" ]; then |
| 63 | cp "${WORKDIR}/led.yaml" "${S}/led.yaml" |
| 64 | fi |
| 65 | } |