config-tools: update board inspector to update pci.ids before fetching PCI information

Add lspci -q Query PCI ID database via DNS for unknown ID‘s

Tracked-On: #7086
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
This commit is contained in:
jackwhich 2022-02-16 14:39:05 +08:00 committed by acrnsi-robot
parent 4bf53e4b83
commit c4d0eb3395
2 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,16 @@ def check_deps():
if had_error: if had_error:
sys.exit(1) sys.exit(1)
# Try updating pci.ids for latest PCI device descriptions
try:
logging.info("Updating pci.ids for latest PCI device descriptions.")
res = subprocess.Popen(["update-pciids", "-q"])
if res.wait() != 0:
logging.warning(f"Failed to invoke update-pciids. No functional impact is foreseen, but descriptions of PCI devices may be inaccurate.")
sys.exit(1)
except Exception as e:
logging.warning(f"Failed to invoke update-pciids: {e}. No functional impact is foreseen, but descriptions of PCI devices may be unavailable.")
def native_check(): def native_check():
cpu_ids = get_online_cpu_ids() cpu_ids = get_online_cpu_ids()
cpu_id = cpu_ids.pop(0) cpu_id = cpu_ids.pop(0)

View File

@ -7,6 +7,7 @@ import parser_lib
CMDS = { CMDS = {
'PCI_DEVICE':"lspci -vv", 'PCI_DEVICE':"lspci -vv",
'PCI_DEVICE':"lspci -vv -q",
'PCI_VID_PID':"lspci -n", 'PCI_VID_PID':"lspci -n",
} }