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