diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2018-02-05 04:58:28 -0600 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2018-02-06 21:06:00 -0600 |
commit | 8e29044fb4f2d6de6585bdff361959c06b0103c8 (patch) | |
tree | dfd00435acacd681d533845cb9ddbd22ffc71bc8 | |
parent | aa146d624ca2eba1dd2cf986344d30dca894b60e (diff) | |
download | phosphor-debug-collector-8e29044fb4f2d6de6585bdff361959c06b0103c8.tar.gz phosphor-debug-collector-8e29044fb4f2d6de6585bdff361959c06b0103c8.zip |
dreport: Added fwprintenv plugin
Plugin used for collecting primary flash U-boot
environment variables.
Resolves partially openbmc/openbmc#2862
Change-Id: I9cffd936575311a39d8006b84a612f0223158fbb
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
-rw-r--r-- | tools/dreport.d/plugins.d/fwprintenv | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/dreport.d/plugins.d/fwprintenv b/tools/dreport.d/plugins.d/fwprintenv new file mode 100644 index 0000000..2945324 --- /dev/null +++ b/tools/dreport.d/plugins.d/fwprintenv @@ -0,0 +1,21 @@ +#!/bin/bash +# +# config: 2 40 +# @brief: Print variables from primary flash U-Boot environment. +# + +. $DREPORT_INCLUDE/functions + +desc="PRI-Flash: U-Boot environment variables" +env_config="/etc/fw_env.config" + +if [ ! -f $env_config ]; then + log_error "$env_config does not exist" + exit +fi + + +file_name="fw-printenv.log" +command="fw_printenv -c $env_config" + +add_cmd_output "$command" "$file_name" "$desc" |