diff options
author | Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | 2018-08-14 20:05:29 +0530 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-15 09:33:53 +0100 |
commit | 519273f54c0b8a6fff36afeb7646d8e37717be22 (patch) | |
tree | fa7851e1539bf2bf85b341b7b28300c2724aec1e | |
parent | 0f8dcb9c717201c4b1edf4fa55880b432bfb7723 (diff) | |
download | openembedded-core-519273f54c0b8a6fff36afeb7646d8e37717be22.tar.gz openembedded-core-519273f54c0b8a6fff36afeb7646d8e37717be22.tar.bz2 openembedded-core-519273f54c0b8a6fff36afeb7646d8e37717be22.zip |
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]
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index f52b9a82ea..409d17c648 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1118,6 +1118,11 @@ class BaseConfig(object): qbsys = 'riscv64' elif mach == 'qemuriscv32': qbsys = 'riscv32' + else: + logger.error("Unable to determine QEMU PC System emulator for %s machine." % mach) + logger.error("As %s is not among valid QEMU machines such as," % mach) + logger.error("qemux86-64, qemux86, qemuarm64, qemuarm, qemumips64, qemumips64el, qemumipsel, qemumips, qemuppc") + raise RunQemuError("Set qb_system_name with suitable QEMU PC System emulator in .*qemuboot.conf.") return 'qemu-system-%s' % qbsys |