@@ -403,6 +403,21 @@ def set_dm_pt(names, sel, vmid, config):
403
403
sel .bdf ["nvme" ][vmid ][3 :5 ], sel .bdf ["nvme" ][vmid ][6 :7 ]), file = config )
404
404
405
405
406
+ def vboot_arg_set (dm , vmid , config ):
407
+ """
408
+ Set the argument of vbootloader
409
+ :param dm: the dictionary of argument for acrn-dm
410
+ :param vmid: ID of the vm
411
+ :param config: it is a file pointer to write vboot loader information
412
+ :return: None
413
+ """
414
+ # TODO: Support to generate '-k' xml config from webUI and to parse it
415
+ if dm ['vbootloader' ][vmid ] == "ovmf" :
416
+ print (" --ovmf /usr/share/acrn/bios/OVMF.fd \\ " , file = config )
417
+ elif dm ['vbootloader' ][vmid ] == "vsbl" :
418
+ print (" $boot_image_option \\ " ,file = config )
419
+
420
+
406
421
def dm_arg_set (names , sel , dm , vmid , config ):
407
422
408
423
uos_type = names ['uos_types' ][vmid ]
@@ -447,8 +462,6 @@ def dm_arg_set(names, sel, dm, vmid, config):
447
462
# hard rt os
448
463
if uos_type == "PREEMPT-RT LINUX" :
449
464
print ("acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\ " .format (scenario_uuid [vmid + sos_vmid ]), file = config )
450
- #print(" -k /usr/lib/kernel/default-iot-lts2018-preempt-rt \\", file=config)
451
- print (" -k /usr/lib/kernel/default-iot-lts2018-preempt-rt \\ " , file = config )
452
465
print (" --lapic_pt \\ " , file = config )
453
466
print (" --rtvm \\ " , file = config )
454
467
print (" --virtio_poll 1000000 \\ " , file = config )
@@ -475,10 +488,8 @@ def dm_arg_set(names, sel, dm, vmid, config):
475
488
# GVT args set
476
489
gvt_arg_set (uos_type , config )
477
490
478
- # vbootloader of ovmf
479
- #if uos_type != "PREEMPT-RT LINUX" and dm['vbootloader'][vmid] == "ovmf":
480
- if dm ['vbootloader' ][vmid ] == "ovmf" :
481
- print (" --ovmf /usr/share/acrn/bios/OVMF.fd \\ " , file = config )
491
+ # vbootloader setting
492
+ vboot_arg_set (dm , vmid , config )
482
493
483
494
# redirect console
484
495
if dm ['console_type' ][vmid ] == "com1(ttyS0)" :
@@ -503,8 +514,6 @@ def dm_arg_set(names, sel, dm, vmid, config):
503
514
if not is_nuc_clr (names , vmid ):
504
515
print (" -s {},wdt-i6300esb \\ " .format (launch_cfg_lib .virtual_dev_slot ("wdt-i6300esb" )), file = config )
505
516
print (" $intr_storm_monitor \\ " , file = config )
506
- if dm ['vbootloader' ][vmid ] == "vsbl" :
507
- print (" $boot_image_option \\ " ,file = config )
508
517
print (" -s {},virtio-blk$boot_dev_flag,/data/$3/$3.img \\ " .format (launch_cfg_lib .virtual_dev_slot ("virtio-blk" )), file = config )
509
518
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 )
510
519
else :
0 commit comments