public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Badrikesh Prusty <badrikesh_prusty@mentor.com>
To: <isar-users@googlegroups.com>
Cc: Badrikesh Prusty <badrikesh.prusty@siemens.com>
Subject: [PATCH] scripts/start_vm: enclose -append args in quotes and use eval
Date: Thu, 21 Mar 2024 12:31:19 +0530	[thread overview]
Message-ID: <20240321070119.2973182-1-badrikesh_prusty@mentor.com> (raw)

From: Badrikesh Prusty <badrikesh.prusty@siemens.com>

- Observing boot failure of qemuarm64 with error message:
   'root=/dev/vda': No such file or directory
- Fix syntax for providing -append arguments with qemu-system-* command
- The -append arguments must be enclosed in quotes
- Use eval to execute qemu-system-* command
- Fix consistency with use of spaces instead of tabs

Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
---
 scripts/start_vm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/start_vm b/scripts/start_vm
index 8c696a4a..e9f13dc0 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -19,18 +19,18 @@ bb2sh() {
 start_qemu() {
     root=`echo $QEMU_DISK_ARGS \
         | sed 's,##ROOTFS_IMAGE##,'$IMAGE_DIR/$ROOTFS_IMAGE','`
-    [ -n "$KARGS$EXTRA_KARGS" ] && OPT_KERNEL_ARGS="-append $KARGS$EXTRA_KARGS"
+    [ -n "$KARGS$EXTRA_KARGS" ] && OPT_KERNEL_ARGS="-append '$KARGS$EXTRA_KARGS'"
     local had_x
     echo $- | grep -q x && had_x=1 || had_x=0
     [ $had_x -eq 0 ] && set -x
-    qemu-system-$QEMU_ARCH \
-	-m 1024M \
-	-M $QEMU_MACHINE \
-	$QCPU \
-	-nographic \
-	$EXTRA_ARGS \
-    $OPT_KERNEL_ARGS \
-	$root
+    eval qemu-system-$QEMU_ARCH \
+        -m 1024M \
+        -M $QEMU_MACHINE \
+        $QCPU \
+        -nographic \
+        $EXTRA_ARGS \
+        $OPT_KERNEL_ARGS \
+        $root
     [ $had_x -eq 0 ] && set +x
 }
 
-- 
2.39.2


             reply	other threads:[~2024-03-21  7:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  7:01 Badrikesh Prusty [this message]
2024-03-21 12:27 ` Badrikesh Prusty
2024-03-26 20:28 ` Uladzimir Bely

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=20240321070119.2973182-1-badrikesh_prusty@mentor.com \
    --to=badrikesh_prusty@mentor.com \
    --cc=badrikesh.prusty@siemens.com \
    --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