Intel® System Studio
Share information with other developers using Intel® System Studio.

yocto project tachyon_inspxe example

eric_s_3
Beginner
1,369 Views

1)  Following the instructions in the document "How to use Intel Inspector 2013 for Systems", to set up and run the tachyon thread analysis example. In the Cross compiling section, it states to modify the make files. For the top-level Makefile, states to remove the line containing CXX. This appears to leave the Makefile with no spec of compiler (CXX = gcc originally). This doesn't seem correct, or is it???

2) Also states to add several lines of new commands to the lower level make file, Makefile.gmake, but doesn't state where in the file. I assume basically in place of the all the ifeq-else-endif groups, i.e., at the end of the current file??? Does this even apply (see next question).

3) Meanwhile, also looking at the turtorial for same demo from the install directory (launches an html doc). In the section Analyzing Threading Errors - Standalone GUI:Build Application and Create New Project, it doesn't mention these edits to the make files. However, there is a table showing what compile options are to be used. Currently, the make files provided in the example project do not have these settings.

Does this html doc superced the doc referrenced above in 1) and 2) above (which is correct)?

Thank you for your time and attention.

0 Kudos
19 Replies
Yang_W_Intel
Employee
1,369 Views

Hi Eric,
    What is your Yocto Project version you are using? I will check the Makefile and let you know how to update it for Yocto target.
Thanks.
-Yang

0 Kudos
Yang_W_Intel
Employee
1,369 Views

Hi Eric,
    You can use the attached Makefile and Makefile.gmake. Makefile.gmake should be copied to tachyon_insp_xe/common/gui/ folder to overwrite the original one.  Makefile should be copied to tachyon_insp_xe/ to overwrite the existing one. We disable the CXX in the Makefile so to use the $CXX in the environment variable which will be set by yocto script when you do "source /opt/poky/1.2/environment-setup-i586-poky-linux".
     Then you can simply build with the following command line:
     $ source /opt/poky/1.2/environment-setup-i586-poky-linux 
     $ make
     You can check the output from build, it is using yocto cross compiler: i586-poky-linux-g++ build the target application. This application is for Yocto target Linux, not for the HOST linux. You can now upload the application to target OS and run the analysis. This is the general step for a cross-build for embedded target. Yocto is our target. We are building the appication using the cross-platform build.

    As for the html tutorial in the file:///opt/intel/system_studio_2014.0.010/inspector_2014_for_systems/documentation/en/tutorials/dynamic_memory/C++/index.htm, it is for the HOST build and analysis. If you are working on the Linux host system, you can just follow the tutorial to build the application with the HOST gcc tool chain. The application built here is supposed to run on the host machine.
Thanks.

-Yang

0 Kudos
Yang_W_Intel
Employee
1,369 Views

The Makefile is attached here.

0 Kudos
eric_s_3
Beginner
1,369 Views

Hi Yang,

Thank you again for the helpful response. I using Yocto 1.2 for this first try.

I incorporated your make files as directed and ran build. Appears to have completed. There are now the following 3 binaries in the /home/eric/yocto/tachyon_insp_xe folder:

tachyon.find_and_fix_threading_errors, tachyon.find_and_fix_memory_errors,
tachyon.create_and_use_suppressions

I don't see the file libtbb.so called out in the How To Use... document ref. earlier. I did a search and found a copy in a different directory. Should I copy that over to the ~/yocto/file_system/home/yocto/test folder (which I had to create), along with the above binaries?  Will give this a shot in the morning - just posing the question now in case what I have here is still not correct.

Thank you again.

ES.

0 Kudos
eric_s_3
Beginner
1,369 Views

After copying the binaries and the libtbb.so (found this in folder tachyon_insp_xe/tbbforexamples/lib/ia32/) over to /home/eric/yocto/file_system/home/yocto/test (per the "How to Use Intel Inspector 2013 for Systems" document), and then running,

source /opt/poky/1.2/environment-setup-i586-poky-linux

from folder /home/eric/yocto/file_system/home/yocto/test, executed the following command:

runqemu /home/eric/yocto/bzImage-quemux86.bin ~/yocto/file_system

This resulted in the following error:

Error: unable to classify arg [/home/eric/yocto/bzImage-quemux86.bin]

Usage: you can run this script with any valid combination
of the following options (in any order):
  QEMUARCH - the qemu machine architecture to use
  KERNEL - the kernel image file to use
  ROOTFS - the rootfs image file or nfsroot directory to use
  MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)
  Simplified QEMU command-line options can be passed with:
    nographic - disables video console
    serial - enables a serial console on /dev/ttyS0
    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)
  qemuparams="xyz" - specify custom parameters to QEMU
  bootparams="xyz" - specify custom kernel parameters during boot

Examples:
  runqemu qemuarm
  runqemu qemux86-64 core-image-sato ext3
  runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
  runqemu qemux86 qemuparams="-m 256"
  runqemu qemux86 bootparams="psplash=false"

Any idea what I've done incorrectly? Again, I followed the instructions in the above document.


Thanks again for your help.

ES.

0 Kudos
eric_s_3
Beginner
1,369 Views

Also, per the html Analyzing Threading Error tutorial, I tried to run the ./tachyon.find_and_fix_threading_errors bin, but got errors:

[eric@localhost test]$ ./tachyon.find_and_fix_threading_errors ~/yocto/file_system/home/yocto/test
./tachyon.find_and_fix_threading_errors: error while loading shared libraries: libtbb_debug.so.2: cannot open shared object file: No such file or directory

Verified llibtbb_debut.so.2 is in the folder with the above .bin files.

What is wrong???

0 Kudos
Kevin_O_Intel1
Employee
1,369 Views

 

Hi Eric,

Did you set

export LD_LIBRARY_PATH=.

That should allow the program to run.

Let me know if you have any additional questions.

Kevin

0 Kudos
Sukruth_H_Intel
Employee
1,369 Views

Hi Eric,

             I think the 1st issue that you are facing has a very minimal glitch whcih is quite difficult to observe, But can be found easily through the error message :- "Error: unable to classify arg [/home/eric/yocto/bzImage-quemux86.bin]". The package name is "bzImage-qemux86.bin" and not the "bzImage-quemux86.bin", I guess you have manually entered the kernel image name.

To be precise its "qemu" and not "quemu". Please do let me know if this is the issue. Because i have tried the same today and was able to successfully launch the emulator.

Regarding the second issue, As Kevin mentioned you need to set the "LD_LIBRARY_PATH" to "<file_system>/home/yocto/test/tachyon_insp_xe/tbbforexamples/lib/ia32" in your HOST. I have provided the path according to the document that you are referring.

Please feel free to let us know if you have any further queries.

Regards,

Sukruth H V

0 Kudos
eric_s_3
Beginner
1,369 Views

HI,

Thank you for the response.

I had tried several iterations of "runqemu bzImage-qemux86.bin ~yocto/file_system". The example I copied into my previous post is not representative of all of them (without being defensive; just matter of fact :).

I added the path to the existing LD_LIBRARY_PATH as suggested above:

export LD_LIBRARY_PATH=/home/eric/yocto/tachyon_insp_xe/tbbforexamples/lib/ia32/:/opt/intel/system_studio_2013.1.024/compiler/lib/ia32:/opt/intel/system_studio_2013.1.024/compiler/lib/ia32

Ran runqemu bzImage-qemux86.bin ~/yocto/file_system/

with the following result:

Error: unable to classify arg [~yocto/file_system]

Usage: you can run this script with any valid combination
of the following options (in any order):
  QEMUARCH - the qemu machine architecture to use
  KERNEL - the kernel image file to use
  ROOTFS - the rootfs image file or nfsroot directory to use
  MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)
  Simplified QEMU command-line options can be passed with:
    nographic - disables video console
    serial - enables a serial console on /dev/ttyS0
    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)
  qemuparams="xyz" - specify custom parameters to QEMU
  bootparams="xyz" - specify custom kernel parameters during boot

Examples:
  runqemu qemuarm
  runqemu qemux86-64 core-image-sato ext3
  runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
  runqemu qemux86 qemuparams="-m 256"
  runqemu qemux86 bootparams="psplash=false"

I will take another look after some sleep but if you see anything incorrect in the above path would appreciate the feedback. At this hour, I believe I copied over correctly from your posting above.

Thanks again.

0 Kudos
Yang_W_Intel
Employee
1,369 Views

Hi Eric,
      According to the error message from runqemu: "Error: unable to classify arg [~yocto/file_system]", it looks like you missed a "/" after "~". Could you check your command to run qemu? runqemu bzImage-qemux86.bin ~/yocto/file_system/
     Please note that there should have a "/" after "~". "~" stands for your home folder /home/eric. You can also run the qemu in the folder "/home/eric/yocto" directly as following: "runqemu ./bzImage-qemux86.bin ./file_system". The first arg is the path to the bzImage-qemux86.bin, the second arg is the path to the qemu file system. Both relative path or absolute path are find but they should exist and input to runqemu correctly.

thanks.

-Yang

0 Kudos
Madhumitha_P_
Beginner
1,369 Views

Hello sir,

I was trying to learn about yocto project dora-10.0.0, when I came across similar problem

On executing runqemu /tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin /tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3
Error: unable to classify arg [/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin]

Usage: you can run this script with any valid combination
of the following options (in any order):
  QEMUARCH - the qemu machine architecture to use
  KERNEL - the kernel image file to use
  ROOTFS - the rootfs image file or nfsroot directory to use
  MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
  RAMFS - boot a ramfs-based image
  ISO - boot an ISO image
  VM - boot a vmdk image
  Simplified QEMU command-line options can be passed with:
    nographic - disables video console
    serial - enables a serial console on /dev/ttyS0
    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)
    publicvnc - enable a VNC server open to all hosts
  qemuparams="xyz" - specify custom parameters to QEMU
  bootparams="xyz" - specify custom kernel parameters during boot

Examples:
  runqemu qemuarm
  runqemu qemux86-64 core-image-sato ext3
  runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial

  runqemu qemux86 ramfs

  runqemu qemux86 iso
  runqemu qemux86 qemuparams="-m 256"
  runqemu qemux86 bootparams="psplash=false"
  runqemu path/to/<image>-<machine>.vmdk

Any help may be thankful.

0 Kudos
Madhumitha_P_
Beginner
1,369 Views

Hello sir,

I was trying to learn about yocto project dora-10.0.0, when I came across similar problem

On executing runqemu /tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin /tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3
Error: unable to classify arg [/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin]

Usage: you can run this script with any valid combination
of the following options (in any order):
  QEMUARCH - the qemu machine architecture to use
  KERNEL - the kernel image file to use
  ROOTFS - the rootfs image file or nfsroot directory to use
  MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
  RAMFS - boot a ramfs-based image
  ISO - boot an ISO image
  VM - boot a vmdk image
  Simplified QEMU command-line options can be passed with:
    nographic - disables video console
    serial - enables a serial console on /dev/ttyS0
    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)
    publicvnc - enable a VNC server open to all hosts
  qemuparams="xyz" - specify custom parameters to QEMU
  bootparams="xyz" - specify custom kernel parameters during boot

Examples:
  runqemu qemuarm
  runqemu qemux86-64 core-image-sato ext3
  runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial

  runqemu qemux86 ramfs

  runqemu qemux86 iso
  runqemu qemux86 qemuparams="-m 256"
  runqemu qemux86 bootparams="psplash=false"
  runqemu path/to/<image>-<machine>.vmdk

Any help may be thankful.

0 Kudos
Yang_W_Intel
Employee
1,369 Views

Hi Madhumitha,
     For your error, most likely it is because "runqemu" can't find your  "/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin" kernel file. If you are in the folder poky-dora-10.0.0/build, you can prepend "." before the file path, e.g.:
 runqemu ./tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin ./tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3
and you can also specify the full path for your bzImage-lab1-qemux86.bin file, just make sure runqemu can find that file correctly.

Thanks.

-Yang

0 Kudos
Sukruth_H_Intel
Employee
1,369 Views

Hi Madhumitha,

                        As yang rightly pointed out, The issue is with the path to the kernel bzImage that you are pointing to. Infact the "/tmp/deploy/images" folder would be created when you have successfully built the Target (Yocto) OS image.

Referring to this :- http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html

wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.5/poky-dora-10.0.0.tar.bz2
     $ tar xjf poky-dora-10.0.0.tar.bz2
     $ cd poky-dora-10.0.0
     $ source oe-init-build-env

Once you follow these commands:- Then a "build" folder will be created inside the "poky-dora-10.0.0" folder and when you issue the command "bitbake <Target_image_option>", ex:- "bitbake -k core-image-sato", and provided the build is successful, then you have the images in "build/tmp/deploy/images".

Now you should issue the runqemu command like this :-

runqemu /home/intel/poky-dora-10.0.0/build/work/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin  /home/intel/poky-dora-10.0.0/build/work/tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3

Note:- In the above command i have the folder "poky-dora-10.0.0" in my home folder "/home/intel" and that is the reason i have given the above path and it may differ in your case and please replace "/home/intel" directory with your directory accordingly..

Hope i am clear with my explanation. Please feel free to ping me or yang for any further doubts.

Regards,

Sukruth H V
 

 
0 Kudos
Sukruth_H_Intel
Employee
1,369 Views

Hi,

     Sorry there are some indentation problems in my previous post, Please follow this :-

                        As yang rightly pointed out, The issue is with the path to the kernel bzImage that you are pointing to. Infact the "/tmp/deploy/images" folder would be created when you have successfully built the Target (Yocto) OS image.

Referring to this :- http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html

$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.5/poky-dora-10.0.0.tar.bz2
$ tar xjf poky-dora-10.0.0.tar.bz2
$ cd poky-dora-10.0.0
$ source oe-init-build-env

Once you follow these commands:- Then a "build" folder will be created inside the "poky-dora-10.0.0" folder and when you issue the command "bitbake <Target_image_option>", ex:- "bitbake -k core-image-sato", and provided the build is successful, then you have the images in "build/work/tmp/deploy/images".

Now you should issue the runqemu command like this :-

runqemu /home/intel/poky-dora-10.0.0/build/work/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin  /home/intel/poky-dora-10.0.0/build/work/tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3

Note:- In the above command i have the folder "poky-dora-10.0.0" in my home folder "/home/intel" and that is the reason i have given the above path and it may differ in your case and please replace "/home/intel" directory with your directory accordingly..

Hope i am clear with my explanation. Please feel free to ping me or yang for any further doubts.

Regards,

Sukruth H V

 

 

0 Kudos
Madhumitha_P_
Beginner
1,369 Views

Hi,

Thanks for reply.

I was successful in building the environment.

The problem is booting the image with QEMU

I tried intriguing into poky-dora files, when I found I missed something in my file path. So I altered the path from my earlier post such that on executing...its still unsuccessful.

I am attaching the screenshot.

 

 

0 Kudos
Madhumitha_P_
Beginner
1,369 Views

Hi,

Thanks for reply.

I have successfully setup the environment,

The problem is in booting the image with QEMU window.

I checked out the poky-dora-10.0.0 files, and altered the file path such that 

on executing runqemu tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3, 

I'm still unsuccessful

Regards,

Madhumitha 

0 Kudos
Sukruth_H_Intel
Employee
1,369 Views

Hi Madhumitha,

                          From the screenshot i could infer that the file-system name is been taken wrongly by the qemu :- It's been taken as " tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3-qemux86.ext3" The file extension is taken twice [ i mean qemux86.ext3 ] and is unable to find the correct image name.

Could you please try these 2 options and let me know the results :-

1. Let's try with absolute path's first, Please execute the below command exactly :-

  runqemu /home/madhu/poky-dora-10.0.0/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin /home/madhu/poky-dora-10.0.0/tmp/deploy/images/core-image-minimal-lab1-qemux86.ext3

If this fails, then try the next one :-

2.  runqemu /home/madhu/poky-dora-10.0.0/tmp/deploy/images/lab1-qemux86/bzImage-lab1-qemux86.bin /home/madhu/poky-dora-10.0.0/tmp/deploy/images/

Please do let me know the results. Screenshots would be better.

Regards,

Sukruth H V

0 Kudos
ahqaf_IT
Beginner
1,369 Views

Very important info.This is really informative for me. Thanks a lot for sharing.

0 Kudos
Reply