Created attachment 3081 [details] profile-configuration-with-toolchain Commit: 21823cb466e79540567ad1a43ae6f93d850e4057 Eclipse version: luna, mars OS: Fedora 21 Tested toolchain versions: - poky-glibc-x86_64-core-image-sato-i586-toolchain-2.0+snapshot.sh (without "-ext") Steps: 1. Download and install toolchain from AB (yocto-2.1_M3.rc2) - download toolchain http://autobuilder.yoctoproject.org/pub/releases/yocto-2.1_M3.rc2/toolchain/x86_64/poky-glibc-x86_64-core-image-sato-i586-toolchain-2.0+snapshot.sh - run script poky-glibc-x86_64-core-image-sato-i586-toolchain-2.0+snapshot.sh - Enter target directory for toolchain: /home/yocto/eclipse-run/yocto-M3.rc2/installed/toolchain - Output: "Poky (Yocto Project Reference Distro) SDK installer version 2.0+snapshot ======================================================================== Enter target directory for SDK (default: /opt/poky/2.0+snapshot): /home/yocto/eclipse-run/yocto-M3.rc2/installed/toolchain You are about to install the SDK to "/home/yocto/eclipse-run/yocto-M3.rc2/installed/toolchain". Proceed[Y/n]? Y Extracting SDK................................................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/yocto/eclipse-run/yocto-M3.rc2/installed/toolchain/environment-setup-i586-poky-linux 2. Download core-image-sato-sdk-qemux86.tar.bz2 archive for sysroot: http://autobuilder.yoctoproject.org/pub/releases/yocto-2.1_M3.rc2/machines/qemu/qemux86/core-image-sato-sdk-qemux86.tar.bz2 - Clone poky - source oe-init-build-env - runqemu-extract-sdk /home/yocto/eclipse-run/yocto-M3.rc2/download/core-image-sato-sdk-qemux86.tar.bz2 /home/yocto/eclipse-run/yocto-M3.rc2/installed/qemux86 - Output: "Creating directory /home/yocto/eclipse-run/yocto-M3.rc2/installed/qemux86 Extracting rootfs tarball using pseudo... /home/yocto/eclipse-run/yocto-M3.rc2/download/poky/build/tmp/sysroots/x86_64-linux/usr/bin/pseudo -P /home/yocto/eclipse-run/yocto-M3.rc2/download/poky/build/tmp/sysroots/x86_64-linux/usr tar -C "/home/yocto/eclipse-run/yocto-M3.rc2/installed/qemux86" --numeric-owner -xjf "/home/yocto/eclipse-run/yocto-M3.rc2/download/core-image-sato-sdk-qemux86.tar.bz2" SDK image successfully extracted to /home/yocto/eclipse-run/yocto-M3.rc2/installed/qemux86 " 3. Download bzImage-qemux86.bin for QEMU Kernel (http://autobuilder.yoctoproject.org/pub/releases/yocto-2.1_M3.rc2/machines/qemu/qemux86/bzImage-qemux86.bin) 4.Configure in Eclipse a Yocto Project ADT profile with: - Cross Compiler Options: Standalone pre-built - Toolchain Root Location: /home/yocto/eclipse-run/yocto-M3.rc2/installed/toolchain (target directory for toolchain) - Sysroot Location: /home/yocto/eclipse-run/yocto-M3.rc2/installed/qemux86 (pointing where i extract sysroot from archive) - Target Options: QEMU - Kernel: /home/yocto/eclipse-run/yocto-M3.rc2/download/bzImage-qemux86.bin 6. Apply settings for Standard Profile 7. Create a Hello Word C Project New-->Project-->C Project-->Yocto Project ADT Autotools Project-->Hello Word ANSI C Autotools Project 8. Reconfigure Project 9. Build Project 10. Run Project: - Run as --> Run Configuration - select project - Configure C/C++ Application" field input Remote Absolute File path for C/C++ Application with "home/root/myApplication" - create a ssh connection to qemu - press Run button Expected Results: Console Output Eclipse Last login: Thu Mar 31 12:29:23 2016 from 192.168.7.1 echo $PWD'>' /home/root/myApplication;exit root@qemux86:~# echo $PWD'>' /home/root> root@qemux86:~# /home/root/myApplication;exit Hello World logout Output on qemux86 if you run ./myApplication Hello World Actual Results: Console Output Eclipse Last login: Thu Mar 31 12:22:45 2016 from 192.168.7.1 echo $PWD'>' /home/root/myApplication;exit root@qemux86:~# Output on qemux86 if you run ./myApplication sh: ./myApplication: Permision denied 11. Debug Project - Debug as --> Debug Configuration - select project - Configure C/C++ Application" field input Remote Absolute File path for C/C++ Application with "home/root/myApplication" - create a ssh connection to qemu - Use GDB(DSF) Automatic Remote Debugging Launcher - press Debug button Expected Results: - Confirm Perspective Switch to open Debug perspective - Debug Perspective is open. Actual Results - Launching myProject is blocked at 57% and after 5 minutes appears Problem Occured window with message: "Could not start gdbserver on the remote host. See console output for more details." but in console we don't have any change.
Created attachment 3082 [details] run-project-results
Created attachment 3083 [details] debug-project-results
To be clear, the screenshot shows there are no execute permissions on the transferred binary. Given the others errors reported, there may be other issues too.
Created attachment 3123 [details] PowerTop On 2.1: 296dfbc9b3a3c0ed64b8e748c2868928b9c2aa8b I was unable to start PowerTOP. Due RP last comment I think this bug is related. Steps to reproduce: 1. Launch a qemu of target enviroment 2. Expose YoctoTools -> PowerTop to connect the target 3. Create ssh connection. 4. Run PowerTop When you try to run PowerTop the process get stuck at "Generating powertop data file remotely" In the attachment you can see the warnings from terminal.
Have a similar problem, not sure if my input helps here. I'm working with 1.8.2 and get the exact same gdbserver error window when I try to debug with GTK C Autotools project. Console shows binding problem: Last login: Thu Jun 2 20:06:52 2016 from 192.168.7.1 echo $PWD'>' export DISPLAY=:0.0;gdbserver :2345 /home/root/myapp45;exit root@qemux86:~# echo $PWD'>' /home/root> root@qemux86:~# export DISPLAY=:0.0;gdbserver :2345 /home/root/myapp45;exit Can't bind address: Address already in use. Exiting logout ANSI C Autotools and ANSI C++ Autotools do not throw these errors for me, only GTK. Also, this is only a debug problem since the run works fine.
Forgot to point out that binary is successfully created. It works from target, but eclipse is just unable to debug it.
Still happening on 2.2 M1
fixed and merged into master. Still needs to be backported to krogoth.
For a workaround in case you are on a version without the fix is to change: /etc/profile in the image or meta/recipes-core/base-files/base-files/profile if you are building an image from: if [ -x /usr/bin/resize ];then resize >/dev/null fi to if [ -x /usr/bin/resize ];then # Make sure we are on a serial console (i.e. the device used starts with /dev/tty), # otherwise we confuse e.g. the eclipse launcher which tries do use ssh test `tty | cut -c1-8` = "/dev/tty" && resize >/dev/null fi
fixed in master: commit 5aca5bc9a13d9d4a477cfd2d04edbcc8a8a0e412 will close when fix goes into krogoth.
master fixed in: 5aca5bc9a13d9d4a477cfd2d04edbcc8a8a0e412 krogoth fixed in: eef3fb99d0e3f52ffb5d8676f9ac11e546aad511
I think this causes /etc/profile: line 34: test: too many arguments Starting Xserver /etc/profile: line 34: test: too many arguments on every boot now...
reopened due to Ernst's issue.
Ernst: which image and version and machine are you using? This line is testing to make sure we don't run busybox's resize if we are not logging in over serial: test "`tty | cut -c1-8`" = "/dev/tty" My guess is on your image tty | cut -c1-8 is returning more than one thing. could you run the above and let me know what it returns on the image? on the image you can also try replacing test "`tty | cut -c1-8`" = "/dev/tty" with test "`tty | cut -c1-8| grep tty | head -1`" = "/dev/tty" ---- Temp workaround: Just remove if [ -x /usr/bin/resize ];then # Make sure we are on a serial console (i.e. the device used starts with /dev/tty), # otherwise we confuse e.g. the eclipse launcher which tries do use ssh test "`tty | cut -c1-8`" = "/dev/tty" && resize >/dev/null fi from /etc/profile.
I'm running Krogoth 2.1.1. A fix for this could be nice to have in Krogoth 2.1.2... I'm running on a custom machine based on Boundary devices Sabrelite/Nitrogen 6x. Kernel commandline has console=ttymxc1,115200 . Now if I run test `tty | cut -c1-8` = "/dev/tty" in a shell I don't get any error, so I'm guessing that the bootup environment is slightly different. Let me see if I can grab that...
Ok what happens is that I get test not a tt = /dev/tty /etc/profile: line 35: test: too many arguments so some extra quotes should fix that. Like: test "`tty | cut -c1-8`" = "/dev/tty" && resize >/dev/null I also found the underlying issue, I'm missing CONFIG_LEGACY_PTYS in my defconfig.
The "test: too many arguments" issue in qemu should be fixed in master with following comment unless I misunderstood the issue. commit 1100af93cb07caf24d568c039d52fb0c80714c30 Author: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Tue Aug 30 11:32:07 2016 +0300 base-files: Add shell test quoting tty can return "not a tt" which results in warnings when /etc/profile is executed. (From OE-Core rev: eed586dd238efe859442b21b425f04e262bcdb2b)
fixed in f7e1cd9f85f8bd5f6ea92e747a80786a73b2aa0e krogoth 2.1.2