mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-09 17:07:00 +00:00
This patch reorganize the files of the board inspector as follows. 1. Rename the directory name from `target` to `board_inspector`, in order to align with the name used in ACRN documentation. 2. Move the scripts that generate the current board XML into the `legacy` sub-directory. The legacy nodes will be removed after transitioning to the new board XML schema completely, 3. Add the main script `cli.py` which is the command line interface of the board inspector. v1 -> v2: - Rename `run.py` to `cli.py`. Tracked-On: #5922 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
23 lines
643 B
Python
23 lines
643 B
Python
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
#
|
|
# 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)
|