From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 3/5] start_vm: Use the first image type to start VM
Date: Mon, 13 Sep 2021 16:58:08 +0200 [thread overview]
Message-ID: <20210913145810.26394-4-ubely@ilbers.de> (raw)
In-Reply-To: <20210913145810.26394-1-ubely@ilbers.de>
If there are several image types listed in IMAGE_TYPE, we need
to use the only to start VM. Let first one be the default.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
scripts/start_vm | 2 ++
testsuite/start_vm.py | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/start_vm b/scripts/start_vm
index 28ada30..77c4244 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -110,6 +110,8 @@ readonly MACHINE_CONF=$ISARROOT/meta-isar/conf/machine/qemu$ARCH.conf
eval "$(egrep 'MACHINE_SERIAL|QEMU_' $MACHINE_CONF |bb2sh)"
eval $(bitbake -e mc:qemu$ARCH-$DISTRO:isar-image-base | grep "\(^IMAGE_TYPE=\|^IMAGE_FULLNAME=\)")
+# Take first image type for VM if there are several defined
+IMAGE_TYPE=$(echo "$IMAGE_TYPE" | sed -e 's/\s.*$//')
case "$IMAGE_TYPE" in
ext4-img)
readonly ROOTFS_IMAGE=$IMAGE_FULLNAME.ext4.img
diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index a3e32ac..06fc935 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -28,7 +28,7 @@ def format_qemu_cmdline(arch, build, distro):
extra_args = ''
cpu = ['']
- image_type = get_bitbake_var(bb_output, 'IMAGE_TYPE')
+ image_type = get_bitbake_var(bb_output, 'IMAGE_TYPE').split()[0]
deploy_dir_image = get_bitbake_var(bb_output, 'DEPLOY_DIR_IMAGE')
if image_type == 'ext4-img':
rootfs_image = 'isar-image-base-debian-' + distro + '-qemu' + arch + '.ext4.img'
--
2.20.1
next prev parent reply other threads:[~2021-09-13 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 14:58 [PATCH 0/5] Support multiple image types in one build Uladzimir Bely
2021-09-13 14:58 ` [PATCH 1/5] image: Make WORKDIR and STAMPs unrelated to IMAGE_TYPE Uladzimir Bely
2021-09-13 14:58 ` [PATCH 2/5] wic-img: Set weak default value for WKS_FILE Uladzimir Bely
2021-09-13 14:58 ` Uladzimir Bely [this message]
2021-09-13 14:58 ` [PATCH 4/5] meta-isar: Rework mc:qemuamd64-buster configs Uladzimir Bely
2021-09-13 14:58 ` [PATCH 5/5] api: Rename IMAGE_TYPE to IMAGE_FSTYPES Uladzimir Bely
2021-09-13 18:27 ` Jan Kiszka
2021-09-14 7:08 ` Uladzimir Bely
2021-09-14 7:39 ` Jan Kiszka
2021-09-14 7:50 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210913145810.26394-4-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox