* [PATCH] scripts/start_vm: enclose -append args in quotes and use eval
@ 2024-03-21 7:01 Badrikesh Prusty
2024-03-21 12:27 ` Badrikesh Prusty
2024-03-26 20:28 ` Uladzimir Bely
0 siblings, 2 replies; 3+ messages in thread
From: Badrikesh Prusty @ 2024-03-21 7:01 UTC (permalink / raw)
To: isar-users; +Cc: Badrikesh Prusty
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/start_vm: enclose -append args in quotes and use eval
2024-03-21 7:01 [PATCH] scripts/start_vm: enclose -append args in quotes and use eval Badrikesh Prusty
@ 2024-03-21 12:27 ` Badrikesh Prusty
2024-03-26 20:28 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Badrikesh Prusty @ 2024-03-21 12:27 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1768 bytes --]
Hello all,
Tested the changes with qemu machines:
- qemuamd64
- qemuarm64
- qemuarm
Machines are booting fine using start_vm command.
Request to review the above change.
Thanks,
Badrikesh
On Thursday, March 21, 2024 at 12:32:05 PM UTC+5:30 Badrikesh Prusty wrote:
> From: Badrikesh Prusty <badrikes...@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 <badrikes...@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
>
>
[-- Attachment #1.2: Type: text/html, Size: 2531 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/start_vm: enclose -append args in quotes and use eval
2024-03-21 7:01 [PATCH] scripts/start_vm: enclose -append args in quotes and use eval Badrikesh Prusty
2024-03-21 12:27 ` Badrikesh Prusty
@ 2024-03-26 20:28 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-03-26 20:28 UTC (permalink / raw)
To: Badrikesh Prusty, isar-users
On Thu, 2024-03-21 at 12:31 +0530, Badrikesh Prusty wrote:
> 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(-)
Hello.
We are planning to remove "scripts/start_vm" in favor of
"testsuite/start_vm.py" that is a drop-in replacement (but with
testsuite integration).
So, this patch is unlikely to be merged.
But if the issue you have faced can also be reproduced with
start_vm.py, it would worth fixing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-26 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 7:01 [PATCH] scripts/start_vm: enclose -append args in quotes and use eval Badrikesh Prusty
2024-03-21 12:27 ` Badrikesh Prusty
2024-03-26 20:28 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox