19bd89b69SMarri Devender Rao#!/usr/bin/env bash
29bd89b69SMarri Devender Rao#
39bd89b69SMarri Devender Rao# config: 234 25
49bd89b69SMarri Devender Rao# @brief: Collect PHAL devtree debug data
59bd89b69SMarri Devender Rao#
69bd89b69SMarri Devender Rao
73afa33d6SMarri Devender Rao# shellcheck disable=SC1091
83afa33d6SMarri Devender Rao. "$DREPORT_INCLUDE"/functions
99bd89b69SMarri Devender Rao
10*60ab262bSMarri Devender Rao# shellcheck source=./power-target.sh
11*60ab262bSMarri Devender Raosource /etc/profile.d/power-target.sh
129bd89b69SMarri Devender Rao
139bd89b69SMarri Devender Rao#export attributes list to attribute_list.txt
14*60ab262bSMarri Devender Raoattributes="/usr/bin/attributes"
15*60ab262bSMarri Devender Raofile_name="PHAL_devtree.txt"
16*60ab262bSMarri Devender Raoattr_cmd="$attributes export"
17*60ab262bSMarri Devender Raodesc="Attribute list"
189bd89b69SMarri Devender Raoif [ -x $attributes ]; then
19*60ab262bSMarri Devender Rao    add_cmd_output "$attr_cmd" "$file_name" "$desc"
209bd89b69SMarri Devender Raofi
219bd89b69SMarri Devender Rao#copy PHAL device tree file to dump
22*60ab262bSMarri Devender Raofile_name="$PDBG_DTB"
23*60ab262bSMarri Devender Raodesc="Device tree file"
24*60ab262bSMarri Devender Raoif [ -e "$file_name" ]; then
25*60ab262bSMarri Devender Rao    add_copy_file "$file_name" "$desc"
269bd89b69SMarri Devender Raofi
279bd89b69SMarri Devender Rao
289bd89b69SMarri Devender Rao#copy PHAL export device tree to dump
29*60ab262bSMarri Devender Raofile_name="/var/lib/phal/exportdevtree"
30*60ab262bSMarri Devender Raodesc="Exported device tree file"
31*60ab262bSMarri Devender Raoif [ -e "$file_name" ]; then
32*60ab262bSMarri Devender Rao    add_copy_file "$file_name" "$desc"
339bd89b69SMarri Devender Raofi
349bd89b69SMarri Devender Rao
359bd89b69SMarri Devender Rao#copy attribues info db to dump
36*60ab262bSMarri Devender Raofile_name="$PDATA_INFODB"
37*60ab262bSMarri Devender Raodesc="Attribute info db"
38*60ab262bSMarri Devender Raoif [ -e "$file_name" ]; then
39*60ab262bSMarri Devender Rao    add_copy_file "$file_name" "$desc"
409bd89b69SMarri Devender Raofi
41