All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqemu: If using a vmtype image do not add the -no-reboot flag
@ 2020-06-25 17:17 Jason Wessel
  0 siblings, 0 replies; only message in thread
From: Jason Wessel @ 2020-06-25 17:17 UTC (permalink / raw)
  To: openembedded-core

There is no way to use runqemu and turn off the no-reboot flag with a
command line argument.  If someone really wants it back it can be
added with the qemuparams="" argument.

Also if you use the "halt -p" from user space, the qemu will exit when
it is complete.  It is impossible to test self deploying image with
runqemu if you cannot reboot the device.  One might argue that you can
run runqemu in a loop, but that defeats the purpose of having a
wrapper around a tool that already does what is needed in the first
place.

For the vmtype images, the -no-reboot flag should not be added.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 scripts/runqemu | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 21680b4..5ae3e5e 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1241,7 +1241,9 @@ class BaseConfig(object):
                         vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
 
                 # All branches above set vm_drive.
-                self.rootfs_options = '%s -no-reboot' % vm_drive
+                self.rootfs_options = vm_drive
+                if not self.fstype in self.vmtypes:
+                    self.rootfs_options += ' -no-reboot'
             self.kernel_cmdline = 'root=%s rw' % (self.get('QB_KERNEL_ROOT'))
 
         if self.fstype == 'nfs':
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-25 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 17:17 [PATCH] runqemu: If using a vmtype image do not add the -no-reboot flag Jason Wessel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.