summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKevin Hao <kexin.hao@windriver.com>2019-06-06 15:11:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-18 11:28:58 +0100
commit22b3ff061a2a95cca65c7b291adb61f2f8f140bc (patch)
treebc9a582b6f994fc9c10e1f7951f97de818e176e3 /scripts
parent0ab13d1a2cf20528f66d177e37dce4efd9fe9019 (diff)
downloadpoky-22b3ff061a2a95cca65c7b291adb61f2f8f140bc.tar.gz
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] (From OE-Core rev: db4b0530841d4d1407b48e262b7255b3f5a186ab) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixes qemuppc hang in warrior] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 39bed038d5..19fd521cd9 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -438,7 +438,7 @@ class BaseConfig(object):
438 elif arg == 'publicvnc': 438 elif arg == 'publicvnc':
439 self.qemu_opt_script += ' -vnc :0' 439 self.qemu_opt_script += ' -vnc :0'
440 elif arg.startswith('tcpserial='): 440 elif arg.startswith('tcpserial='):
441 self.tcpserial_portnum = arg[len('tcpserial='):] 441 self.tcpserial_portnum = '%s' % arg[len('tcpserial='):]
442 elif arg.startswith('biosdir='): 442 elif arg.startswith('biosdir='):
443 self.custombiosdir = arg[len('biosdir='):] 443 self.custombiosdir = arg[len('biosdir='):]
444 elif arg.startswith('biosfilename='): 444 elif arg.startswith('biosfilename='):
@@ -681,10 +681,16 @@ class BaseConfig(object):
681 681
682 def check_tcpserial(self): 682 def check_tcpserial(self):
683 if self.tcpserial_portnum: 683 if self.tcpserial_portnum:
684 ports = self.tcpserial_portnum.split(':')
685 port = ports[0]
684 if self.get('QB_TCPSERIAL_OPT'): 686 if self.get('QB_TCPSERIAL_OPT'):
685 self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', self.tcpserial_portnum) 687 self.qemu_opt_script += ' ' + self.get('QB_TCPSERIAL_OPT').replace('@PORT@', port)
686 else: 688 else:
687 self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % self.tcpserial_portnum 689 self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
690
691 if len(ports) > 1:
692 for port in ports[1:]:
693 self.qemu_opt_script += ' -serial tcp:127.0.0.1:%s' % port
688 694
689 def check_and_set(self): 695 def check_and_set(self):
690 """Check configs sanity and set when needed""" 696 """Check configs sanity and set when needed"""