diff options
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 3a17033268..0668e12e61 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1467,6 +1467,19 @@ to your build configuration. | |||
1467 | for entry in self.get('SERIAL_CONSOLES').split(' '): | 1467 | for entry in self.get('SERIAL_CONSOLES').split(' '): |
1468 | self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1] | 1468 | self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1] |
1469 | 1469 | ||
1470 | # We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES). | ||
1471 | # If no serial or serialtcp options were specified, only ttyS0 is created | ||
1472 | # and sysvinit shows an error trying to enable ttyS1: | ||
1473 | # INIT: Id "S1" respawning too fast: disabled for 5 minutes | ||
1474 | serial_num = len(re.findall("-serial", self.qemu_opt)) | ||
1475 | |||
1476 | # Assume if the user passed serial options, they know what they want | ||
1477 | # and pad to two devices | ||
1478 | if serial_num == 1: | ||
1479 | self.qemu_opt += " -serial null" | ||
1480 | elif serial_num >= 2: | ||
1481 | return | ||
1482 | |||
1470 | if self.serialstdio == True or self.nographic == True: | 1483 | if self.serialstdio == True or self.nographic == True: |
1471 | self.qemu_opt += " -serial mon:stdio" | 1484 | self.qemu_opt += " -serial mon:stdio" |
1472 | else: | 1485 | else: |
@@ -1478,10 +1491,6 @@ to your build configuration. | |||
1478 | 1491 | ||
1479 | self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT") | 1492 | self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT") |
1480 | 1493 | ||
1481 | # We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES). | ||
1482 | # If no serial or serialtcp options were specified, only ttyS0 is created | ||
1483 | # and sysvinit shows an error trying to enable ttyS1: | ||
1484 | # INIT: Id "S1" respawning too fast: disabled for 5 minutes | ||
1485 | serial_num = len(re.findall("-serial", self.qemu_opt)) | 1494 | serial_num = len(re.findall("-serial", self.qemu_opt)) |
1486 | if serial_num < 2: | 1495 | if serial_num < 2: |
1487 | self.qemu_opt += " -serial null" | 1496 | self.qemu_opt += " -serial null" |