From 96e1b6704f93ac7a65c1132091f60501cb92f9af Mon Sep 17 00:00:00 2001 From: szhen11 Date: Thu, 20 Oct 2022 15:31:14 +0800 Subject: [PATCH] config_tools: fix the issue for debuild on tgl-rvp with hybrid scenario The debian build rule of calculating method for post launch vm ids when generating launch scripts should not be reading //vm/@id in scenario xmls directly but reading //vm/@id in scenario xml and then plus vm id for service vm. Since the objective here is to generate the launch scripts for all VMs, change the debian rule to invoking the launch_cfg_gen.py script without parameter user_vmid when there are post launch vms to achieve the objective. Tracked-On: #8245 Signed-off-by: szhen11 Signed-off-by: Helmut Buchsbaum Reviewed-by: Junjie Mao --- debian/rules | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/debian/rules b/debian/rules index 3c04efeb7..49fae7bd2 100755 --- a/debian/rules +++ b/debian/rules @@ -246,16 +246,15 @@ override_dh_auto_install-arch: fi; \ cp $(call sfile,$b,$s) $(DESTDIR)$(libdir)/acrn/$b/$s/scenario.xml; \ vmids=$$(xmllint --xpath '//vm[load_order="POST_LAUNCHED_VM"]/@id' $(call sfile,$b,$s) 2>/dev/null || true); \ - for vmid in $${vmids}; do \ - mkdir -p $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s/; \ - id=$$(echo "$${vmid}" | sed -e 's/[[:space:]]*id="\(.*\)"/\1/g'); \ - $(call echo-silent,CREATE $(datadir)/acrn/launch-scripts/$b/$s/launch_user_vm_id$${id}.sh); \ - misc/config_tools/launch_config/launch_cfg_gen.py \ - --board $(call bfile,$b) --scenario $(call sfile,$b,$s) \ - --out $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s \ - --user_vmid $${id} $(devnull) 2>&1; \ - chmod a+x $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s/*; \ - done; \ + if [ -n "$${vmids}" ]; then \ + $(call echo-silent,CREATE launch scripts in $(datadir)/acrn/launch-scripts/$b/$s/); \ + mkdir -p $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s/; \ + misc/config_tools/launch_config/launch_cfg_gen.py \ + --board $(call bfile,$b) --scenario $(call sfile,$b,$s) \ + --out $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s \ + $(devnull) 2>&1; \ + chmod a+x $(DESTDIR)$(datadir)/acrn/launch-scripts/$b/$s/*; \ + fi; \ ) cp $(call bfile,$b) $(DESTDIR)$(libdir)/acrn/$b/board.xml;) @: @# install devicemodel & tools