xref: /openbmc/phosphor-debug-collector/tools/dreport.d/plugins.d/altfwprintenv (revision ce910e960617d1be86f3b47a48f62f3daeb0ceba)
1*ce910e96SJayanth Othayoth#!/bin/bash
2*ce910e96SJayanth Othayoth#
3*ce910e96SJayanth Othayoth# config: 2 50
4*ce910e96SJayanth Othayoth# @brief: Print variables from Alt flash U-Boot environment.
5*ce910e96SJayanth Othayoth#
6*ce910e96SJayanth Othayoth
7*ce910e96SJayanth Othayoth. $DREPORT_INCLUDE/functions
8*ce910e96SJayanth Othayoth
9*ce910e96SJayanth Othayothdesc="Alt-Flash: U-Boot environment variables"
10*ce910e96SJayanth Othayothenv_config="/etc/alt_fw_env.config"
11*ce910e96SJayanth Othayoth
12*ce910e96SJayanth Othayothif [ ! -f $env_config ]; then
13*ce910e96SJayanth Othayoth    log_error "$env_config does not exist"
14*ce910e96SJayanth Othayoth    exit
15*ce910e96SJayanth Othayothfi
16*ce910e96SJayanth Othayoth
17*ce910e96SJayanth Othayoth
18*ce910e96SJayanth Othayothfile_name="alt-fw-printenv.log"
19*ce910e96SJayanth Othayothcommand="fw_printenv -c $env_config"
20*ce910e96SJayanth Othayoth
21*ce910e96SJayanth Othayothadd_cmd_output "$command" "$file_name" "$desc"
22