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