1# Copyright (C) 2019-2022 Intel Corporation. 2# 3# SPDX-License-Identifier: BSD-3-Clause 4# 5 6import parser_lib 7 8CMDS = { 9 'PCI_DEVICE':"lspci -vv", 10 'PCI_DEVICE':"lspci -vv -q", 11 'PCI_VID_PID':"lspci -n", 12 } 13 14 15def generate_info(board_info): 16 """Get the pci info 17 :param board_info: this is the file which stores the hardware board information 18 """ 19 with open(board_info, 'a+') as config: 20 parser_lib.dump_execute(CMDS['PCI_DEVICE'], 'PCI_DEVICE', config) 21 print("", file=config) 22 parser_lib.dump_execute(CMDS['PCI_VID_PID'], 'PCI_VID_PID', config) 23 print("", file=config) 24