summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2019-09-25 11:19:29 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-10-10 15:47:06 +0300
commitcf233f13394404d0079b2ae0deb185fa044be834 (patch)
treed61696c0a79901f8202c09193fd1ed214788084c
parent080f1b82d8f5c839541eb4095c62bce2ea6b5e5c (diff)
downloadopenbmc-cf233f13394404d0079b2ae0deb185fa044be834.tar.xz
dreport: Added GUARD plugin
Plugin used for collecting GUARD record information. GUARD records provides failed hardware FRU information in the system. This will be usefull for debugging field issues related to hardware failures. Resolves openbmc/openbmc#199 abandoned commit which was in meta-ibm https://gerrit.openbmc-project.xyz/c/openbmc/meta-ibm/+/14592 (From meta-openpower rev: 28ad34e17e2b3a127c10d1bac618614c5dd0b922) Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: I6fbd0e41b4139cbb28d67760b96eef5412417e0f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard18
-rw-r--r--meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend18
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard
new file mode 100644
index 000000000..cdd461fec
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# config: 2 40
+# @brief: Collect GUARD record information.
+#
+
+. $DREPORT_INCLUDE/functions
+
+desc="GUARD Records"
+file_name="/var/lib/phosphor-software-manager/pnor/prsv/GUARD"
+
+# Check file is present and not empty.
+if [ ! -s "$file_name" ]; then
+ log_info "No $desc"
+ exit 0
+fi
+
+add_copy_file "$file_name" "$desc"
diff --git a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend
new file mode 100644
index 000000000..a4cb739e8
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend
@@ -0,0 +1,18 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://plugins.d/guard"
+
+install_openpower_plugins() {
+ install -m 0755 ${WORKDIR}/plugins.d/guard ${D}${dreport_plugin_dir}
+}
+
+#Link in the plugins so dreport run them at the appropriate time
+python link_openpower_plugins() {
+ workdir = d.getVar('WORKDIR', True)
+ script = os.path.join(workdir, 'plugins.d', 'guard')
+ install_dreport_user_script(script, d)
+}
+
+DEBUG_COLLECTOR_INSTALL_POSTFUNCS ?= ""
+DEBUG_COLLECTOR_INSTALL_POSTFUNCS_df-openpower ?= "install_openpower_plugins link_openpower_plugins"
+
+do_install[postfuncs] += "${DEBUG_COLLECTOR_INSTALL_POSTFUNCS}"