summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2018-08-14 20:05:29 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-18 11:08:53 +0100
commitfff3aa6b075ba68d150e3dc76af96b14a29bb517 (patch)
tree8d2edaccba59dd5ce093c99bd1b8e36e6203d281 /scripts
parentedc09e102e888aed1e0de086c4cf8906a6bd1c46 (diff)
downloadpoky-fff3aa6b075ba68d150e3dc76af96b14a29bb517.tar.gz
runqemu: exit gracefully with an error message if qemu system is not evaluated
It solves below error: -- snip -- return 'qemu-system-%s' % qbsys UnboundLocalError: local variable 'qbsys' referenced before assignment -- snip -- [YOCTO #12846] (From OE-Core rev: 519273f54c0b8a6fff36afeb7646d8e37717be22) (From OE-Core rev: bc030c9f5af4af5a8bad48bc8beca9324a65d25b) Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index de42d0f323..cb36c2007b 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1115,6 +1115,11 @@ class BaseConfig(object):
1115 qbsys = 'riscv64' 1115 qbsys = 'riscv64'
1116 elif mach == 'qemuriscv32': 1116 elif mach == 'qemuriscv32':
1117 qbsys = 'riscv32' 1117 qbsys = 'riscv32'
1118 else:
1119 logger.error("Unable to determine QEMU PC System emulator for %s machine." % mach)
1120 logger.error("As %s is not among valid QEMU machines such as," % mach)
1121 logger.error("qemux86-64, qemux86, qemuarm64, qemuarm, qemumips64, qemumips64el, qemumipsel, qemumips, qemuppc")
1122 raise RunQemuError("Set qb_system_name with suitable QEMU PC System emulator in .*qemuboot.conf.")
1118 1123
1119 return 'qemu-system-%s' % qbsys 1124 return 'qemu-system-%s' % qbsys
1120 1125