Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] scripts/runqemu: Add always ttyS1 when no serial options are specified
@ 2017-02-16 17:10 Aníbal Limón
  0 siblings, 0 replies; only message in thread
From: Aníbal Limón @ 2017-02-16 17:10 UTC (permalink / raw)
  To: openembedded-core; +Cc: leonardo.sandoval.gonzalez, paul.eggleton

We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES),
if not serial or serialtcp options was specified only ttyS0 is created
and sysvinit shows an error trying to enable ttyS1:

     INIT: Id "S1" respawning too fast: disabled for 5 minutes

[YOCTO #10491]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 scripts/runqemu | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index d74f252..38c9fca 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1038,6 +1038,17 @@ class BaseConfig(object):
             elif serial_num == 1:
                 self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT")
 
+        # We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES),
+        # if not serial or serialtcp options was specified only ttyS0 is created
+        # and sysvinit shows an error trying to enable ttyS1:
+        #     INIT: Id "S1" respawning too fast: disabled for 5 minutes
+        serial_num = len(re.findall("-serial", self.qemu_opt))
+        if serial_num == 0:
+            if re.search("-nographic", self.qemu_opt):
+                self.qemu_opt += " -serial mon:stdio -serial null"
+            else:
+                self.qemu_opt += " -serial mon:vc -serial null"
+
     def start_qemu(self):
         if self.kernel:
             kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'))
-- 
2.1.4



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

only message in thread, other threads:[~2017-02-16 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-16 17:10 [PATCH] scripts/runqemu: Add always ttyS1 when no serial options are specified Aníbal Limón

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox