summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 5fed705977..554946e2d7 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -444,9 +444,11 @@ class QemuRunner:
444 self.logger.debug("Waiting at most %d seconds for login banner (%s)" % 444 self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
445 (self.boottime, time.strftime("%D %H:%M:%S"))) 445 (self.boottime, time.strftime("%D %H:%M:%S")))
446 endtime = time.time() + self.boottime 446 endtime = time.time() + self.boottime
447 newlinetime = time.time() + 120
447 filelist = [self.server_socket, self.runqemu.stdout] 448 filelist = [self.server_socket, self.runqemu.stdout]
448 reachedlogin = False 449 reachedlogin = False
449 stopread = False 450 stopread = False
451 sentnewlines = False
450 qemusock = None 452 qemusock = None
451 bootlog = b'' 453 bootlog = b''
452 data = b'' 454 data = b''
@@ -455,6 +457,16 @@ class QemuRunner:
455 sread, swrite, serror = select.select(filelist, [], [], 5) 457 sread, swrite, serror = select.select(filelist, [], [], 5)
456 except InterruptedError: 458 except InterruptedError:
457 continue 459 continue
460 # With the 6.5 kernel, the serial port getty sometimes fails to appear, the data
461 # appears lost in some buffer somewhere. Wait two minutes, then if we've not had a login,
462 # try and provoke one. This is a workaround until we can work out the root cause.
463 if time.time() > newlinetime and not sentnewlines:
464 self.logger.warning('Probing the serial port to wake it up!')
465 try:
466 self.server_socket.sendall(bytes("\n\n", "utf-8"))
467 except BrokenPipeError as e:
468 self.logger.debug('Probe failed %s' % repr(e))
469 sentnewlines = True
458 for file in sread: 470 for file in sread:
459 if file is self.server_socket: 471 if file is self.server_socket:
460 qemusock, addr = self.server_socket.accept() 472 qemusock, addr = self.server_socket.accept()