| Summary: | runqemu doesn't work with builddir env setup script as host paths are filtered | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Chin Huat Ang <chin.huat.ang> | ||||
| Component: | oe-core other | Assignee: | Armin Kuster <akuster> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium+ | CC: | akuster, jkrishnanjanappa, pravin.shankarx.patil, ross.burton, stephano | ||||
| Version: | 2.5 | ||||||
| Target Milestone: | 2.4.4 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
v2 patch in comment 2 is still incomplete as the PATH variable is missing path to build directory toolchain (STAGING_BINDIR_TOOLCHAIN). v3 patch submitted: http://lists.openembedded.org/pipermail/openembedded-core/2018-April/150141.html Merged in master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=00302da3991ea7dea298f475091b35b6d73cefe1 Merged in sumo: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=sumo&id=d7d6ef7df7e14872dd98883ba3a75c28a1c69947 Created attachment 4325 [details]
qemu launch log file
I am trying to launch qemu using bitbake meta-ide-support built script. Release- Yocto 2.4.3.rc2 commit id - 7e7ee662f5dea4d090293045f7498093322802cc following are the steps to reproduce the issue 1)take poky clone 2)cd poky and checkout with commit id 3)source oe-init-build-env 4)bitbake meta-ide-support( build for any architecture ) 5)download the kernel and rootfs from following link https://autobuilder.yocto.io/pub/releases/yocto-2.4.3.rc2/machines/qemu/ 7)runqemu-extract-sdk image.tar.bz2 rootfs/ 8)runqemu vmlinux-qemuppc.bin rootfs core-image-sato-sdk-qemuppc.qemuboot.conf after this command following logs are comming runqemu vmlinux-qemuppc.bin rootfs core-image-sato-sdk-qemuppc.qemuboot.conf runqemu - INFO - Running MACHINE=qemuppc bitbake -e... runqemu - INFO - Overriding conf file setting of STAGING_DIR_NATIVE to /data/pravinsx/bsp/poky/adt/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native from Bitbake environment runqemu - INFO - Continuing with the following parameters: KERNEL: [/data/pravinsx/bsp/poky/adt/ppc/vmlinux-qemuppc.bin] MACHINE: [qemuppc] FSTYPE: [nfs] NFS_DIR: [/data/pravinsx/bsp/poky/adt/ppc/rootfs] CONFFILE: [/data/pravinsx/bsp/poky/adt/ppc/core-image-sato-sdk-qemuppc.qemuboot.conf] /bin/sh: 1: stty: not found Traceback (most recent call last): File "/data/pravinsx/bsp/poky/scripts/runqemu", line 1270, in main config.setup_network() File "/data/pravinsx/bsp/poky/scripts/runqemu", line 997, in setup_network self.saved_stty = subprocess.check_output("stty -g", shell=True).decode('utf-8') File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'stty -g' returned non-zero exit status 127 Cleanup I have attached logs also Following the steps in comment 6 I can't replicate this. "/bin/sh: 1: stty: not found" Do you just have a system without coreutils present? That should be in /bin/stty. *** Bug 12784 has been marked as a duplicate of this bug. *** Please review the question in comment 8 There's a lot of confusion in this and related bugs. The original bug is due to the toolchain environment script blasting $PATH and this does appear to be still broken in 2.4.x. However comment 6 isn't related to the toolchain and this works for me. pravin, please verify your report and check that you have stty on your machine. I have checked on my machine. there is already present stty. Can you replicate the bug using the *exact* steps that are in comment 6? Because I certainly can't. Pravin, can you confirm that the missing Step 6 in comment 6 is sourcing tmp/environment-setup-* for 2.4.x earlier? The issue should be reproducible then. Yes confirmed, I missed to write step 6. step 6 is source tmp/environment-setup-* for 2.4.x. After that also issue is reproducible. (In reply to comment #14) > Pravin, can you confirm that the missing Step 6 in comment 6 is sourcing > tmp/environment-setup-* for 2.4.x earlier? The issue should be reproducible > then. The question appears to have been answered, if not please restate the question. Update: I believe the issue observed by Pravin in comment 6, is same as the issue observed in the beginning of this bug. Basically, the step 6 which is "source tmp/environment-setup-*" does not export the default binary directories of host machine. Due which "stty" was not found and returned with 127. The fix (http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=sumo&id=d7d6ef7df7e14872dd98883ba3a75c28a1c69947) done for sumo should solve for rocko also, if back ported. For quick verify: After step 6, export PATH=$PATH:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/local/ferret/bin:/usr/bin:/usr/sbin:/usr/local/bin:/sbin solve help us to confirm it. Regards, Jagadeesh I have verified on yocto-2.4.3.rc2 rocko branch. I have applied following patch. http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=sumo&id=d7d6ef7df7e14872dd98883ba3a75c28a1c69947) now I am able to launch qemu. (In reply to comment #18) > I have verified on yocto-2.4.3.rc2 rocko branch. > > I have applied following patch. > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/ > ?h=sumo&id=d7d6ef7df7e14872dd98883ba3a75c28a1c69947) > > now I am able to launch qemu. Thanks for the confirmation. Submitted the fix done for sumo to rocko also, at http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154751.html Regards, Jagadeesh backported to rocko in rocko proper http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=rocko&id=16c0989eec80d8661e2fc9a1011c4ae1f154ffbc closing |
When eclipse-yocto plugin is configured to use toolchain from build dir, firing up QEMU using External Tool Configuration no longer works. It appears that runqemu won't work with env setup script in build dir as it does not preserve $PATH like it's SDK counterpart. This can be reproduce easily by running runqemu after sourcing the build dir env setup script: cd $BUILDDIR && sh -c ". tmp/environment-setup-i586-poky-linux; runqemu" The error message looks like: runqemu - INFO - Running bitbake -e... runqemu - INFO - Continuing with the following parameters: KERNEL: [/home/parallels/git/poky/build/tmp/deploy/images/qemux86/bzImage--4.14.30+git0+f8232ce8e9_1d50ce210b-r0-qemux86-20180413010012.bin] MACHINE: [qemux86] FSTYPE: [ext4] ROOTFS: [/home/parallels/git/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20180413124506.rootfs.ext4] CONFFILE: [/home/parallels/git/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20180413124506.qemuboot.conf] /bin/sh: 1: stty: not found Traceback (most recent call last): File "/home/parallels/git/poky/scripts/runqemu", line 1291, in main config.setup_network() File "/home/parallels/git/poky/scripts/runqemu", line 1014, in setup_network self.saved_stty = subprocess.check_output("stty -g", shell=True).decode('utf-8') File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'stty -g' returned non-zero exit status 127 Cleanup