[imx-tests] Compile mxc_vpu_test

cancel
Showing results for 
Search instead for 
Did you mean: 

[imx-tests] Compile mxc_vpu_test

5,430 Views
a_alquézar
Contributor I

Hi everybody,

I downloaded the imx-test-3.10.17-1.0.0 and I would like to compile the mxc_vpu_test, but I can't.

output:

cc  -Wall -O2 -c main.c -o main.o

In file included from vpu_test.h:24:0,

                 from main.c:26:

mxc_ipu_hl_lib.h:96:23: fatal error: linux/ipu.h: No such file or directory

compilation terminated.

make: *** [main.o] Error 1

And If I try to tell the compiler -I<path-of-kernel-source-with-drivers-installed>, always I have problems with a lot of libraries...

I wouldn't use the ltib tool or similars... I only want compile mxc_vpu_test using its Makefile.

And I try to do the things of the readme.txt file... but nothing :smileysad:

readme.txt:

"

2. Build Steps

==============

To build all the tests and bootloaders, run make as shown:

make PLATFORM=MXC27530EVB LINUXPATH=/home/marsha/LINUX2.6/linux \

KBUILD_OUTPUT=/home/marsha/LINUX2.6/kbuild/mxc27530evb \

CROSS_COMPILE=/opt/montavista/mobilinux/devkit/arm/v6_vfp_le/bin/arm_v6_vfp_le-

Note that you have to specify 4 things: PLATFORM, LINUXPATH, KBUILD_OUTPUT, and CROSS_COMPILE.

The build results will end up in the platform directory.

To build a single test add the test dir name to the above like:

make PLATFORM=MXC27530EVB LINUXPATH=/home/marsha/LINUX2.6/linux \

KBUILD_OUTPUT=/home/marsha/LINUX2.6/kbuild/mxc27530evb \

CROSS_COMPILE=/opt/montavista/mobilinux/devkit/arm/v6_vfp_le/bin/arm_v6_vfp_le- \

mxc_mu_test

"

How can I install -lpu and -lvpu in my compiler poky 1.7.1, and all the necessary libraries? Any idea?

Thank you so much,

Best rgrds,

Boadrius

Labels (2)
Tags (1)
0 Kudos
19 Replies

787 Views
a_alquézar
Contributor I

Hi everybody,

Thanks a lot for all the replies Smiley Happy

Finally I used bitbake to compile the mxc_vpu_test and the compilation works successfully, although it takes some time Smiley Sad

$ time bitbake -c compile -f imx-test

real 4m36.702s

user 1m45.368s

sys 2m31.600s

$ time bitbake imx-test

real 0m36.152s

user 0m8.360s

sys 0m19.020s

I edit the main file under the PATH:

'fsl-release-bsp/build/tmp/work/wandboard_solo-poky-linux-gnueabi/imx-test/1_3.14.28-1.0.0-r0/imx-test-3.14.28-1.0.0/test/mxc_vpu_test/'

And I found the bin 'mxc_vpu_test.out 'under the directory:

'fsl-release-bsp/build/tmp/work/wandboard_solo-poky-linux-gnueabi/imx-test/1_3.14.28-1.0.0-r0/image/unit_tests'

After this two commands, I used

$ bitbake core-image-base

to generate the image with the new binari for my wandboard-solo.

Before running 'bitbake core-image-base' I edited the file 'fsl-release-bsp/build/conf/local.conf' to add the following packages in the image:

CORE_IMAGE_EXTRA_INSTALL_append = " \

  gstreamer \

  gst-meta-video \

  gst-plugins-good-udp \

  gst-plugins-good-rtp \

  gst-plugins-good-rtpmanager \

  gst-plugins-good-video4linux2 \

  gst-fsl-plugin \

  glib-2.0 \

  nano \

  openssh \

  ethtool \

  libstdc++ \

  imx-test \

imx-lib"

Well... up to this point seems all right... but I have one problem that I can't understand...

When I execute the test 'mxc_vpu_test.out' in my wandboard-solo I found this error in the output:

[INFO] VPU test program built on Aug 26 2015 08:46:56

[ERR] Error in opening firmware binary file

[ERR] Please put bin file to /lib/firmware/vpu folder or export VPU_FW_PATH env

[ERR] VPU Init Failure.

So I export the environment variable but doesn't work... and the folder /lib/firmware/vpu doesn't

exist... it seems like the imx-lib described in the local.conf not exists in the image (I think so, but I don't know...)

So I executed the command:

$ bitbake -s > PACKAGES-BITBAKE

to try to find if imx-test is installed in my image:

$ cat PACKAGES-BITBAKE

...

imx-lib                                    1:3.10.53-1.1.0-r0                        

imx-test                                   1:3.14.28-1.0.0-r0                        

imx-uuc                                               :0.5-r0                        

imx-vpu                                           1:5.4.28-r0                        

...

and yes it's installed.

The source code where fails is in the main.c

err = vpu_Init(NULL);

if (err) {

     err_msg("VPU Init Failure.\n");

     return -1;

}

And I don't find the source code of the function vpu_Init. I guess this function is included in some compiled library.

Anybody knows what is happening? What's the matter?

Why does it appear this error message?

[INFO] VPU test program built on Aug 26 2015 08:46:56

[ERR] Error in opening firmware binary file

[ERR] Please put bin file to /lib/firmware/vpu folder or export VPU_FW_PATH env

[ERR] VPU Init Failure.

I'm going crazy trying to solve this problem... Smiley Sad Any idea?

Thank you so much!

Best rgrds,

Boadrius

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee
  • [ERR] Error in opening firmware binary file 
  • [ERR] Please put bin file to /lib/firmware/vpu folder or export VPU_FW_PATH env 
0 Kudos

787 Views
a_alquézar
Contributor I

Hi everybody,

Thank you very much for all the answers but this isn't what I'm looking for.

All that I want is edit the source of this test, mxc_vpu_test, and compile it using the Makefile, without use Bitbake... only using my arm compiler (poky 1.7.1).

Any idea?

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi Boadrius,

Are you able to build mxc_vpu_test without using bitbake i.e. using Makefile?

I want to build mxc_v4l2_test sameway. Can you please help me ?

@Biyong,

I have tried to follow the steps you have mentioned to build. But getting errors.

Appreciate your quick reply.

Thanks,

Dhaval

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee

The compile error issue is a case by case issue to resolve.

If you don't have cross compile skill, please use the cross compile system yocto.

0 Kudos

787 Views
Yuri
NXP TechSupport
NXP TechSupport

  Your idea to "edit the source of this test, mxc_vpu_test, and compile it using the Makefile,
without use Bitbake
" is clear, but it is not so easy because of dependensies.

Regards,

Yuri.

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

cd memtool

OBJDIR=./  make

odules.c

arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -o .//memtool memtool.o mx6dl_modules.o mx6q_modules.o mx6sl_modules.o mx6sx_modules.o -Os

arm-poky-linux-gnueabi-strip .//memtool

for hello world.

create helloworld.c

then

$CC -o helloworld helloworld.c

I use the sdk, which has no imx_lib for vpu in the SDK. can not prove to you the build of mxc_vpu_test.

please make sure. you have create a correct SDK, which contains the imx_lib.

This is a basic concept of yocto development with SDK. you can refer to yocto document and submit you question to yocto, too.

0 Kudos

787 Views
Yuri
NXP TechSupport
NXP TechSupport

Boadrius, hello !

Under Yocto there is imx-test recipe. Please use it to build the tests.

  $ bitbake imx-test


Have a great day,
Yuri

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

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi Yuri,

Where the compiled binaries will be available after running the 'bitbake imx-test' command?

Does it include directly to the rootfs?

Thanks,

Dhaval

0 Kudos

787 Views
Yuri
NXP TechSupport
NXP TechSupport

The build result files may be found in

<build_dir>/tmp/imx6qsabresd-poky-linux-gnueabi/imx-test/<release>/image/unit_tests

Regards,

Yuri.

0 Kudos

787 Views
Yuri
NXP TechSupport
NXP TechSupport

Dhaval,

yes, finally, the binaries are deployed to rootfs : /unit_tests

Also

source code for LTIB unit tests

Regards,

Yuri.

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi Yuri,

So do I need to run the command 'bitbake core-image-minimal' after running 'bitbake imx-test', to add these binaries in the rootfs? Because I checked after building the imx-test, the timestamp of rootfs wasn't changed. So those binaries weren't included into the rootfs.

I also ran 'bitbake -c deploy imx-test', but got following error:

*****************************************************************************************************

NOTE: Preparing runqueue

ERROR: Task do_deploy does not exist for target imx-test

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

*****************************************************************************************************

Thanks,

Dhaval

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee

"also ran 'bitbake -c deploy imx-test', but got following error:"

bitbake imx-test-c deploy

please read the yocto document carefully then launch the command.

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi Biyong,

Thanks for your quick reply!

I have tried 'bitbake imx-test -c deploy', but getting following error:

**************************************************************************************************************

NOTE: Preparing runqueue

ERROR: Task do_deploy does not exist for target imx-test

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

**************************************************************************************************************

Also, can you please let me know how to build imx-test without using 'bitbake' i.e. using toolchain?

Thanks,

Dhaval

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee

imx-test has no deploy task.

bitbake imx-test -c cleanall

bitbake imx-test -c install

done on my machine

meta-ruby
meta-filesystems  = "(nobranch):7bbacd0023fa1111da94ba0b2aafd7d872301ffe"
meta-qt5          = "(nobranch):41c5daa84af4466bfc9aa61f6f772c68470a628b"
meta-fsl-qt5
meta-fsl-bluez    = "(nobranch):14755740aa0eae2d800e608b34e256665f8012e0"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi Biyong,

Thanks for your reply!

I tried with that command and it build the imx-test successfully. But the compiled binaries weren't added in the final image.

Also, it would be great if you can help me to build these test apps without using bitbake.

Thanks,

Dhaval

0 Kudos

787 Views
BiyongSUN
NXP Employee
NXP Employee

I have replied before.  You can use this way to compile one by one. By you need to resolve the cross compile by yourself.

----------------------------

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

cd memtool

OBJDIR=./  make

odules.c

arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -o .//memtool memtool.o mx6dl_modules.o mx6q_modules.o mx6sl_modules.o mx6sx_modules.o -Os

arm-poky-linux-gnueabi-strip .//memtool

for hello world.

create helloworld.c

then

$CC -o helloworld helloworld.c

I use the sdk, which has no imx_lib for vpu in the SDK. can not prove to you the build of mxc_vpu_test.

please make sure. you have create a correct SDK, which contains the imx_lib.

This is a basic concept of yocto development with SDK. you can refer to yocto document and submit you question to yocto, too.

0 Kudos

787 Views
dhavalvadhar
Contributor IV

Hi,

Can someone please help me on this? How to deploy the binaries of imx-test onto final image?

Thanks,

Dhaval

0 Kudos

787 Views
saurabh206
Senior Contributor III

Hi Boadius

You can build mxc_vpu_test using yocto "bitbake imx-test".

It will build your test successfully.

0 Kudos