summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-06-07 22:21:01 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-06-19 23:01:57 +0300
commit98b85c914433dbce2e2aa915c0ed649bff30a462 (patch)
tree9b086e67a455bdca566d2364d76dae0be07f5a2d
parent89ad9f366a1810d4c4d80e9073f4cd7426e764af (diff)
downloadopenbmc-98b85c914433dbce2e2aa915c0ed649bff30a462.tar.xz
meta-phosphor: ipmi: improve entity YAML selection
The existing scheme for selecting an entity configuration YAML for building ipmid consists of a virtual (phosphor-ipmi-entity-config) with the preferred provider set to a default recipe (phosphor-ipmi-entity-inventory-native) in the Phosphor distro configuration. Instead, provide a reasonable default directly in the ipmid metadata. This is a small step towards enabling ipmid to build without any distro configuration and should lower the effort required (slightly) to comprehend where the the entity YAML file is coming from. There aren't any known clients overriding the entity YAML in the first place, but a client could still override with an ipmid bbappend and setting EXTRA_OECONF appropriately. (From meta-phosphor rev: fe88ee4211c93f4ca4acba5ecec502aef17944ce) Change-Id: Ie152c413ee6674735b6bf3192b01ec0bc5a39a29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc7
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory-native.bb22
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml (renamed from meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory/entity.yaml)0
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb14
4 files changed, 12 insertions, 31 deletions
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index f99fbed43..55b6e0fec 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -160,13 +160,6 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory ?= \
"phosphor-ipmi-sensor-inventory-native"
# The phosphor-host-ipmid application is data-driven and requires an input
-# yaml of entity association record metadata.
-# 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-host-ipmid build process in the native sysroot.
-PREFERRED_PROVIDER_virtual/phosphor-ipmi-entity-config ?= "phosphor-ipmi-entity-inventory-native"
-
-# The phosphor-host-ipmid application is data-driven and requires an input
# mapping of inventory object path to the sensor number and sensor metadata.
# This virtual is a native recipe that provides that mapping by installing
# configuration files in the format and native sysroot location expected by
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory-native.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory-native.bb
deleted file mode 100644
index acc693eba..000000000
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory-native.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Sample entity configuration for phosphor-host-ipmid"
-PR = "r1"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-
-inherit native
-inherit phosphor-ipmi-host
-
-PROVIDES += "virtual/phosphor-ipmi-entity-config"
-
-SRC_URI += "file://entity.yaml"
-
-S = "${WORKDIR}"
-
-do_install() {
- # This recipe is supposed to create an output yaml file with
- # a sample output file.
-
- DEST=${D}${sensor_datadir}
- install -d ${DEST}
- install entity.yaml ${DEST}/entity.yaml
-}
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory/entity.yaml b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml
index f41c2fda6..f41c2fda6 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-entity-inventory/entity.yaml
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
index 314b70fd3..f5606cbf7 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
@@ -14,6 +14,8 @@ inherit obmc-phosphor-systemd
inherit phosphor-ipmi-host
inherit pythonnative
+SRC_URI += "file://entity.yaml"
+
def ipmi_whitelists(d):
whitelists = d.getVar(
'VIRTUAL-RUNTIME_phosphor-ipmi-providers', True) or ''
@@ -33,7 +35,6 @@ DEPENDS += "sdbus++-native"
DEPENDS += "virtual/phosphor-ipmi-inventory-sel"
DEPENDS += "virtual/phosphor-ipmi-fru-merge-config"
DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
-DEPENDS += "virtual/phosphor-ipmi-entity-config"
DEPENDS += "boost"
DEPENDS += "sdeventplus"
@@ -74,7 +75,6 @@ EXTRA_OECONF = " \
SENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/sensor.yaml \
INVSENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
FRU_YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
- ENTITY_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/entity.yaml \
"
EXTRA_OECONF_append = " \
WHITELIST_CONF="${WHITELIST_CONF}" \
@@ -103,6 +103,16 @@ SOFT_TGTFMT = "obmc-host-shutdown@{0}.target"
SOFT_FMT = "../${SOFT_SVC}:${SOFT_TGTFMT}.requires/${SOFT_SVC}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'SOFT_FMT', 'OBMC_HOST_INSTANCES')}"
+do_replace_entity_default() {
+ # The in-repo provided default is tailored to testing the ipmid code.
+ # Replace it with a reasonable default for users.
+ cp entity.yaml ${S}/scripts/entity-example.yaml
+}
+
+do_patch_append() {
+ bb.build.exec_func('do_replace_entity_default', d)
+}
+
#Collect all hardcoded sensor yamls from different recipes and
#merge all of them with sensor.yaml.
python do_merge_sensors () {