From b8efb62d2ee7b2c2f568486b7f6496b7a68add4b Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Wed, 25 May 2022 21:03:31 +0800 Subject: [PATCH] config_tools: bugfix for the generated launch script without uart parameters bugfix for the generated launch script without uart parameters after VUART is configured to "pci" Tracked-On: #7556 Signed-off-by: Kunhui-Li Reviewed-by: Junjie Mao --- misc/config_tools/launch_config/launch_cfg_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/config_tools/launch_config/launch_cfg_gen.py b/misc/config_tools/launch_config/launch_cfg_gen.py index 0a8b34b36..f2cd99d71 100755 --- a/misc/config_tools/launch_config/launch_cfg_gen.py +++ b/misc/config_tools/launch_config/launch_cfg_gen.py @@ -263,8 +263,8 @@ def generate_for_one_vm(board_etree, hv_scenario_etree, vm_scenario_etree, vm_id script.add_virtual_device("uart", options="vuart_idx:0") for idx, conn in enumerate(eval_xpath_all(hv_scenario_etree, f".//vuart_connection[endpoint/vm_name = '{vm_name}']"), start=1): - if eval_xpath(conn, "./type") == "pci": - script.add_virtual_device("uart", options="vuart_idx:{idx}") + if eval_xpath(conn, "./type/text()") == "pci": + script.add_virtual_device("uart", options=f"vuart_idx:{idx}") # Mediated PCI devices, including virtio for usb_xhci in eval_xpath_all(vm_scenario_etree, ".//usb_xhci/usb_dev[text() != '']/text()"):