mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 21:47:22 +00:00
acrn-config: hide non-legacy serial port as SOS console
SOS vm only support legacy serial port emulation, so we need to hide non-legacy serial ports from webUI when user want to select serial port as SOS console. Tracked-On: #3854 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
deb5ed1f76
commit
67b416d523
@ -92,10 +92,10 @@ def generate_file(config):
|
||||
|
||||
if vuart0_dic:
|
||||
# parse to get poart/base of vuart0/vuart1
|
||||
vuart0_port_base = board_cfg_lib.TTY_CONSOLE[list(vuart0_dic.keys())[0]]
|
||||
vuart0_port_base = board_cfg_lib.LEGACY_TTYS[list(vuart0_dic.keys())[0]]
|
||||
vuart0_irq = vuart0_dic[list(vuart0_dic.keys())[0]]
|
||||
|
||||
vuart1_port_base = board_cfg_lib.TTY_CONSOLE[list(vuart1_dic.keys())[0]]
|
||||
vuart1_port_base = board_cfg_lib.LEGACY_TTYS[list(vuart1_dic.keys())[0]]
|
||||
vuart1_irq = vuart1_dic[list(vuart1_dic.keys())[0]]
|
||||
|
||||
# parse the setting ttys vuatx dic: {vmid:base/irq}
|
||||
|
@ -18,7 +18,7 @@ BASE_BOARD = ['Base Board Information', 'Manufacturer:', 'Product Name:', 'Versi
|
||||
BOARD_NAMES = ['apl-mrb', 'apl-nuc', 'apl-up2', 'dnv-cb2', 'nuc6cayh',
|
||||
'nuc7i7dnb', 'kbl-nuc-i7', 'icl-rvp']
|
||||
|
||||
TTY_CONSOLE = {
|
||||
LEGACY_TTYS = {
|
||||
'ttyS0':'0x3F8',
|
||||
'ttyS1':'0x2F8',
|
||||
'ttyS2':'0x3E8',
|
||||
@ -354,10 +354,6 @@ def get_board_private_vuart(branch_tag, tag_console):
|
||||
|
||||
if ttys_n:
|
||||
|
||||
if ttys_n not in list(TTY_CONSOLE.keys()):
|
||||
err_dic["board config: ttyS not available"] = "console should be set in scenario.xml of board_private section"
|
||||
return (err_dic, vuart0_console_dic, vuart1_console_dic)
|
||||
|
||||
(vuart0_valid_console, vuart1_valid_console, show_vuart1) = console_to_show(BOARD_INFO_FILE)
|
||||
|
||||
# VUART0
|
||||
|
@ -44,6 +44,13 @@ DEFAULT_VM_COUNT = {
|
||||
}
|
||||
KATA_VM_COUNT = 0
|
||||
|
||||
LEGACY_TTYS = {
|
||||
'ttyS0':'0x3F8',
|
||||
'ttyS1':'0x2F8',
|
||||
'ttyS2':'0x3E8',
|
||||
'ttyS3':'0x2E8',
|
||||
}
|
||||
|
||||
def prepare(check_git):
|
||||
""" Check environment """
|
||||
return common.check_env(check_git)
|
||||
@ -178,8 +185,11 @@ def get_ttys_info(board_info):
|
||||
if not ttys_line:
|
||||
break
|
||||
|
||||
#ttys_dev = " ".join(ttys_line.strip().split()[:-2])
|
||||
ttys_dev = ttys_line.split()[0].split(':')[1]
|
||||
ttysn = ttys_dev.split('/')[-1]
|
||||
# currently SOS console can only support legacy serial port
|
||||
if ttysn not in list(LEGACY_TTYS.keys()):
|
||||
continue
|
||||
ttys_list.append(ttys_dev)
|
||||
|
||||
return ttys_list
|
||||
|
Loading…
Reference in New Issue
Block a user