Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "Phosphor Power Monitor services installation"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
inherit allarch
|
||||
|
||||
RDEPENDS:${PN}-monitor += "phosphor-power-monitor"
|
||||
|
||||
pkg_prerm:${PN}() {
|
||||
[ -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
|
||||
}
|
||||
pkg_postinst:${PN}() {
|
||||
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
|
||||
[ -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
|
||||
done
|
||||
}
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
@@ -0,0 +1,37 @@
|
||||
SUMMARY = "Phosphor Power Regulator services installation"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
inherit allarch
|
||||
|
||||
RDEPENDS:${PN} += "phosphor-power-regulators"
|
||||
|
||||
pkg_prerm:${PN}() {
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-regulators-config.service"
|
||||
rm $LINK
|
||||
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.wants/phosphor-regulators-monitor-enable.service"
|
||||
rm $LINK
|
||||
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@${i}.target.wants/phosphor-regulators-monitor-disable.service"
|
||||
rm $LINK
|
||||
}
|
||||
pkg_postinst:${PN}() {
|
||||
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires/phosphor-regulators-config.service"
|
||||
TARGET="../phosphor-regulators-config.service"
|
||||
ln -s $TARGET $LINK
|
||||
|
||||
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-regulators-monitor-enable.service"
|
||||
TARGET="../phosphor-regulators-monitor-enable.service"
|
||||
ln -s $TARGET $LINK
|
||||
|
||||
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-regulators-monitor-disable.service"
|
||||
TARGET="../phosphor-regulators-monitor-disable.service"
|
||||
ln -s $TARGET $LINK
|
||||
}
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "Phosphor Power Sequencer services installation"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
inherit allarch
|
||||
|
||||
RDEPENDS:${PN} += "phosphor-power-sequencer"
|
||||
|
||||
pkg_prerm:${PN}() {
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
|
||||
rm $LINK
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
|
||||
rm $LINK
|
||||
}
|
||||
pkg_postinst:${PN}() {
|
||||
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
|
||||
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
|
||||
TARGET="../pseq-monitor.service"
|
||||
ln -s $TARGET $LINK
|
||||
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
|
||||
TARGET="../pseq-monitor-pgood.service"
|
||||
ln -s $TARGET $LINK
|
||||
}
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
@@ -0,0 +1,13 @@
|
||||
# TODO: This is splitted into two recipes;
|
||||
# To avoid build error, this is kept for now.
|
||||
# Remove me when the refactor of phosphor-power recipe is finished
|
||||
SUMMARY = "Phosphor Power services installation"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
inherit allarch
|
||||
|
||||
RDEPENDS:${PN} += "phosphor-power"
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
@@ -0,0 +1,5 @@
|
||||
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;branch=master;protocol=https"
|
||||
SRCREV = "e9b37264fceecd4f05bf5e74da8881cf69a61600"
|
||||
@@ -0,0 +1,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"
|
||||
@@ -0,0 +1,48 @@
|
||||
# The below configs are expected to be overriden by machine layer
|
||||
SUMMARY = "Phosphor PSU software manager"
|
||||
DESCRIPTION = "Providing PSU firmware version and upgrade"
|
||||
HOMEPAGE = "https://github.com/openbmc/phosphor-psu-code-mgmt"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
DEPENDS = " \
|
||||
phosphor-logging \
|
||||
phosphor-dbus-interfaces \
|
||||
sdbusplus \
|
||||
openssl \
|
||||
"
|
||||
SRCREV = "8131219a73b23226df3d82e83414e2e372ad103a"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-psu-code-mgmt;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Software.Psu.Updater.service"
|
||||
SYSTEMD_SERVICE:${PN} += "psu-update@.service"
|
||||
|
||||
inherit meson
|
||||
inherit pkgconfig
|
||||
inherit obmc-phosphor-systemd
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dtests=disabled \
|
||||
${PSU_VERSION_UTIL} \
|
||||
${PSU_VERSION_COMPARE_UTIL} \
|
||||
${PSU_UPDATE_SERVICE} \
|
||||
"
|
||||
|
||||
# The default config of this repo depends on utils from phosphor-power.
|
||||
# If your system does not depend on phosphor-power, please use
|
||||
# RDEPENDS:${PN}:remove to remove the dependency.
|
||||
RDEPENDS:${PN} += "phosphor-power"
|
||||
|
||||
## The psutils here comes from phosphor-power repo where
|
||||
## * PSU_VERSION_UTIL accepts a PSU inventory path and returns the PSU
|
||||
## firmware version string
|
||||
## * PSU_VERSION_COMPARE_UTIL accepts several PSU inventory paths and return
|
||||
## the newest version string
|
||||
PSU_VERSION_UTIL ?= "-DPSU_VERSION_UTIL='/usr/bin/psutils --raw --get-version'"
|
||||
PSU_VERSION_COMPARE_UTIL ?= "-DPSU_VERSION_COMPARE_UTIL='/usr/bin/psutils --raw --compare'"
|
||||
## The psu-update@.service from repo is an example service that only prints a log and fails
|
||||
## Override it in a machine layer to invoke the psu update util
|
||||
PSU_UPDATE_SERVICE ?= "-DPSU_UPDATE_SERVICE=psu-update@.service"
|
||||
Reference in New Issue
Block a user