diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/power')
3 files changed, 20 insertions, 5 deletions
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb index 0ee5e8303..2baaf0d70 100644 --- a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb +++ b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb @@ -8,8 +8,6 @@ inherit allarch RDEPENDS_${PN} += "phosphor-power" -OBMC_POWER_SUPPLY_INSTANCES ?= "0" - ALLOW_EMPTY_${PN} = "1" pkg_postinst_${PN}() { @@ -24,7 +22,9 @@ pkg_postinst_${PN}() { TARGET="../pseq-monitor-pgood.service" ln -s $TARGET $LINK - for inst in $OBMC_POWER_SUPPLY_INSTANCES; do + [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1 + + for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service" TARGET="../power-supply-monitor@.service" ln -s $TARGET $LINK @@ -36,7 +36,10 @@ pkg_prerm_${PN}() { rm $LINK LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service" rm $LINK - for inst in $OBMC_POWER_SUPPLY_INSTANCES; do + + [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1 + + for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service" rm $LINK done diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc index 52e8c045d..167eebda7 100644 --- a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc +++ b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-power" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-power" -SRCREV = "575ed139220d7a694893f8b1a1e2d4c3b69317fe" +SRCREV = "7d3a9f1b54d2ae47f47371d962d2f234b82fadbc" diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb index bb1847e8d..c71064558 100644 --- a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb +++ b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb @@ -22,9 +22,21 @@ DEPENDS += " \ sdeventplus \ nlohmann-json \ cli11 \ + 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}" + +# Package all phosphor-regulators config files +FILES_${PN} += "${datadir}/phosphor-regulators" + +# ${PN}-regulators service/systemd setup +REGS_SVC = "phosphor-regulators.service" +SYSTEMD_SERVICE_${PN} += "${REGS_SVC}" |