acrn-config: fix parameter error in launch script

1. fix duplicated '-s 1:0,lpc'
2. fix extra '-l'
3. fix wrong uuid parameter

v1-v2:
    1). remove ethernet pass through to keep align with sample script

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu 2019-09-23 09:21:22 +08:00 committed by wenlingz
parent 535a83e24b
commit 6d7592b7cb
3 changed files with 18 additions and 16 deletions

View File

@ -419,9 +419,10 @@ def dm_arg_set(names, sel, dm, vmid, config):
# uuid get
scenario_uuid = launch_cfg_lib.get_scenario_uuid()
sos_vmid = launch_cfg_lib.get_sos_vmid()
# clearlinux/android/alios
dm_str = 'acrn-dm -A -m $mem_size $boot_GVT_option"$GVT_args" -s 0:0,hostbridge -s 1:0,lpc -U {}'.format(scenario_uuid[vmid])
dm_str = 'acrn-dm -A -m $mem_size $boot_GVT_option"$GVT_args" -s 0:0,hostbridge -s 1:0,lpc -U {}'.format(scenario_uuid[vmid + sos_vmid])
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
if uos_type == "CLEARLINUX":
print("{} \\".format(dm_str), file=config)
@ -431,8 +432,9 @@ def dm_arg_set(names, sel, dm, vmid, config):
if board_name == "apl-up2" or is_nuc_clr(names, vmid):
print(" $logger_setting \\", file=config)
if uos_type in ("ANDROID", "ALIOS"):
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
if uos_type in ("ANDROID", "ALIOS"):
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
if board_name == "apl-up2":
print(" --pm_notify_channel power_button \\", file=config)
if board_name == "apl-mrb":
@ -441,7 +443,8 @@ def dm_arg_set(names, sel, dm, vmid, config):
if is_nuc_clr(names, vmid):
print(" --pm_notify_channel uart \\", file=config)
print(' --pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\', file=config)
print(' -s 1:0,lpc -l com2,/run/acrn/life_mngr_$vm_name \\', file=config)
print(' -l com2,/run/acrn/life_mngr_$vm_name \\', file=config)
print(" -s {},virtio-net,tap0 \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net")), file=config)
# mac_seed
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
@ -449,38 +452,36 @@ def dm_arg_set(names, sel, dm, vmid, config):
# hard rt os
if uos_type == "PREEMPT-RT LINUX":
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\".format(scenario_uuid[vmid]), file=config)
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\".format(scenario_uuid[vmid + sos_vmid]), file=config)
#print(" -k /usr/lib/kernel/default-iot-lts2018-preempt-rt \\", file=config)
print(" -k /usr/lib/kernel/default-iot-lts2018-preempt-rt \\", file=config)
print(" --lapic_pt \\", file=config)
print(" --rtvm \\", file=config)
print(" -s {},virtio-net,tap0 \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net")), file=config)
print(" --virtio_poll 1000000 \\", file=config)
print(" --pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1 \\", file=config)
# vxworks
if uos_type == "VXWORKS":
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\".format(scenario_uuid[vmid]), file=config)
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\".format(scenario_uuid[vmid + sos_vmid]), file=config)
print(" -s {},virtio-blk,./VxWorks.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
print(" --virtio_poll 1000000 \\", file=config)
print(" --lapic_pt \\", file=config)
# zephyr
if uos_type == "ZEPHYR":
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l -U {} \\".format(scenario_uuid[vmid]), file=config)
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -U {} \\".format(scenario_uuid[vmid + sos_vmid]), file=config)
print(" -s {},virtio-blk,./zephyr.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
# windows
if uos_type == "WINDOWS":
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -U {} \\".format(scenario_uuid[vmid]), file=config)
print("acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -U {} \\".format(scenario_uuid[vmid + sos_vmid]), file=config)
print(' -s 2,pci-gvt -G "$3" \\', file=config)
print(" -s {},virtio-blk,./win10-ltsc.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
print(" -s {},virtio-net,tap0 \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net")), file=config)
# vbootloader of ovmf
# vbootloader of ovmf
#if uos_type != "PREEMPT-RT LINUX" and dm['vbootloader'][vmid] == "ovmf":
if dm['vbootloader'][vmid] == "ovmf":
print(" --ovmf ./OVMF.fd \\", file=config)
print(" --ovmf /usr/share/acrn/bios/OVMF.fd \\", file=config)
# redirect console
if dm['console_type'][vmid] == "com1(ttyS0)":
@ -493,7 +494,8 @@ def dm_arg_set(names, sel, dm, vmid, config):
launch_cfg_lib.RE_CONSOLE_MAP['virtio-console(hvc0)']), file=config)
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
print(" -s {},virtio-net,$tap \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net")), file=config)
if board_name in ("apl-mrb", "apl-up2"):
print(" -s {},virtio-net,$tap \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net")), file=config)
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
print(" -s {},virtio-hyper_dmabuf \\".format(launch_cfg_lib.virtual_dev_slot("virtio-hyper_dmabuf")), file=config)

View File

@ -309,9 +309,9 @@ def is_config_file_match():
return (err_dic, match)
def get_sos_vmid(config_file, tag_str):
def get_sos_vmid():
load_list = common.get_branch_tag_val(config_file, tag_str)
load_list = common.get_branch_tag_val(SCENARIO_INFO_FILE, "load_order")
sos_id = 0
for load_order in load_list:

View File

@ -20,7 +20,7 @@
<wifi desc="vm wifi device"></wifi>
<bluetooth desc="vm bluetooth"></bluetooth>
<sd_card desc="vm sd card device"></sd_card>
<ethernet desc="vm wifi device">00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-LM (rev 21)</ethernet>
<ethernet desc="vm wifi device"></ethernet>
<sata desc="vm sata device"></sata>
<nvme desc="vm nvme device">02:00.0 Non-Volatile memory controller: Intel Corporation Device f1a6 (rev 03)</nvme>
</passthrough_devices>