Bug 1278

Summary: runqemu error can't find tunctl
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jessica <jessica.zhang>
Component: meta-yoctoAssignee: Scott Garman <scott.a.garman>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: High CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jessica 2011-07-22 16:16:47 UTC
with latest master, runqemu will report error:

runqemu bzImage-qemux86.bin myimage-qemux86.ext3 
Set MACHINE to [qemux86] based on kernel [bzImage-qemux86.bin]

Continuing with the following parameters:
KERNEL: [bzImage-qemux86.bin]
ROOTFS: [myimage-qemux86.ext3]
FSTYPE: [ext3]

/sysroots/i686-linux
Setting up tap interface under sudo
[sudo] password for jzhang: 
Error: Unable to find tunctl binary in '/sysroots/i686-linux/usr/bin'

And the issue seems due to TMPDIR is not setup correct, which shows empty
Comment 1 Scott Garman 2011-07-22 18:13:33 UTC
I've verified that this happens under the particular condition of when you run the runqemu script from a directory where bitbake -e does not work - Jessica's original case she sent me had her running runqemu from the tmp/deploy/images directory. 

The dependency of requiring the bitbake command to work to determine TMPDIR was introduced with this commit:

http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=81d14f5629b4eeb2096ccb52812e5775fe0125e9

The commit message indicates that we can no longer infer TMPDIR from BUILDDIR, so I'm not sure that we can allow runqemu to be run from arbitrary directories anymore for in-tree Poky configurations. 

I think the best I can do is add a test to make sure the bitbake -e command returned successfully, and notify this restriction to the user.
Comment 2 Scott Garman 2011-07-22 18:37:26 UTC
I've pushed a proposed fix to my branch:

http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-fix

and submitted a pull request to the oe-core ML.