acrn-hypervisor/misc/config_tools/target/pci_dev.py
Xie, nanlin 97c9b24030 acrn-config: Reorg config tool folder
Remove vm_configs folder and move all the XML files and generic code example into config_tools/data

Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2021-01-27 11:08:28 +08:00

23 lines
604 B
Python

# Copyright (C) 2019 Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import parser_lib
CMDS = {
'PCI_DEVICE':"lspci -vv",
'PCI_VID_PID':"lspci -n",
}
def generate_info(board_info):
"""Get the pci info
:param board_info: this is the file which stores the hardware board information
"""
with open(board_info, 'a+') as config:
parser_lib.dump_execute(CMDS['PCI_DEVICE'], 'PCI_DEVICE', config)
print("", file=config)
parser_lib.dump_execute(CMDS['PCI_VID_PID'], 'PCI_VID_PID', config)
print("", file=config)