mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-19 09:53:01 +00:00
acrn-config: parse rootfs_img and refine virtio-blk
1. Parse item of 'rootfs_img' from launch config xml. 2. Refine virtio-blk device for launch config. Tracked-On: #3931 Signed-off-by: Wei Liu <weix.w.liu@intel.com>
This commit is contained in:
parent
5f5f3dfd14
commit
39f300a5b5
@ -422,8 +422,9 @@ def dm_arg_set(names, sel, dm, vmid, config):
|
|||||||
uos_type = names['uos_types'][vmid]
|
uos_type = names['uos_types'][vmid]
|
||||||
board_name = names['board_name']
|
board_name = names['board_name']
|
||||||
|
|
||||||
# vbootlaoder for vsbl
|
# vboot loader for vsbl
|
||||||
boot_image_type(dm, vmid, config)
|
boot_image_type(dm, vmid, config)
|
||||||
|
root_img = dm['rootfs_img'][vmid]
|
||||||
|
|
||||||
# uuid get
|
# uuid get
|
||||||
scenario_uuid = launch_cfg_lib.get_scenario_uuid()
|
scenario_uuid = launch_cfg_lib.get_scenario_uuid()
|
||||||
@ -469,19 +470,16 @@ def dm_arg_set(names, sel, dm, vmid, config):
|
|||||||
# vxworks
|
# vxworks
|
||||||
if uos_type == "VXWORKS":
|
if uos_type == "VXWORKS":
|
||||||
print("{} \\".format(dm_str), file=config)
|
print("{} \\".format(dm_str), 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(" --virtio_poll 1000000 \\", file=config)
|
||||||
print(" --lapic_pt \\", file=config)
|
print(" --lapic_pt \\", file=config)
|
||||||
|
|
||||||
# zephyr
|
# zephyr
|
||||||
if uos_type == "ZEPHYR":
|
if uos_type == "ZEPHYR":
|
||||||
print("{} \\".format(dm_str), file=config)
|
print("{} \\".format(dm_str), file=config)
|
||||||
print(" -s {},virtio-blk,./zephyr.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
|
|
||||||
|
|
||||||
# windows
|
# windows
|
||||||
if uos_type == "WINDOWS":
|
if uos_type == "WINDOWS":
|
||||||
print("{} \\".format(dm_str), file=config)
|
print("{} \\".format(dm_str), file=config)
|
||||||
print(" -s {},virtio-blk,./win10-ltsc.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
|
|
||||||
print(" --windows \\", file=config)
|
print(" --windows \\", file=config)
|
||||||
|
|
||||||
# GVT args set
|
# GVT args set
|
||||||
@ -514,10 +512,12 @@ def dm_arg_set(names, sel, dm, vmid, config):
|
|||||||
if not is_nuc_clr(names, vmid):
|
if not is_nuc_clr(names, vmid):
|
||||||
print(" -s {},wdt-i6300esb \\".format(launch_cfg_lib.virtual_dev_slot("wdt-i6300esb")), file=config)
|
print(" -s {},wdt-i6300esb \\".format(launch_cfg_lib.virtual_dev_slot("wdt-i6300esb")), file=config)
|
||||||
print(" $intr_storm_monitor \\", file=config)
|
print(" $intr_storm_monitor \\", file=config)
|
||||||
print(" -s {},virtio-blk$boot_dev_flag,/data/$3/$3.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
|
|
||||||
print(" -s {},xhci,1-1:1-2:1-3:2-1:2-2:2-3:cap=apl \\".format(launch_cfg_lib.virtual_dev_slot("xhci")), file=config)
|
print(" -s {},xhci,1-1:1-2:1-3:2-1:2-2:2-3:cap=apl \\".format(launch_cfg_lib.virtual_dev_slot("xhci")), file=config)
|
||||||
else:
|
|
||||||
print(" -s {},virtio-blk,/home/clear/uos/uos.img \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk")), file=config)
|
if dm['vbootloader'][vmid] and dm['vbootloader'][vmid] == "vsbl":
|
||||||
|
print(" -s {},virtio-blk$boot_dev_flag,/data/{} \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk"), root_img), file=config)
|
||||||
|
elif dm['vbootloader'][vmid] and dm['vbootloader'][vmid] == "ovmf":
|
||||||
|
print(" -s {},virtio-blk,{} \\".format(launch_cfg_lib.virtual_dev_slot("virtio-blk"), root_img), file=config)
|
||||||
|
|
||||||
if uos_type in ("ANDROID", "ALIOS"):
|
if uos_type in ("ANDROID", "ALIOS"):
|
||||||
print(" --enable_trusty \\", file=config)
|
print(" --enable_trusty \\", file=config)
|
||||||
|
@ -19,6 +19,7 @@ class AcrnDmArgs:
|
|||||||
self.args["mem_size"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "mem_size")
|
self.args["mem_size"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "mem_size")
|
||||||
self.args["gvt_args"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "gvt_args")
|
self.args["gvt_args"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "gvt_args")
|
||||||
self.args["rootfs_dev"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "rootfs_dev")
|
self.args["rootfs_dev"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "rootfs_dev")
|
||||||
|
self.args["rootfs_img"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "rootfs_img")
|
||||||
self.args["vbootloader"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "vbootloader")
|
self.args["vbootloader"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "vbootloader")
|
||||||
self.args["console_type"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "console_type")
|
self.args["console_type"] = launch_cfg_lib.get_sub_tree_tag(self.launch_info, "console_type")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user