sysinfo: add device tree used to the report
The device-tree being used on a system is a very important piece of information to debug issues. On a host machine, dtc can be used to reconstruct the DTS used from the /proc/device-tree folder structure. While on it, remove extra white lines at the beginning and end. Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
This commit is contained in:
parent
9b4aa277f3
commit
9e349305a3
|
|
@ -287,8 +287,7 @@ if [ -d "$IOEXP_NODE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DATE="$(date "+%Y%m%d%H%M%S")"
|
DATE="$(date "+%Y%m%d%H%M%S")"
|
||||||
FILE="/tmp/sysinfo-${DEY_VERSION}-${BOARD_SN}-${DATE}.txt"
|
REPORT_PATH="/tmp/sysinfo-${DEY_VERSION}-${BOARD_SN}-${DATE}"
|
||||||
printf "\n\n"
|
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "-------------------------------------"
|
echo "-------------------------------------"
|
||||||
|
|
@ -307,9 +306,10 @@ printf "\n\n"
|
||||||
[ -n "${MCA_VERSION}" ] && echo "|| MCA | ${MCA_VERSION}"
|
[ -n "${MCA_VERSION}" ] && echo "|| MCA | ${MCA_VERSION}"
|
||||||
[ -n "${IOEXP_VERSION}" ] && echo "|| I/O Expander | ${IOEXP_VERSION}"
|
[ -n "${IOEXP_VERSION}" ] && echo "|| I/O Expander | ${IOEXP_VERSION}"
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
) | tee ${FILE}
|
) | tee "${REPORT_PATH}.txt"
|
||||||
|
|
||||||
make_report >> ${FILE}
|
make_report >> "${REPORT_PATH}.txt"
|
||||||
gzip ${FILE}
|
tar -zhcf "${REPORT_PATH}.tar.gz" -C $(dirname ${REPORT_PATH}) $(basename "${REPORT_PATH}.txt") /proc/device-tree 2> /dev/null
|
||||||
echo "Report generated in ${FILE}.gz"
|
echo "Report generated in ${REPORT_PATH}.tar.gz"
|
||||||
printf "\n\n"
|
|
||||||
|
rm -rf "${REPORT_PATH}.txt"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue