summaryrefslogtreecommitdiffstats
path: root/meta-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/classes/phosphor-ipmi-fru.bbclass2
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native.bb19
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb28
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc8
-rw-r--r--meta-phosphor/conf/distro/openbmc-phosphor.conf2
5 files changed, 59 insertions, 0 deletions
diff --git a/meta-phosphor/classes/phosphor-ipmi-fru.bbclass b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
index d76bbc699..9c0d227c4 100644
--- a/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
+++ b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
@@ -1 +1,3 @@
hostfw_datadir="${datadir}/phosphor-ipmi-fru/hostfw"
+inventory_datadir="${datadir}/phosphor-ipmi-fru/inventory"
+config_datadir="${datadir}/phosphor-ipmi-fru/config"
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native.bb
new file mode 100644
index 000000000..c1f78eb38
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Sample inventory map for phosphor-ipmi-fru"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-fru
+
+require phosphor-ipmi-fru.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ DEST=${D}${inventory_datadir}
+ install -d ${DEST}
+
+ # TODO: copy example inventory yaml to ${DEST}/config.yaml
+ # install example-inventory.yaml ${DEST}/config.yaml
+}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb
new file mode 100644
index 000000000..0c512fcb4
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Generate inventory map for phosphor-ipmi-fru from an MRW."
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-fru
+
+require phosphor-ipmi-fru.inc
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# TODO: remove this dependency after the MRW script
+# has been updated to not require the hostfw metadata.
+DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
+
+S = "${WORKDIR}/git"
+do_install() {
+
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_fru.pl \
+ -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -m ${hostfw_datadir}/config.yaml \
+ -o ${DEST}/config.yaml
+}
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 221e96094..a505bcdb3 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -42,5 +42,13 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-config ?= "phosphor-ipmi-fru-config
# the phosphor-ipmi-fru build process.
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "phosphor-ipmi-fru-hostfw-config-example-native"
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of IPMI inventory metadata to DBus objects interfaces and properties.
+# 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-ipmi-fru build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory ?= \
+ "${@cf_enabled(d, 'obmc-mrw', 'phosphor-ipmi-fru-inventory-mrw-native', 'phosphor-ipmi-fru-inventory-example-native')}"
+
OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"
diff --git a/meta-phosphor/conf/distro/openbmc-phosphor.conf b/meta-phosphor/conf/distro/openbmc-phosphor.conf
index f18caf7aa..2460e70c2 100644
--- a/meta-phosphor/conf/distro/openbmc-phosphor.conf
+++ b/meta-phosphor/conf/distro/openbmc-phosphor.conf
@@ -50,4 +50,6 @@ DISTRO_EXTRA_RDEPENDS_remove_qemuarm = "packagegroup-core-device-devel"
# TODO: openbmc/openbmc#12345 - Upgrade to pygobject-3.
PREFERRED_VERSION_python-pygobject = "2.%"
+INHERIT = "obmc-phosphor-utils"
+
include conf/distro/include/openbmc-phosphor/${MACHINE}.inc
OpenPOWER on IntegriCloud