瀏覽代碼

scripts/diagnostic: Add support for collecting PCI device information

Maximilian Luz 3 年之前
父節點
當前提交
a0da469887
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      scripts/diagnostics.sh

+ 9 - 0
scripts/diagnostics.sh

@@ -11,6 +11,7 @@ all_components=(
     "serial"
     "sam"
     "kconfig"
+    "lspci"
 )
 
 
@@ -218,6 +219,14 @@ if [[ " ${components[*]} " =~ " kconfig " ]]; then
     done;
 fi
 
+# collect lspci
+if [[ " ${components[*]} " =~ " lspci " ]]; then
+    echo "   - kernel configuration"
+
+    sudo lspci -nn -vvv > "${tmpdir}/lspci.txt"
+    sudo lspci -nn -v -t > "${tmpdir}/lspci-tree.txt"
+fi
+
 
 # bundle to archive
 echo " ==> generating archive..."