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 | |
Patrick Williams | c9c80b3 | 2022-03-21 17:18:39 -0500 | [diff] [blame] | 11 | PACKAGECONFIG ??= "\ |
| 12 | ${@oe.utils.conditional( \ |
| 13 | 'PREFERRED_PROVIDER_virtual/${PN}-config-native', \ |
| 14 | 'phosphor-led-manager-config-example-native', \ |
| 15 | 'use-json', 'use-yaml', d)} \ |
| 16 | " |
| 17 | |
| 18 | PACKAGECONFIG[use-json] = "-Duse-json=enabled,,,,,use-yaml" |
| 19 | PACKAGECONFIG[use-yaml] = "-Duse-json=disabled,,virtual/${PN}-config-native,,,use-json" |
George Liu | c6b0164 | 2021-04-16 10:14:02 +0800 | [diff] [blame] | 20 | PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled" |
| 21 | PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \ |
| 22 | -Dmonitor-operational-status=disabled" |
Vishwanatha Subbanna | 9f410cc | 2021-03-23 13:52:11 +0000 | [diff] [blame] | 23 | |
Vishwanatha Subbanna | c5fd20a | 2021-03-26 06:11:29 -0500 | [diff] [blame] | 24 | SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor" |
| 25 | PACKAGE_BEFORE_PN += "${PN}-faultmonitor" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 26 | |
Vishwanatha Subbanna | d784469 | 2020-03-30 07:16:17 -0500 | [diff] [blame] | 27 | DEPENDS += "${PYTHON_PN}-native" |
| 28 | DEPENDS += "${PYTHON_PN}-pyyaml-native" |
| 29 | DEPENDS += "${PYTHON_PN}-inflection-native" |
Andrew Geissler | d0e4f50 | 2022-03-21 14:50:10 +0000 | [diff] [blame] | 30 | DEPENDS += "cli11" |
| 31 | DEPENDS += "nlohmann-json" |
| 32 | DEPENDS += "phosphor-logging" |
Patrick Williams | 4b32c9a | 2020-03-31 16:43:15 -0500 | [diff] [blame] | 33 | DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" |
Brad Bishop | 44f3cce | 2019-03-22 23:41:42 -0400 | [diff] [blame] | 34 | DEPENDS += "systemd" |
Ratan Gupta | 0e64291 | 2017-03-14 14:50:04 +0530 | [diff] [blame] | 35 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 36 | RDEPENDS:${PN} += "bash" |
Vishwanatha Subbanna | ef3d69e | 2020-10-08 10:24:37 -0500 | [diff] [blame] | 37 | |
Vishwanatha Subbanna | 5fe31d4 | 2017-01-09 15:00:38 +0530 | [diff] [blame] | 38 | S = "${WORKDIR}/git" |
| 39 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 40 | FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor" |
Vishwanatha Subbanna | 96d8365 | 2017-01-23 16:04:35 +0530 | [diff] [blame] | 41 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 42 | DBUS_SERVICE:${PN} += "xyz.openbmc_project.LED.GroupManager.service" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 43 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 44 | SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service" |
| 45 | SYSTEMD_SERVICE:${PN}-faultmonitor += "obmc-fru-fault-monitor.service" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 46 | |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 47 | 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] | 48 | |
Andrew Geissler | 3f248dc | 2021-08-13 16:20:46 -0400 | [diff] [blame] | 49 | CHASSIS_TARGETS = "poweron poweroff" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 50 | STATES = "start stop" |
Andrew Geissler | 3f248dc | 2021-08-13 16:20:46 -0400 | [diff] [blame] | 51 | TMPLFMT = "obmc-led-group-{1}@.service" |
| 52 | TGTFMT = "obmc-chassis-{0}@0.target" |
| 53 | INSTFMT = "obmc-led-group-{1}@power_on.service" |
Vishwanatha Subbanna | 95b3151 | 2017-03-27 14:36:58 +0530 | [diff] [blame] | 54 | FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 55 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}" |
Dhruvaraj Subhashchandran | 6a1b0fc | 2017-04-27 05:29:56 -0500 | [diff] [blame] | 56 | |
NodeMan97 | e41c3fd | 2022-07-13 15:15:54 -0500 | [diff] [blame^] | 57 | CHASSIS_BLACKOUT_TGT = "obmc-chassis-blackout@{0}.target" |
| 58 | LED_STOP_SVC = "obmc-led-group-stop@.service" |
| 59 | LED_POWER_STOP_SVC = "obmc-led-group-stop@power_on.service" |
| 60 | CHASSIS_LED_BLACKOUT_FMT = "../${LED_STOP_SVC}:${CHASSIS_BLACKOUT_TGT}.wants/${LED_POWER_STOP_SVC}" |
| 61 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'CHASSIS_LED_BLACKOUT_FMT', 'OBMC_CHASSIS_INSTANCES' )}" |
| 62 | |
Vishwanatha Subbanna | e922ca6 | 2017-07-19 02:25:13 -0500 | [diff] [blame] | 63 | # Install the override to set up a Conflicts relation |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 64 | 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] | 65 | |
Patrick Williams | ed104d4 | 2021-08-31 13:19:27 -0500 | [diff] [blame] | 66 | EXTRA_OEMESON:append = " -Dtests=disabled" |
Seires Li | 220e194 | 2021-06-10 02:11:11 +0800 | [diff] [blame] | 67 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 68 | do_compile:prepend() { |
Seires Li | 220e194 | 2021-06-10 02:11:11 +0800 | [diff] [blame] | 69 | if [ -f "${LED_YAML_PATH}/led.yaml" ]; then |
| 70 | cp "${LED_YAML_PATH}/led.yaml" "${S}/led.yaml" |
| 71 | elif [ -f "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" ]; then |
| 72 | cp "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" "${S}/led.yaml" |
| 73 | elif [ -f "${WORKDIR}/led.yaml" ]; then |
| 74 | cp "${WORKDIR}/led.yaml" "${S}/led.yaml" |
| 75 | fi |
| 76 | } |