diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-03-21 15:02:13 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-03-28 21:03:47 +0000 |
commit | f7d548b7919b8c0511d6c45d07700a88bd5ea836 (patch) | |
tree | a901065a38539147a0bf268e38661cd3b7149ed9 /meta-phosphor | |
parent | a188e0d66de3faf50a142c99a7f3c4e31574ac92 (diff) | |
download | talos-openbmc-f7d548b7919b8c0511d6c45d07700a88bd5ea836.tar.gz talos-openbmc-f7d548b7919b8c0511d6c45d07700a88bd5ea836.zip |
Provide the phosphor-fan-presence config YAML
On MRW based systems, this YAML will be generated from the
MRW XML, otherwise the example YAML provided by the
phosphor-fan-presence repository will be used in the build.
Change-Id: I1bf914a7e26067f62f2b2bf8b7ba1ba43591c5dc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-phosphor')
6 files changed, 64 insertions, 6 deletions
diff --git a/meta-phosphor/classes/phosphor-fan-presence.bbclass b/meta-phosphor/classes/phosphor-fan-presence.bbclass new file mode 100644 index 000000000..b59f1f567 --- /dev/null +++ b/meta-phosphor/classes/phosphor-fan-presence.bbclass @@ -0,0 +1 @@ +presence_datadir="${datadir}/phosphor-fan-presence" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb new file mode 100644 index 000000000..c97865ee2 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb @@ -0,0 +1,17 @@ +SUMMARY = "Phosphor Fan Presence Detection example data" +PR = "r1" + +require phosphor-fan-presence.inc + +inherit native +inherit obmc-phosphor-license +inherit phosphor-fan-presence + +PROVIDES += "virtual/phosphor-fan-presence-config" + +S = "${WORKDIR}/git" + +do_install() { + DEST=${D}${presence_datadir} + install -D ${S}/example/fan-detect.yaml ${DEST}/config.yaml +} diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb new file mode 100644 index 000000000..267fc9296 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb @@ -0,0 +1,25 @@ +SUMMARY = "Generate fan presence YAML from the MRW" +PR = "r1" + +inherit native +inherit obmc-phosphor-license +inherit phosphor-fan-presence + +DEPENDS += " \ + mrw-native \ + mrw-perl-tools-native \ + " + +PROVIDES += "virtual/phosphor-fan-presence-config" + +S = "${WORKDIR}" + +do_install() { + DEST=${D}${presence_datadir} + install -d ${DEST} + + ${bindir}/perl-native/perl \ + ${bindir}/gen_presence_yaml.pl \ + -i ${datadir}/obmc-mrw/${MACHINE}.xml \ + -o ${DEST}/config.yaml +} diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb index ec17267f9..2d5b5b870 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb @@ -2,18 +2,20 @@ SUMMARY = "Phosphor Fan Presence" DESCRIPTION = "Phosphor fan presence provides a set of fan presence \ daemons to monitor fan presence changes by different methods of \ presence detection." -HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +require ${PN}.inc inherit autotools pkgconfig pythonnative inherit obmc-phosphor-systemd +inherit phosphor-fan-presence DEPENDS += "autoconf-archive-native" DEPENDS += "python-pyyaml-native" +DEPENDS += "python-mako-native" DEPENDS += "sdbusplus" DEPENDS += "phosphor-logging" +DEPENDS += "virtual/phosphor-fan-presence-config" RDEPENDS_${PN} += "sdbusplus" FAN_PRESENCE_PACKAGES = " \ @@ -34,7 +36,7 @@ FILES_${PN}-tach = "${sbindir}/phosphor-fan-presence-tach" SYSTEMD_SERVICE_${PN}-tach += "${TMPL}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" -SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" -SRCREV = "2b44a6c0b282cf50c563a175535c4c32f55a81dc" - S = "${WORKDIR}/git" + +EXTRA_OECONF = \ + "FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc new file mode 100644 index 000000000..e251c83c0 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc @@ -0,0 +1,5 @@ +HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" +SRCREV = "2b44a6c0b282cf50c563a175535c4c32f55a81dc" diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc index f78ea3328..06995baa7 100644 --- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc +++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc @@ -126,5 +126,13 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory ?= \ PREFERRED_PROVIDER_virtual/phosphor-logging-callouts ?= \ "${@cf_enabled(d, 'obmc-mrw', 'phosphor-logging-callouts-mrw-native', 'phosphor-logging-callouts-example-native')}" +# The phosphor-fan-presence application is data driven and requires an +# input YAML that maps fans to their tach sensors. +# This virtual is a native recipe that provides that mapping by installing +# configuration files in the format and native sysroot location expected by +# the phosphor-fan-presence build process in the native sysroot. +PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config ?= \ + "${@cf_enabled(d, 'obmc-mrw', 'phosphor-fan-presence-mrw-native', 'phosphor-fan-presence-example-native')}" + OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project" OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project" |