]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqemu: Fix detection of -serial parameter
authorJörg Sommer <joerg.sommer@navimatix.de>
Thu, 29 Aug 2024 18:33:45 +0000 (20:33 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 30 Aug 2024 06:09:18 +0000 (07:09 +0100)
The pattern `-serial` matches also `-device usb-serial` and `virtio-serial`
which are not the desired parameter. This causes the serial console ttyS1 is
missing and Systemd's getty@ttyS1 fails constantly.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 69cd44864e5d8537cfe50f57fd59113dd5a3b93c..f350021258ad80896b053fd0f458877616543a6f 100755 (executable)
@@ -1483,7 +1483,7 @@ to your build configuration.
         # If no serial or serialtcp options were 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))
+        serial_num = len(re.findall("(^| )-serial ", self.qemu_opt))
 
         # Assume if the user passed serial options, they know what they want
         # and pad to two devices
@@ -1503,7 +1503,7 @@ to your build configuration.
 
                 self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT")
 
-        serial_num = len(re.findall("-serial", self.qemu_opt))
+        serial_num = len(re.findall("(^| )-serial ", self.qemu_opt))
         if serial_num < 2:
             self.qemu_opt += " -serial null"