From 702f5d25861ef500632fe5706eede2cf164ecb2b Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Wed, 5 Jan 2022 10:39:50 +0800 Subject: [PATCH] config_tools: remove some dynamic parameters of acrn-dm Since PR #7002 has removed some dynamic parameters from acrn-dm usage, this patch also removes the following parameters in launch script generation logic. 1. --vsbl 2. -s ,npk 3. -i, --ioc_node 4. -A, --acpi 5. virtio-ipu 6. virtio-audio Tracked-On: #6690 Signed-off-by: Kunhui-Li --- misc/config_tools/launch_config/com.py | 21 +-------------------- misc/config_tools/launch_config/pt.py | 4 ---- misc/config_tools/library/launch_cfg_lib.py | 2 +- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/misc/config_tools/launch_config/com.py b/misc/config_tools/launch_config/com.py index da1bb022c..61529b46d 100644 --- a/misc/config_tools/launch_config/com.py +++ b/misc/config_tools/launch_config/com.py @@ -196,19 +196,6 @@ def run_container(board_name, user_vm_type, config): print('}', file=config) print('', file=config) -def boot_image_type(args, vmid, config): - - if not args['vbootloader'][vmid] or (args['vbootloader'][vmid] and args['vbootloader'][vmid] != "vsbl"): - return - - print('boot_dev_flag=",b"', file=config) - print("if [ $4 == 1 ];then", file=config) - print(' boot_image_option="--vsbl /usr/share/acrn/bios/VSBL_debug.bin"', file=config) - print("else", file=config) - print(' boot_image_option="--vsbl /usr/share/acrn/bios/VSBL.bin"', file=config) - print("fi", file=config) - print("", file=config) - def interrupt_storm(pt_sel, config): if not pt_sel: @@ -458,8 +445,6 @@ def vboot_arg_set(dm, vmid, config): # TODO: Support to generate '-k' xml config from webUI and to parse it if dm['vbootloader'][vmid] == "ovmf": print(" --ovmf /usr/share/acrn/bios/OVMF.fd \\", file=config) - elif dm['vbootloader'][vmid] == "vsbl": - print(" $boot_image_option \\",file=config) def xhci_args_set(dm, vmid, config): @@ -553,15 +538,12 @@ def dm_arg_set(names, sel, virt_io, dm, sriov, vmid, config): user_vm_type = names['user_vm_types'][vmid] board_name = names['board_name'] - boot_image_type(dm, vmid, config) - sos_vmid = launch_cfg_lib.get_sos_vmid() # clearlinux/android/alios - print('acrn-dm -A -m $mem_size -s 0:0,hostbridge \\', file=config) + print('acrn-dm -m $mem_size -s 0:0,hostbridge \\', file=config) if launch_cfg_lib.is_linux_like(user_vm_type) or user_vm_type in ("ANDROID", "ALIOS"): if user_vm_type in ("ANDROID", "ALIOS"): - print(' $npk_virt \\', file=config) print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config) print(" --enable_trusty \\", file=config) # mac_seed @@ -651,7 +633,6 @@ def dm_arg_set(names, sel, virt_io, dm, sriov, vmid, config): if launch_cfg_lib.is_linux_like(user_vm_type) or user_vm_type in ("ANDROID", "ALIOS"): if board_name == "apl-mrb": - print(" -i /run/acrn/ioc_$vm_name,0x20 \\", file=config) print(" -l com2,/run/acrn/ioc_$vm_name \\", file=config) if not is_nuc_whl_linux(names, vmid): diff --git a/misc/config_tools/launch_config/pt.py b/misc/config_tools/launch_config/pt.py index 0cfffd1c7..fa08e61b7 100644 --- a/misc/config_tools/launch_config/pt.py +++ b/misc/config_tools/launch_config/pt.py @@ -74,8 +74,6 @@ def ipu_pt(sel, vmid, config): print(" fi", file=config) if bdf_ipu or bdf_ipu_i2c: - print("else", file=config) - print(' boot_ipu_option="$boot_ipu_option"" -s {},virtio-ipu "'.format(launch_cfg_lib.virtual_dev_slot("virtio-ipu")), file=config) print("fi", file=config) print("", file=config) @@ -189,8 +187,6 @@ def audio_pt(user_vm_type, sel, vmid, config): print(' boot_audio_option="-s {},passthru,{}/{}/{}"'.format( slot_audio, bus, dev, fun), file=config) - print("else", file=config) - print(' boot_audio_option="-s {},virtio-audio"'.format(slot_audio), file=config) print("fi", file=config) diff --git a/misc/config_tools/library/launch_cfg_lib.py b/misc/config_tools/library/launch_cfg_lib.py index ecc80de0f..4abeb5e88 100644 --- a/misc/config_tools/library/launch_cfg_lib.py +++ b/misc/config_tools/library/launch_cfg_lib.py @@ -14,7 +14,7 @@ import lxml import lxml.etree ERR_LIST = {} -BOOT_TYPE = ['no', 'vsbl', 'ovmf'] +BOOT_TYPE = ['no', 'ovmf'] RTOS_TYPE = ['no', 'Soft RT', 'Hard RT'] DM_VUART0 = ['Disable', 'Enable'] y_n = ['y', 'n']