1#!/usr/bin/env bash
2#
3# config: 234 25
4# @brief: Collect PHAL devtree debug data
5#
6
7# shellcheck disable=SC1091
8. "$DREPORT_INCLUDE"/functions
9
10# shellcheck source=./power-target.sh
11source /etc/profile.d/power-target.sh
12
13#export attributes list to attribute_list.txt
14attributes="/usr/bin/attributes"
15file_name="PHAL_devtree.txt"
16attr_cmd="$attributes export"
17desc="Attribute list"
18if [ -x $attributes ]; then
19    add_cmd_output "$attr_cmd" "$file_name" "$desc"
20fi
21#copy PHAL device tree file to dump
22file_name="$PDBG_DTB"
23desc="Device tree file"
24if [ -e "$file_name" ]; then
25    add_copy_file "$file_name" "$desc"
26fi
27
28#copy PHAL export device tree to dump
29file_name="/var/lib/phal/exportdevtree"
30desc="Exported device tree file"
31if [ -e "$file_name" ]; then
32    add_copy_file "$file_name" "$desc"
33fi
34
35#copy attribues info db to dump
36file_name="$PDATA_INFODB"
37desc="Attribute info db"
38if [ -e "$file_name" ]; then
39    add_copy_file "$file_name" "$desc"
40fi
41