blob: 990e0ef69bfe68503d8ff15d823728df6e275b9d [file] [log] [blame]
Marri Devender Rao9bd89b62022-03-28 23:41:48 -05001#!/usr/bin/env bash
2#
3# config: 234 25
4# @brief: Collect PHAL devtree debug data
5#
6
Marri Devender Rao3afa33d2022-04-13 11:14:44 -05007# shellcheck disable=SC1091
8. "$DREPORT_INCLUDE"/functions
Marri Devender Rao9bd89b62022-03-28 23:41:48 -05009
10attributes="/usr/bin/attributes"
11attr_list_file_name="PHAL_devtree.txt"
12
13#export attributes list to attribute_list.txt
14if [ -x $attributes ]; then
15 add_cmd_output "$attributes export" "$attr_list_file_name" "Attribute list"
16fi
17
18#copy PHAL device tree file to dump
Marri Devender Rao3afa33d2022-04-13 11:14:44 -050019devtree_file_name="/var/lib/phosphor-software-manager/hostfw/running/DEVTREE"
Marri Devender Rao9bd89b62022-03-28 23:41:48 -050020if [ -f "$devtree_file_name" ]; then
21 add_copy_file "$devtree_file_name" "device tree"
22fi
23
24
25#copy PHAL export device tree to dump
26exp_dev_tree="/var/lib/phal/exportdevtree"
27if [ -f "$exp_dev_tree" ]; then
28 add_copy_file "$exp_dev_tree" "export device tree"
29fi
30
31#copy attribues info db to dump
32attr_info_db="/usr/share/pdata/attributes_info.db"
33if [ -f "$attr_info_db" ]; then
34 add_copy_file "$attr_info_db" "attribute info db"
35fi