1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
SUMMARY = "Phosphor Power services and utilities"
DESCRIPTION = "Configure and monitor power supplies, power sequencers, and \
voltage regulators, and analyzes power devices for faults"
PR = "r1"
PV = "1.0+git${SRCPV}"
inherit meson
inherit pkgconfig
inherit systemd
inherit python3native
require ${BPN}.inc
S = "${WORKDIR}/git"
POWER_SERVICE_PACKAGES = " \
${PN}-cold-redundancy \
${PN}-monitor \
${PN}-psu-monitor \
${PN}-regulators \
${PN}-sequencer \
${PN}-control \
"
POWER_UTIL_PACKAGES = "${PN}-utils"
PACKAGE_BEFORE_PN = "${POWER_SERVICE_PACKAGES} ${POWER_UTIL_PACKAGES}"
ALLOW_EMPTY:${PN} = "1"
SYSTEMD_PACKAGES = "${POWER_SERVICE_PACKAGES}"
DEPENDS += " \
phosphor-logging \
${PYTHON_PN}-sdbus++-native \
sdeventplus \
nlohmann-json \
cli11 \
i2c-tools \
${PYTHON_PN}-native \
${PYTHON_PN}-pyyaml-native \
${PYTHON_PN}-setuptools-native \
${PYTHON_PN}-mako-native \
boost \
libgpiod \
"
# The monitor packages use an org.open_power D-Bus interface and so
# should only build when told to.
PACKAGECONFIG[monitor] = "-Dsupply-monitor=true, -Dsupply-monitor=false"
PACKAGECONFIG[monitor-ng] = "-Dsupply-monitor-ng=true, -Dsupply-monitor-ng=false"
SEQ_MONITOR_SVC = "pseq-monitor.service"
SEQ_PGOOD_SVC = "pseq-monitor-pgood.service"
PSU_MONITOR_TMPL = "power-supply-monitor@.service"
PSU_MONITOR_SVC = "phosphor-psu-monitor.service"
REGS_SVC = "phosphor-regulators.service"
REGS_CONF_SVC = "phosphor-regulators-config.service"
REGS_MON_ENA_SVC = "phosphor-regulators-monitor-enable.service"
REGS_MON_DIS_SVC = "phosphor-regulators-monitor-disable.service"
POWER_CONTROL_SVC = "phosphor-power-control.service"
SYSTEMD_SERVICE:${PN}-sequencer = "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
SYSTEMD_SERVICE:${PN}-monitor = "${@bb.utils.contains('PACKAGECONFIG', 'monitor', '${PSU_MONITOR_TMPL}', '', d)}"
SYSTEMD_SERVICE:${PN}-psu-monitor = "${@bb.utils.contains('PACKAGECONFIG', 'monitor-ng', '${PSU_MONITOR_SVC}', '', d)}"
SYSTEMD_SERVICE:${PN}-regulators = "${REGS_SVC} ${REGS_CONF_SVC} ${REGS_MON_ENA_SVC} ${REGS_MON_DIS_SVC}"
SYSTEMD_SERVICE:${PN}-control = "${POWER_CONTROL_SVC}"
# TODO: cold-redundancy is not installed in the repo yet
# FILES:${PN}-cold-redundancy = "${bindir}/cold-redundancy"
FILES:${PN}-monitor = "${bindir}/psu-monitor"
FILES:${PN}-psu-monitor = "${bindir}/phosphor-psu-monitor ${datadir}/phosphor-psu-monitor"
FILES:${PN}-regulators = "${bindir}/phosphor-regulators ${datadir}/phosphor-regulators"
FILES:${PN}-regulators += "${bindir}/regsctl"
FILES:${PN}-sequencer = "${bindir}/pseq-monitor"
FILES:${PN}-control = "${bindir}/phosphor-power-control ${datadir}/phosphor-power-sequencer"
FILES:${PN}-utils = "${bindir}/psutils"
|