From 5422b0afcb212b926ef7bf9750e80eae277d3e37 Mon Sep 17 00:00:00 2001 From: Lei YU Date: Mon, 23 Dec 2019 15:41:17 +0800 Subject: Add PSU software manager recipe Add phosphor-psu-software-manager recipe to manage PSU software versions and updates. Tested: Add the recipe into Witherspoon build, verify the service is running and the PSU version objects are created on Witherspoon. (From meta-phosphor rev: 99cf05d696d52eee5c89a464296d2151a957fb0a) Signed-off-by: Lei YU Change-Id: I466725976dd70209f7bbc670bad6b09f14d53684 Signed-off-by: Andrew Geissler --- .../power/phosphor-psu-software-manager_git.bb | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb (limited to 'meta-phosphor/recipes-phosphor/power') diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb b/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb new file mode 100644 index 000000000..e8ce64de4 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb @@ -0,0 +1,52 @@ +HOMEPAGE = "https://github.com/openbmc/phosphor-psu-code-mgmt" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" +SRC_URI += "git://github.com/openbmc/phosphor-psu-code-mgmt" +SRCREV = "d48ae5fbcaab4e67b43f03925612ea5252569f33" +SUMMARY = "Phosphor PSU software manager" +DESCRIPTION = "Providing PSU firmware version and upgrade" + +PR = "r1" +PV = "1.0+git${SRCPV}" + +inherit meson +inherit pkgconfig +inherit obmc-phosphor-systemd + +S = "${WORKDIR}/git" + +DEPENDS = " \ + phosphor-logging \ + phosphor-dbus-interfaces \ + sdbusplus \ + openssl \ + " + +# 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 below configs are expected to be overriden by machine layer + +## 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" + +EXTRA_OEMESON = " \ + -Dtests=disabled \ + ${PSU_VERSION_UTIL} \ + ${PSU_VERSION_COMPARE_UTIL} \ + ${PSU_UPDATE_SERVICE} \ + " + +SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Software.Psu.Updater.service" +SYSTEMD_SERVICE_${PN} += "psu-update@.service" -- cgit v1.2.3