]> code.ossystems Code Review - openembedded-core.git/commit
runqemu: work without SERIAL_CONSOLES being defined
authorJon Mason <jdmason@kudzu.us>
Tue, 2 Nov 2021 19:59:12 +0000 (15:59 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Nov 2021 10:12:01 +0000 (10:12 +0000)
commite8359000e765f876c041b6ccabe63f069f83efec
tree603c0fac61bdd23050aec4031cc457c49514eec5
parent876d09bd42e24db3a498148e3305fb27f70ceda0
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.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu