diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-02-16 11:10:30 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-04 23:18:18 +0000 |
commit | 86d6b790eb70c330e351b2ab4d9a9787c114bdf4 (patch) | |
tree | c5b22e556deff34479cef54e4018bfa3a8d9887d /scripts/runqemu | |
parent | f573db010f88c07885143689cea6896f84e0589a (diff) | |
download | poky-86d6b790eb70c330e351b2ab4d9a9787c114bdf4.tar.gz |
scripts/runqemu: Add always ttyS1 when no serial options are specified
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]
(From OE-Core rev: 3a0efbbe6bb5a7f0fb3df0f6052b11e56788405f)
(From OE-Core rev: ab8d1a73ad5285dbc86352813b24db2adb3c6367)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 4d8fc8ec3c..b6c6a8747c 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1078,6 +1078,17 @@ class BaseConfig(object): | |||
1078 | elif serial_num == 1: | 1078 | elif serial_num == 1: |
1079 | self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT") | 1079 | self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT") |
1080 | 1080 | ||
1081 | # We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES), | ||
1082 | # if not serial or serialtcp options was specified only ttyS0 is created | ||
1083 | # and sysvinit shows an error trying to enable ttyS1: | ||
1084 | # INIT: Id "S1" respawning too fast: disabled for 5 minutes | ||
1085 | serial_num = len(re.findall("-serial", self.qemu_opt)) | ||
1086 | if serial_num == 0: | ||
1087 | if re.search("-nographic", self.qemu_opt): | ||
1088 | self.qemu_opt += " -serial mon:stdio -serial null" | ||
1089 | else: | ||
1090 | self.qemu_opt += " -serial mon:vc -serial null" | ||
1091 | |||
1081 | def start_qemu(self): | 1092 | def start_qemu(self): |
1082 | if self.kernel: | 1093 | if self.kernel: |
1083 | kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND')) | 1094 | kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND')) |