diff options
author | Jon Mason <jdmason@kudzu.us> | 2021-11-02 15:59:12 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-03 10:12:42 +0000 |
commit | 859776220f8b1cf1f4178b0fcfbff01f844a580a (patch) | |
tree | c217c0fec4268924cf848376936332d3bbd503d0 /scripts | |
parent | 94133e1366f3b00b5ff3dfbde34871dff4971d3f (diff) | |
download | poky-859776220f8b1cf1f4178b0fcfbff01f844a580a.tar.gz |
runqemu: work without SERIAL_CONSOLES being defined
Not all machine definitions need to have SERIAL_CONSOLES defined, but
runqemu currently will fail with the following script error if not
present:
Traceback (most recent call last):
File "/builder/meta-arm/poky/scripts/runqemu", line 1604, in main
config.setup_final()
File "/builder/meta-arm/poky/scripts/runqemu", line 1446, in setup_final
self.setup_serial()
File "/builder/meta-arm/poky/scripts/runqemu", line 1381, in setup_serial
self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1]
IndexError: list index out of range
To get around this issue, add a sanity check to runqemu to avoid the
parsing of SERIAL_CONSOLES if empty.
(From OE-Core rev: e8359000e765f876c041b6ccabe63f069f83efec)
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 1143509975..d4f0888f8d 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1376,7 +1376,7 @@ class BaseConfig(object): | |||
1376 | 1376 | ||
1377 | def setup_serial(self): | 1377 | def setup_serial(self): |
1378 | # Setup correct kernel command line for serial | 1378 | # Setup correct kernel command line for serial |
1379 | if self.serialstdio == True or self.serialconsole == True or self.nographic == True or self.tcpserial_portnum: | 1379 | if self.get('SERIAL_CONSOLES') and (self.serialstdio == True or self.serialconsole == True or self.nographic == True or self.tcpserial_portnum): |
1380 | for entry in self.get('SERIAL_CONSOLES').split(' '): | 1380 | for entry in self.get('SERIAL_CONSOLES').split(' '): |
1381 | self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1] | 1381 | self.kernel_cmdline_script += ' console=%s' %entry.split(';')[1] |
1382 | 1382 | ||