summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2020-02-06 10:43:35 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-03-12 15:23:36 +0300
commit7307bedd3ff50091e35d9c1fffe23fbef84b01d1 (patch)
tree315de0b3378a724df7be746bf56bd066e47e9199 /meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
parent8b2fe21e4b69fc1aaf2875f259c446bb6bab1d15 (diff)
downloadopenbmc-7307bedd3ff50091e35d9c1fffe23fbef84b01d1.tar.xz
phosphor-power: split into separated packages
phosphor-power consists of several separated services and utils. All of them are installed by default. Split them into separated packages, so that a machine layer could select which packages are needed. This is done by define PACKAGE_BEFORE_PN and specify the FILES_ for each package, and split the phosphor-power-systemd-links-monitor.bb into separated recipes to install services for the related package. The phosphor-power-systemd-links.bb is kept for now to avoid build error on existing systems. It will be removed when the meta-system layers' changes are done. Tested: Only include phosphor-power-monitor, verify that only the related binary and service unit file are installed into the image. Include all the packages, verify that all the services and utils are installed into the image. (From meta-phosphor rev: 2172cd128215683d1fd425b841e90b515aec04c9) Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I83f436e51b33903a581bfc48541475711467bb61 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb')
-rw-r--r--meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb40
1 files changed, 30 insertions, 10 deletions
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
index c71064558..3a296b706 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
@@ -13,6 +13,20 @@ require ${PN}.inc
S = "${WORKDIR}/git"
+POWER_SERVICE_PACKAGES = " \
+ ${PN}-cold-redundancy \
+ ${PN}-monitor \
+ ${PN}-psu-monitor \
+ ${PN}-regulators \
+ ${PN}-sequencer \
+"
+POWER_UTIL_PACKAGES = "${PN}-utils"
+
+PACKAGE_BEFORE_PN = "${POWER_SERVICE_PACKAGES} ${POWER_UTIL_PACKAGES}"
+ALLOW_EMPTY_${PN} = "1"
+
+SYSTEMD_PACKAGES = "${POWER_SERVICE_PACKAGES}"
+
# TODO: in future when openpower-dbus-interfaces is removed from
# phosphor-power, remove the dependency here.
DEPENDS += " \
@@ -25,18 +39,24 @@ DEPENDS += " \
i2c-tools \
"
-PACKAGE_BEFORE_PN = "phosphor-psu-monitor"
-FILES_phosphor-psu-monitor = "${bindir}/phosphor-psu-monitor \
- ${systemd_system_unitdir}/phosphor-psu-monitor.service"
-
SEQ_MONITOR_SVC = "pseq-monitor.service"
SEQ_PGOOD_SVC = "pseq-monitor-pgood.service"
PSU_MONITOR_TMPL = "power-supply-monitor@.service"
-SYSTEMD_SERVICE_${PN} += "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC} ${PSU_MONITOR_TMPL}"
+PSU_MONITOR_SVC = "phosphor-psu-monitor.service"
+REGS_SVC = "phosphor-regulators.service"
-# Package all phosphor-regulators config files
-FILES_${PN} += "${datadir}/phosphor-regulators"
+SYSTEMD_SERVICE_${PN}-sequencer = "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
+SYSTEMD_SERVICE_${PN}-monitor = "${PSU_MONITOR_TMPL}"
+SYSTEMD_SERVICE_${PN}-psu-monitor = "${PSU_MONITOR_SVC}"
+SYSTEMD_SERVICE_${PN}-regulators = "${REGS_SVC}"
-# ${PN}-regulators service/systemd setup
-REGS_SVC = "phosphor-regulators.service"
-SYSTEMD_SERVICE_${PN} += "${REGS_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"
+FILES_${PN}-regulators = "${bindir}/phosphor-regulators"
+FILES_${PN}-sequencer = "${bindir}/pseq-monitor"
+FILES_${PN}-utils = "${bindir}/psutils"
+FILES_${PN}-regulators = "${datadir}/phosphor-regulators"