From dd983ea8209b7b3b19aca7dc9b877d27ae1c7ed5 Mon Sep 17 00:00:00 2001 From: Andrei Kartashev Date: Mon, 6 Dec 2021 23:31:19 +0300 Subject: meta-yadro: vegman: ipmi: enable hybrid-sensors The phosphor-ipmi-host has two implemetations of SDR: static and dynamic. Static SDR implementation requires us to set all coefs manually for all sensors in the system, while dynamic implementation doesn't support discrete sensors. Enable support for mixed mode where both static and dynamic implementations work at the same time. Signed-off-by: Andrei Kartashev Change-Id: I27df9e083f0bd816b9a02515e75a3dea69ea20bb --- .../configuration/vegman-yaml-config.bb | 23 ++++++++++++++++++++++ .../vegman-ipmi-sensors-static.yaml | 17 ++++++++++++++++ .../ipmi/phosphor-ipmi-host_%.bbappend | 8 ++++++++ 3 files changed, 48 insertions(+) create mode 100644 meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb create mode 100755 meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml create mode 100644 meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend (limited to 'meta-yadro') diff --git a/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb new file mode 100644 index 0000000000..f2936dc5e6 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb @@ -0,0 +1,23 @@ +SUMMARY = "YAML configuration for VEGMAN" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch + +SRC_URI = " \ + file://vegman-ipmi-sensors-static.yaml \ + " + +S = "${WORKDIR}" + +do_install() { + install -m 0644 -D vegman-ipmi-sensors-static.yaml \ + ${D}${datadir}/${BPN}/ipmi-sensors-static.yaml +} + +FILES:${PN}-dev = " \ + ${datadir}/${BPN}/ipmi-sensors-static.yaml \ + " + +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml new file mode 100755 index 0000000000..f4def89c40 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml @@ -0,0 +1,17 @@ +0x01: + entityID: 0x07 + entityInstance: 1 + sensorType: 0x21 + path: /xyz/openbmc_project/led/groups/enclosure_identify_blink + sensorReadingType: 0x6F + mutability: Mutability::Read + serviceInterface: org.freedesktop.DBus.Properties + readingType: assertion + sensorNamePattern: nameLeaf + interfaces: + xyz.openbmc_project.Led.Group: + Asserted: + Offsets: + 0x00: + type: bool + assert: true diff --git a/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend new file mode 100644 index 0000000000..b549a7aaa5 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG:append = " dynamic-sensors hybrid-sensors" + +DEPENDS:append= " vegman-yaml-config" +EXTRA_OECONF= " \ + SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/vegman-yaml-config/ipmi-sensors-static.yaml \ + " -- cgit v1.2.3