debian/rules: Generate launch scripts

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
This commit is contained in:
Helmut Buchsbaum 2022-05-05 16:37:44 +02:00 committed by acrnsi-robot
parent fe85273ae4
commit 5f1ee365d9
2 changed files with 12 additions and 0 deletions

View File

@ -1 +1,2 @@
usr/lib/x86_64-linux-gnu/acrn/*
usr/share/acrn/launch-scripts/

11
debian/rules vendored
View File

@ -231,6 +231,17 @@ override_dh_auto_install-arch:
chmod 644 $(DESTDIR)$(libdir)/acrn/$b/$s/acpi/*; \
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; \
) cp $(call bfile,$b) $(DESTDIR)$(libdir)/acrn/$b/board.xml;)
@:
@# install devicemodel & tools