blob: 2625bfc3877557b07a4e73bdad50de889c0c5c66 [file] [log] [blame]
Matt Spinlereea390f2017-08-14 13:27:09 -05001SUMMARY = "Witherspoon Power Fault Analysis"
2DESCRIPTION = "Analyzes power devices for faults"
3PR = "r1"
Patrick Venturec2133c22018-10-26 09:37:21 -07004PV = "1.0+git${SRCPV}"
Matt Spinlereea390f2017-08-14 13:27:09 -05005
Andrew Geissler23d2fef2019-09-17 19:00:24 +00006inherit meson
Matt Spinlereea390f2017-08-14 13:27:09 -05007inherit pkgconfig
8inherit obmc-phosphor-systemd
9inherit pythonnative
10
11require ${PN}.inc
12
13S = "${WORKDIR}/git"
Lei YU19034162019-10-24 13:01:46 +080014SRC_URI += "file://psu.json"
Matt Spinlereea390f2017-08-14 13:27:09 -050015
16DEPENDS += " \
17 phosphor-logging \
18 autoconf-archive-native \
Brad Bishopd6374e72018-01-26 21:48:20 -050019 openpower-dbus-interfaces \
Matt Spinlereea390f2017-08-14 13:27:09 -050020 sdbus++-native \
William A. Kennington IIIdd44eaa2018-10-18 01:43:05 -070021 sdeventplus \
Brandon Wymanb5b193f2019-04-12 16:07:06 -050022 power-sequencer \
Andrew Geissler78be0662019-10-14 14:00:23 +000023 nlohmann-json \
Matt Spinlereea390f2017-08-14 13:27:09 -050024 "
25
Matt Spinler6017c7f2019-10-14 14:16:40 -050026EXTRA_OEMESON += "-Ducd90160-yaml=${STAGING_DIR_HOST}${datadir}/power-sequencer/ucd90160.yaml"
Brandon Wymanb5b193f2019-04-12 16:07:06 -050027
Lei YU19034162019-10-24 13:01:46 +080028do_install_append(){
29 install -D ${WORKDIR}/psu.json ${D}${datadir}/phosphor-power/psu.json
30}
31FILES_${PN} += "${datadir}/phosphor-power/psu.json"
32
Matt Spinlereea390f2017-08-14 13:27:09 -050033CHASSIS_ON_TGT = "obmc-chassis-poweron@0.target"
Brandon Wymanfe3a4642019-03-13 13:27:13 -050034SEQ_MONITOR_SVC = "pseq-monitor.service"
Matt Spinler0464f532017-09-19 14:02:40 -050035SEQ_MONITOR_FMT = "../${SEQ_MONITOR_SVC}:${CHASSIS_ON_TGT}.wants/${SEQ_MONITOR_SVC}"
36
Brandon Wymanfe3a4642019-03-13 13:27:13 -050037SEQ_PGOOD_SVC = "pseq-monitor-pgood.service"
Matt Spinlereea390f2017-08-14 13:27:09 -050038SEQ_PGOOD_FMT = "../${SEQ_PGOOD_SVC}:${CHASSIS_ON_TGT}.wants/${SEQ_PGOOD_SVC}"
39
Matt Spinler0464f532017-09-19 14:02:40 -050040SYSTEMD_SERVICE_${PN} += "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
41SYSTEMD_LINK_${PN} += "${SEQ_MONITOR_FMT} ${SEQ_PGOOD_FMT}"
Brandon Wyman9f37d312017-08-15 16:41:08 -050042
Brandon Wymanfe3a4642019-03-13 13:27:13 -050043PSU_MONITOR_TMPL = "power-supply-monitor@.service"
44PSU_MONITOR_INSTFMT = "power-supply-monitor@{0}.service"
Patrick Venture85cff8c2019-04-04 13:06:43 -070045PSU_MONITOR_TGT = "multi-user.target"
Brandon Wyman9f37d312017-08-15 16:41:08 -050046PSU_MONITOR_FMT = "../${PSU_MONITOR_TMPL}:${PSU_MONITOR_TGT}.requires/${PSU_MONITOR_INSTFMT}"
47
Brandon Wymanfe3a4642019-03-13 13:27:13 -050048FILES_psu-monitor = "${bindir}/psu-monitor"
Brandon Wyman9f37d312017-08-15 16:41:08 -050049SYSTEMD_SERVICE_${PN} += "${PSU_MONITOR_TMPL}"
50SYSTEMD_LINK_${PN} += "${@compose_list(d, 'PSU_MONITOR_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
51
52PSU_MONITOR_ENV_FMT = "obmc/power-supply-monitor/power-supply-monitor-{0}.conf"
53SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'PSU_MONITOR_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"