How to run a new usdpaa application?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to run a new usdpaa application?

2,676 次查看
priyaagarwal
Contributor III

I have written a new application. But I am not able to figure out how do I compile and run it. As in in which folder should I store what. Not able to find link to appropriate documentation in info-center.

Thanks.

标记 (4)
10 回复数

2,196 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,


Please check whether the following procedure would help you.

1. In Yocto environment, run "bitbake usdpaa -c patch -f" to get usdpaa source.


2. In usdpaa source folder, you could follow "reflector" to create your application folder under apps.

Create Makefile.am in apps/<your_app>, define bin_PROGRAMS as your program name, define reflector_SOURCES as your source file, in apps/Makefile.am add your application name.


3. Rebuild usdpaa

bitbake usdpaa -c compile -f

bitbake usdpaa


4. Add "usdpaa" in variable "IMAGE_INSTALL" of meta-fsl-networking/images/fsl-image-core.bb(in the recent SDK it has been added by default), then rebuild rootfs with "bitbake fsl-image-core".


5. Boot up the system with usdpaa dtb, and after enter into Linux system, you could use your app command.


Regarding how to run your application, please refer to sections "Running reflector" and "PPAC (and reflector) CLI commands" in http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2989554.html.



Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,196 次查看
priyaagarwal
Contributor III

I got an error while compiling usdpaa. I put the app in this path:

/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/git/apps

I ran the patch command in /media/NewVolume/yocto/build_t4240qds_release/ folder.

Are these two correct.

Error was:

ERROR: Function failed: do_compile (see /media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/temp/log.do_compile.3438 for further information)

ERROR: Logfile of failure stored in: /media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/temp/log.do_compile.3438

Log data follows:

| DEBUG: Executing shell function do_compile

| NOTE: make CC=powerpc-fsl_networking-linux-gcc  -m32 -mhard-float   -mcpu=e6500 --sysroot=/media/NewVolume/yocto/build_t4240qds_release/tmp/sysroots/t4240qds LD=powerpc-fsl_networking-linux-ld --sysroot=/media/NewVolume/yocto/build_t4240qds_release/tmp/sysroots/t4240qds  AR=powerpc-fsl_networking-linux-ar

| apps/squid/squid-3.4.10/Makefile.am:7: *** missing separator.  Stop.

| ERROR: oe_runmake failed

| ERROR: Function failed: do_compile (see /media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/temp/log.do_compile.3438 for further information)

ERROR: Task 4 (/media/NewVolume/yocto/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb, do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 430 tasks of which 429 didn't need to be rerun and 1 failed.

Summary: 1 task failed:

  /media/NewVolume/yocto/meta-fsl-ppc/recipes-tools/usdpaa/usdpaa_git.bb, do_compile

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Is something wrong with my code or I have done things in the wrong folders?

Thanks.

0 项奖励
回复

2,196 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,


Please pay attention to the following error in your building log, there is problem in your Makefile.


apps/squid/squid-3.4.10/Makefile.am:7: *** missing separator.   Stop.


Thanks,

Yiping

0 项奖励
回复

2,196 次查看
priyaagarwal
Contributor III

The Makefile being referred to is not at all edited by me.

According to this:

Create Makefile.am in apps/<your_app>, define bin_PROGRAMS as your program name, define reflector_SOURCES as your source file, in apps/Makefile.am add your application name.

1. I have two directories in /apps/<my_app>/ which are :  apps/squid/app and apps/squid/squid-3.4.10

I tried to follow ipfwd as well as reflector's files/folders.

In squid-3.4.10 folder , there is the original source-code and Makefile.am. I haven't edited them. So I dont know how it can be wrong.

The makefile i wrote myself is in apps/squid/app/ folder. I have attached it (first one). And also the one which error is referring to.

Is the error due to the fact that I am also trying to compile c++ code, as the original app is written in that.

0 项奖励
回复

2,196 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,

At line 7 of apps/squid/squid-3.4.10/Makefile.am, please try to use "ifdef" instead, it seems that the compiler treat it as a command line beginning with Tab.


if USE_LOADABLE_MODULES

SUBDIRS += libltdl

endif

SUBDIRS += scripts icons errors doc helpers src tools test-suite

Thanks,

Yiping

2,196 次查看
priyaagarwal
Contributor III

Thanks. That solved the problem. But I have got more errors now. They are of two types.

apps/squid/squid-3.4.10/compat/Makefile.am:5: /src/Common.am: No such file or directory

| apps/squid/squid-3.4.10/lib/Makefile.am:1: /src/Common.am: No such file or directory

| apps/squid/squid-3.4.10/lib/Makefile.am:99: warning: overriding commands for target `testHeaders'

| apps/squid/squid-3.4.10/compat/Makefile.am:96: warning: ignoring old commands for target `testHeaders'

| apps/squid/squid-3.4.10/lib/rfcnb/Makefile.am:1: /src/Common.am: No such file or directory

| apps/squid/squid-3.4.10/lib/smblib/Makefile.am:1: /src/Common.am: No such file or directory

| apps/squid/squid-3.4.10/icons/Makefile.am:1: /icons/list: No such file or directory

| apps/squid/squid-3.4.10/errors/Makefile.am:11: /template.list: No such file or directory

| apps/squid/squid-3.4.10/errors/Makefile.am:12: /language.list: No such file or directory

| apps/squid/squid-3.4.10/errors/Makefile.am:65: warning: overriding commands for target `install-data-local'

| apps/squid/squid-3.4.10/icons/Makefile.am:9: warning: ignoring old commands for target `install-data-local'

| apps/squid/squid-3.4.10/errors/Makefile.am:89: warning: overriding commands for target `uninstall-local'

| apps/squid/squid-3.4.10/icons/Makefile.am:12: warning: ignoring old commands for target `uninstall-local'

| apps/squid/squid-3.4.10/errors/Makefile.am:117: warning: overriding commands for target `dist-hook'

| apps/squid/squid-3.4.10/Makefile.am:16: warning: ignoring old commands for target `dist-hook'

| apps/squid/squid-3.4.10/doc/manuals/Makefile.am:5: /language.list: No such file or directory

| apps/squid/squid-3.4.10/helpers/Makefile.am:23: *** missing separator.  Stop.

For apps/squid/squid-3.4.10/compat/Makefile.am:5: /src/Common.am: No such file or directory, THE 5TH LINE IS:-

include $(top_srcdir)/src/Common.am

top_srcdir is not being set. I had run ./configure in squid-3.4.10 directory before compiling. Error still persists.

Two Makefiles attached:-

1. apps/squid/squid-3.4.10/compat/Makefile.am

2. apps/squid/squid-3.4.10/lib/Makefile.am

0 项奖励
回复

2,196 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,


There is problem caused by top_srcdir including in you Makefile, please use "TOP_LEVEL" instead, please refer to apps/ipfwd, TOP_LEVEL is defined as $(shell pwd) in Makefile of usdpaa source.

Thanks,

Yiping

0 项奖励
回复

2,196 次查看
jaymind
Contributor IV

hello,

I think missing some parameter in Makefile.am and form ur logs its shows

ERROR: oe_runmake failed

it mean the issue seems to be with kernel compilation rather than with yocto.

oe_runmake only calls make on the kernel tree. So, can you see if building the kernel (in the build/tmp folder) manually works?

Also check the defconfig file that is used manually.

And also same time please check and verify that have you all the host environment set-up as per documentation?

Request to please refer this link once (http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html)

From above link

(

Ubuntu and Debian

The essential and graphical support packages you need for a supported Ubuntu or Debian distribution are shown in the following command:

     $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev xterm 

)

$ sudo dpkg-reconfigure --terse -f readline dash

$ sudo apt-get install sed wget subversion git-core coreutils unzip

texi2html texinfo libsdl1.2-dev docbook-utils fop gawk python-pysqlite2

diffstat make gcc build-essential xsltproc g++ desktop-file-utils

chrpath libgl1-mesa-dev libglu1-mesa-dev autoconf automake groff libtool

xterm libxml-parser-perl vim-common xz-utils cvs tofrodos

libstring-crc32-perl ubuntu-minimal ubuntu-standard patch

libbonobo2-common libncurses5-dev

Extra packages are needed for Ubuntu-64b

$ sudo apt-get install ia32-libs lib32ncurses5-dev

and if not then please install all build dependencies for your host system (Ubuntu or whatever...)

may this will help you, Smiley Happy

Revert back with result and query if any,

Thanks and regards

Jaymin Dabhi

0 项奖励
回复

2,196 次查看
priyaagarwal
Contributor III

Thanks.

But I am not able to understand the first step. In yocto environment means, in the yocto folder?

0 项奖励
回复

2,196 次查看
jaymind
Contributor IV

Hello,

In Yocto env. mean in build directory of YOCTO source.

For example its name like fsl-community-....... and and into its build directory.

As you knowing about procedure.

1.

. ./setup-environment build in yocto source directory.

2. then it will automatically go into build directory after some terms and conditions accept, then after you apply command as yipingwang replied you.


e.g.

bitbake usdpaa -c patch -f

and all other.

May this will help you.

Thanks and Regards

JAYMIN DABHI