Bug 10265

Summary: nativesdk-qemu-helper: runqemu in sdk should check OECORE_NATIVE_SYSROOT and OECORE_TARGET_SYSROOT
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, yi.zhao
Version: 2.2   
Target Milestone: 2.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robert Yang 2016-09-13 08:43:53 UTC
It should check OECORE_NATIVE_SYSROOT and OECORE_TARGET_SYSROOT in env vars, otherwise it can't work after extracted from SDK. For example:

$ mv tmp/sysroots tmp/sysroots.bak

Extract sdk and source sdk/environment-setup-core2-32-poky-linux

$ runqemu test_gen/tmp/deploy/images/genericx86/ nographic
runqemu - INFO - DEPLOY_DIR_IMAGE: /buildarea/lyang1/test_gen/tmp/deploy/images/genericx86
runqemu - INFO - Running ls -t /buildarea/lyang1/test_gen/tmp/deploy/images/genericx86/*.qemuboot.conf...
runqemu - INFO - CONFFILE: /buildarea/lyang1/test_gen/tmp/deploy/images/genericx86/core-image-minimal-genericx86.qemuboot.conf
runqemu - INFO - Continuing with the following parameters:

KERNEL: [/buildarea/lyang1/test_gen/tmp/deploy/images/genericx86/bzImage]
MACHINE: [genericx86]
FSTYPE: [ext4]
ROOTFS: [/buildarea/lyang1/test_gen/tmp/deploy/images/genericx86/core-image-minimal-genericx86-20160913030002.rootfs.ext4]
CONFFILE: [/buildarea/lyang1/test_gen/tmp/deploy/images/genericx86/core-image-minimal-genericx86.qemuboot.conf]

runqemu - INFO - Running /sbin/ip link...
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
runqemu - INFO - Using preconfigured tap device tap0
runqemu - INFO - If this is not intended, touch /tmp/qemu-tap-locks/tap0.skip to make runqemu skip tap0.
runqemu - INFO - Releasing lockfile for tap device 'tap0'
Traceback (most recent call last):
  File "/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 920, in <module>
    ret = main()
  File "/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 912, in main
    config.setup_final()
  File "/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 806, in setup_final
    raise Exception("No QEMU binary '%s' could be found" % qemu_bin)
Exception: No QEMU binary '/buildarea/lyang1/test_gen/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386' could be found