Bug 8315 - Fail to run qemu via nfs with toolchain sdk
Summary: Fail to run qemu via nfs with toolchain sdk
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: High normal
Target Milestone: 2.0
Assignee: Maxin B. John
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-09-17 06:45 UTC by Yi Zhao
Modified: 2015-11-09 07:13 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2015-09-17 06:45:41 UTC
Toolchain location: http://autobuilder.yoctoproject.org/pub/releases/yocto-1.8_M3.rc1/toolchain

Git rev: master/ea562de57590c966cd5a75fda8defecd397e6436

Steps:
1. Download the toolchain sdk and install it
2. $ . /opt/poky/1.8+snapshot/environment-setup-core2-64-poky-linux
3. $ runqemu-extract-sdk core-image-sato-sdk-qemuarm-20150915110945.rootfs.tar.bz2 rootfs
4. $ runqemu nfs zImage-qemuarm.bin rootfs

Error message:
#########################
Assuming rootfs is an nfs rootfs
Set MACHINE to [qemuarm] based on kernel [zImage-qemuarm.bin]

Continuing with the following parameters:
KERNEL: [zImage-qemuarm.bin]
ROOTFS: [/home/zhaoyi/qemuarm/rootfs]
FSTYPE: [nfs]
Acquiring lockfile for tap0...
Setting up tap interface under sudo
Acquiring lockfile for tap1...
runqemu-export-rootfs restart /home/zhaoyi/qemuarm/rootfs
Error: Unable to find unfsd binary in /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin/
This shouldn't happen - something is missing from your toolchain installation
#########################
Comment 1 Maxin B. John 2015-09-24 11:36:49 UTC
Recreated the error in Fedora 22 machine:

$ runqemu nfs zImage-qemuarm.bin rootfs
Assuming rootfs is an nfs rootfs
Set MACHINE to [qemuarm] based on kernel [zImage-qemuarm.bin]

Continuing with the following parameters:
KERNEL: [zImage-qemuarm.bin]
ROOTFS: [/home/maxin/rootfs]
FSTYPE: [nfs]
Acquiring lockfile for tap0...
Using preconfigured tap device 'tap0'
If this is not intended, touch /tmp/qemu-tap-locks/tap0.skip to make runqemu skip tap0.
runqemu-export-rootfs restart /home/maxin/rootfs
Error: Unable to find unfsd binary in /opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin/
This shouldn't happen - something is missing from your toolchain installation
Comment 2 Maxin B. John 2015-09-24 11:42:43 UTC
In the latest toolchain, "unfsd" binary is located under "$OECORE_NATIVE_SYSROOT/usr/bin/"  

So, updating the location of "unfsd" from "/usr/sbin" to "/usr/bin" in "/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu-export-rootfs" resolves this error for me.
Comment 3 Maxin B. John 2015-09-24 16:18:12 UTC
patch sent to oe-core:

http://lists.openembedded.org/pipermail/openembedded-core/2015-September/110937.html
Comment 5 Ke Zou 2015-10-12 07:27:32 UTC
verified with build yocto2.0 rc1
poky:eac61f37e36099f74485dab398b57f3812826d17
Comment 6 Ross Burton 2015-10-26 15:17:10 UTC
So the fix for this breaks nfs on non-SDK usage.

If I build unfs3-native and it ends up in sysroot/usr/sbin.  If I build nativesdk-unfs3 it ends up in .../usr/bin.

Because nativesdk.bbclass does this:

  sbindir = "${bindir}"

(oe-core 24b80d211f3808a0ffebee426932f11b8d4d46e0)

So we either fiddle the configure arguments to unfs3-native to set --sbindir=${bindir}, or teach runqemu how to search paths for binaries.
Comment 7 Maxin B. John 2015-10-27 15:56:59 UTC
Patch submitted to the list:
http://lists.openembedded.org/pipermail/openembedded-core/2015-October/112056.html
Comment 9 Yi Zhao 2015-11-09 07:13:05 UTC
Verified with 2.0 rc3 (jethro/fc45deac89ef63ca1c44e763c38ced7dfd72cbe1)