blob: 3bfd47d05eedc2ca09f3092998a72c64434a3810 [file] [log] [blame]
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +05301SUMMARY = "Phosphor LED Group Management Daemon"
2DESCRIPTION = "Daemon to cater to triggering actions on LED groups"
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +05303PR = "r1"
Patrick Venture9ea4aaf2018-10-24 12:55:20 -07004PV = "1.0+git${SRCPV}"
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +05305
Vishwanatha Subbannac5fd20a2021-03-26 06:11:29 -05006require ${PN}.inc
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +05307
George Liuc6b01642021-04-16 10:14:02 +08008inherit meson pkgconfig python3native
Dhruvaraj Subhashchandran6a1b0fc2017-04-27 05:29:56 -05009inherit obmc-phosphor-dbus-service obmc-phosphor-systemd
10
Vishwanatha Subbanna9f410cc2021-03-23 13:52:11 +000011PACKAGECONFIG ??= ""
George Liuc6b01642021-04-16 10:14:02 +080012PACKAGECONFIG[use-json] = "-Duse-json=enabled, -Duse-json=disabled"
13PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled"
14PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \
15 -Dmonitor-operational-status=disabled"
Vishwanatha Subbanna9f410cc2021-03-23 13:52:11 +000016
Vishwanatha Subbannac5fd20a2021-03-26 06:11:29 -050017SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor"
18PACKAGE_BEFORE_PN += "${PN}-faultmonitor"
Dhruvaraj Subhashchandran6a1b0fc2017-04-27 05:29:56 -050019
Vishwanatha Subbannad7844692020-03-30 07:16:17 -050020DEPENDS += "${PYTHON_PN}-native"
21DEPENDS += "${PYTHON_PN}-pyyaml-native"
22DEPENDS += "${PYTHON_PN}-inflection-native"
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +053023DEPENDS += "autoconf-archive-native"
Patrick Williams4b32c9a2020-03-31 16:43:15 -050024DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native"
Brad Bishop44f3cce2019-03-22 23:41:42 -040025DEPENDS += "systemd"
Ratan Gupta0e642912017-03-14 14:50:04 +053026DEPENDS += "phosphor-logging"
George Liube9f4772020-07-01 15:29:50 +080027DEPENDS += "nlohmann-json"
Ratan Gupta0e642912017-03-14 14:50:04 +053028
Vishwanatha Subbanna7f07e7d2017-02-11 22:10:23 +053029DEPENDS += "virtual/${PN}-config-native"
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +053030
Patrick Williams12fc9392021-08-06 09:16:53 -050031RDEPENDS:${PN} += "bash"
Vishwanatha Subbannaef3d69e2020-10-08 10:24:37 -050032
Vishwanatha Subbanna5fe31d42017-01-09 15:00:38 +053033S = "${WORKDIR}/git"
34
Patrick Williams12fc9392021-08-06 09:16:53 -050035FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor"
Vishwanatha Subbanna96d83652017-01-23 16:04:35 +053036
Patrick Williams12fc9392021-08-06 09:16:53 -050037DBUS_SERVICE:${PN} += "xyz.openbmc_project.LED.GroupManager.service"
Dhruvaraj Subhashchandran6a1b0fc2017-04-27 05:29:56 -050038
Patrick Williams12fc9392021-08-06 09:16:53 -050039SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service"
40SYSTEMD_SERVICE:${PN}-faultmonitor += "obmc-fru-fault-monitor.service"
Dhruvaraj Subhashchandran6a1b0fc2017-04-27 05:29:56 -050041
Patrick Williamse83c2202021-09-01 16:17:33 -050042SYSTEMD_LINK:${PN} += "../obmc-led-group-start@.service:multi-user.target.wants/obmc-led-group-start@bmc_booted.service"
Vishwanatha Subbanna95b31512017-03-27 14:36:58 +053043
Andrew Geissler3f248dc2021-08-13 16:20:46 -040044CHASSIS_TARGETS = "poweron poweroff"
Vishwanatha Subbanna95b31512017-03-27 14:36:58 +053045STATES = "start stop"
Andrew Geissler3f248dc2021-08-13 16:20:46 -040046TMPLFMT = "obmc-led-group-{1}@.service"
47TGTFMT = "obmc-chassis-{0}@0.target"
48INSTFMT = "obmc-led-group-{1}@power_on.service"
Vishwanatha Subbanna95b31512017-03-27 14:36:58 +053049FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}"
Patrick Williamse83c2202021-09-01 16:17:33 -050050SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}"
Dhruvaraj Subhashchandran6a1b0fc2017-04-27 05:29:56 -050051
Vishwanatha Subbannae922ca62017-07-19 02:25:13 -050052# Install the override to set up a Conflicts relation
Patrick Williamse83c2202021-09-01 16:17:33 -050053SYSTEMD_OVERRIDE:${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf"
Vishwanatha Subbanna95b31512017-03-27 14:36:58 +053054
Patrick Williamsed104d42021-08-31 13:19:27 -050055EXTRA_OEMESON:append = " -Dtests=disabled"
Seires Li220e1942021-06-10 02:11:11 +080056
Patrick Williams12fc9392021-08-06 09:16:53 -050057do_compile:prepend() {
Seires Li220e1942021-06-10 02:11:11 +080058 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}