[oe-commits] [openembedded-core] 22/30: runqemu: Add the support to pass multi ports to tcpserial parameter

git at git.openembedded.org git at git.openembedded.org
Tue Jun 18 10:31:54 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch warrior
in repository openembedded-core.

commit db4b0530841d4d1407b48e262b7255b3f5a186ab
Author: Kevin Hao <kexin.hao at windriver.com>
AuthorDate: Thu Jun 6 15:11:46 2019 +0800

    runqemu: Add the support to pass multi ports to tcpserial parameter
    
    In some cases(such as the oeqa's qemurunner), we need to setup multi
    serial devices via the '-serial 127.0.0.1:xx" and the order of them
    is significant. The mixing use of "tcpserial" and "-serial 127.0.0.1:xx"
    cause ambiguous issues and we can't fix it by only adjusting the order
    of them. So add the support to pass multi ports to the tcpserial
    parameter, this will make sure that the order of setting up the serial
    is really what we want.
    
    [YOCTO Bug 13309]
    
    Signed-off-by: Kevin Hao <kexin.hao at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    [Fixes qemuppc hang in warrior]
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/runqemu | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 39bed03..19fd521 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -438,7 +438,7 @@ class BaseConfig(object):
             elif arg == 'publicvnc':
                 self.qemu_opt_script += ' -vnc :0'
             elif arg.startswith('tcpserial='):
-                self.tcpserial_portnum = arg[len('tcpserial='):]
+                self.tcpserial_portnum = '%s' % arg[len('tcpserial='):]
             elif arg.startswith('biosdir='):
                 self.custombiosdir = arg[len('biosdir='):]
             elif arg.startswith('biosfilename='):
@@ -681,10 +681,16 @@ class BaseConfig(object):
 
     def check_tcpserial(self):
         if self.tcpserial_portnum:
+            ports = self.tcpserial_portnum.split(':')
+            port = ports[0]
             if self.get('QB_TCPSERIAL_OPT'):
-                self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', self.tcpserial_portnum)
+                self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', port)
             else:
-                self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % self.tcpserial_portnum
+                self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
+
+            if len(ports) > 1:
+                for port in ports[1:]:
+                    self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
 
     def check_and_set(self):
         """Check configs sanity and set when needed"""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list