mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 20:29:40 +00:00
acrn-config: generate board information on target board
These tools run on the target board and genearate board information. usage: python3 board_parser.py <board_name> [--out board_info_file] sample: $ sudo python3 board_parser.py apl-up2 v1-v2: 1. allow board parameter for new board v2-v3: 1. add the usage descriptions for tools 2. add description of kernel cmd line for README 3. output informations to a xml type 4. coding as PEP8 guildline Tracked-On: #3480 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Reviewed-by: Shuang Zheng shuang.zheng@intel.com Acked-by: Terry Zou <terry.zou@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
107c406baa
commit
8adefe26ac
20
misc/acrn-config/target/dmi.py
Normal file
20
misc/acrn-config/target/dmi.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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"""
|
||||
with open(board_info, 'a+') as config:
|
||||
parser_lib.dump_excute(CMDS['BIOS_INFO'], 'BIOS_INFO', config)
|
||||
print("", file=config)
|
||||
parser_lib.dump_excute(CMDS['BASE_BOARD_INFO'], 'BASE_BOARD_INFO', config)
|
||||
print("", file=config)
|
Reference in New Issue
Block a user