Bug 10784

Summary: devtool: Misleading error message when running "devtool runqemu" before building image
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Henry Bruce <henry.bruce>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: giouli.tsami, jaewon, libertad.gonzalez.de.la.cruz, meta.mr.watcher, meta.watcher, randy.macleod, sgw, tim.orling
Version: 2.2   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Henry Bruce 2016-12-12 00:31:45 UTC
If you don't build an image before running "devtool runqemu", it outputs "ERROR: QEMU is not available within this SDK". This implies that there is a component missing from the SDK, not that there is no image run.

Observed behavior
=================
Install eSDK for QEMU target
Run environment setup script (e.g. source environment-setup-i586-poky-linux)
Run "devtool runqemu"
See error: "ERROR: QEMU is not available within this SDK".

Expected behavior
=================
Install eSDK for QEMU target
Run environment setup script (e.g. source environment-setup-i586-poky-linux)
Run "devtool runqemu"
See error message something like
"ERROR: No QEMU image found. Have you run 'devtool build-image'?"
Comment 1 Paul Eggleton 2016-12-12 22:55:30 UTC
After an offline discussion with Henry, this is with SDK_EXT_TYPE = "minimal", where by default there isn't anything installed into the SDK, thus the message isn't wrong - there is no qemu binary available. Running devtool build-image installs one as a side-effect of building the image (at least for qemu* machines).

There are a couple of things we could do to mitigate this:

1) We could check for the image being present first and display an error about that if there isn't one.

2) We could check if qemu really should be able to be run or not and make the error based on that (we would probably need to check the environment for the new QB_* variables), using a separate "qemu binary not available" or similar error for the existing check.
Comment 2 Jaewon Lee 2018-09-14 00:55:50 UTC
Hi, we have a similar issue. It is failing with 'QEMU is not available within this SDK' because it is just checking the current 'bindir_native' for the binary,  but we set a custom sysroot bindir in the qemuboot.conf by appending to do_write_qemuboot_conf. So if we just get rid of that check runqemu runs fine. Anyway we can support paul's 2nd idea and see if it actually be run before throwing an error?
Comment 3 Jaewon Lee 2018-10-04 00:09:16 UTC
woops never mind was not within the eSDK. this is only supposed to run withing the eSDK. working for me
Comment 4 Randy MacLeod 2023-10-24 14:24:35 UTC
Bulk move from 4.99 or 0.00 to 5.99