blob: 990e0ef69bfe68503d8ff15d823728df6e275b9d [file] [log] [blame]
#!/usr/bin/env bash
#
# config: 234 25
# @brief: Collect PHAL devtree debug data
#
# shellcheck disable=SC1091
. "$DREPORT_INCLUDE"/functions
attributes="/usr/bin/attributes"
attr_list_file_name="PHAL_devtree.txt"
#export attributes list to attribute_list.txt
if [ -x $attributes ]; then
add_cmd_output "$attributes export" "$attr_list_file_name" "Attribute list"
fi
#copy PHAL device tree file to dump
devtree_file_name="/var/lib/phosphor-software-manager/hostfw/running/DEVTREE"
if [ -f "$devtree_file_name" ]; then
add_copy_file "$devtree_file_name" "device tree"
fi
#copy PHAL export device tree to dump
exp_dev_tree="/var/lib/phal/exportdevtree"
if [ -f "$exp_dev_tree" ]; then
add_copy_file "$exp_dev_tree" "export device tree"
fi
#copy attribues info db to dump
attr_info_db="/usr/share/pdata/attributes_info.db"
if [ -f "$attr_info_db" ]; then
add_copy_file "$attr_info_db" "attribute info db"
fi