acrn-hypervisor/misc/config_tools/board_inspector/legacy/dmi.py
Ziheng Li eb8bcb06b3 Update copyright year range in code headers
Modified the copyright year range in code, and corrected "int32_tel"
into "Intel" in two "hypervisor/include/debug/profiling.h" and
"hypervisor/include/debug/profiling_internal.h".

Tracked-On: #7559
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-15 11:48:35 +08:00

23 lines
627 B
Python

# Copyright (C) 2019-2022 Intel Corporation.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import parser_lib
CMDS = {
'BIOS_INFO':"dmidecode -t 0",
'BASE_BOARD_INFO':"dmidecode -t 2",
}
def generate_info(board_info):
"""Get bios and base board information
: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['BIOS_INFO'], 'BIOS_INFO', config)
print("", file=config)
parser_lib.dump_execute(CMDS['BASE_BOARD_INFO'], 'BASE_BOARD_INFO', config)
print("", file=config)