mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
oeqa/qemurunner: Drop newlines serial workaround
Drop the newlines serial workaround, it doesn't seem to fix things enough of the time to be useful. (From OE-Core rev: 6cd57b2d148c5de7839d52d8cec359e4a10e0cd6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
b233e2f8c2
commit
ddd38a3b15
|
@ -445,11 +445,9 @@ class QemuRunner:
|
||||||
self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
|
self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
|
||||||
(self.boottime, time.strftime("%D %H:%M:%S")))
|
(self.boottime, time.strftime("%D %H:%M:%S")))
|
||||||
endtime = time.time() + self.boottime
|
endtime = time.time() + self.boottime
|
||||||
newlinetime = time.time() + 120
|
|
||||||
filelist = [self.server_socket, self.runqemu.stdout]
|
filelist = [self.server_socket, self.runqemu.stdout]
|
||||||
reachedlogin = False
|
reachedlogin = False
|
||||||
stopread = False
|
stopread = False
|
||||||
sentnewlines = False
|
|
||||||
qemusock = None
|
qemusock = None
|
||||||
bootlog = b''
|
bootlog = b''
|
||||||
data = b''
|
data = b''
|
||||||
|
@ -458,16 +456,6 @@ class QemuRunner:
|
||||||
sread, swrite, serror = select.select(filelist, [], [], 5)
|
sread, swrite, serror = select.select(filelist, [], [], 5)
|
||||||
except InterruptedError:
|
except InterruptedError:
|
||||||
continue
|
continue
|
||||||
# With the 6.5 kernel, the serial port getty sometimes fails to appear, the data
|
|
||||||
# appears lost in some buffer somewhere. Wait two minutes, then if we've not had a login,
|
|
||||||
# try and provoke one. This is a workaround until we can work out the root cause.
|
|
||||||
if time.time() > newlinetime and not sentnewlines:
|
|
||||||
self.logger.warning('Probing the serial port to wake it up!')
|
|
||||||
try:
|
|
||||||
self.server_socket.sendall(bytes("\n\n", "utf-8"))
|
|
||||||
sentnewlines = True
|
|
||||||
except BrokenPipeError as e:
|
|
||||||
self.logger.debug('Probe failed %s' % repr(e))
|
|
||||||
for file in sread:
|
for file in sread:
|
||||||
if file is self.server_socket:
|
if file is self.server_socket:
|
||||||
qemusock, addr = self.server_socket.accept()
|
qemusock, addr = self.server_socket.accept()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user