Compile IMX6_GPU_SDK with L3.0.35_1.1.0 and L3.0.35_4.0.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compile IMX6_GPU_SDK with L3.0.35_1.1.0 and L3.0.35_4.0.0

Compile IMX6_GPU_SDK with L3.0.35_1.1.0 and L3.0.35_4.0.0

There is GPU SDK for i.MX6D/Q/DL/S: IMX_GPU_SDK.  This is to share the experience when compiling the example code from the SDK with Linux BSP release: L3.0.35_1.1.0_121218 and  L3.0.35_4.0.0_130424 .

pastedImage_0.png

Minimal profile is using and have been verified on both i.MX6Q SDP and i.MX6DL SDP.

To start:

  • Please make sure “gpu-viv-bin-mx6q” has been selected in the Package list and compiled to your rootfs.
  • After finished the compilation of the rootfs, you should find some newly added libraries for GLES1.0, GLES2.0, OpenVG and EGL in <ltib>/rootfs/usr/lib
  • However, you should find libOpenVG.so is actually copied from libOepnVG_3D.so:

vmuser@ubuntu:~/ltib_src/ltib/rootfs/usr/lib$ ls -al libOpen*

-rwxr-xr-x 1 root root 115999 2013-06-06 18:31 libOpenCL.so

-rwxr-xr-x 1 root root 515174 2013-06-06 18:31 libOpenVG_355.so

-rwxr-xr-x 1 root root 272156 2013-06-06 18:31 libOpenVG_3D.so

-rwxr-xr-x 1 root root 272156 2013-06-06 18:31 libOpenVG.so

So, in this way, i.MX6D/Q will no use libOpenVG_355.so in the build.

  • Also, if you run NFS, the libOpenVG.so will change to symbolic link:

          For example, run on i.MX6Q SDP, it will link to /usr/lib/libOpenVG_355.so

               Clipboard04.jpg

          For example, run on i.MX6DL SDP, it will link to /usr/lib/libOpenVG_3D.so

               Clipboard05.jpg

  • Then, when you compile the OpenVG example code, it is becoming very confusing.  Thus, it needs to pay attention when doing the compilation.  For example, delete the symbolic link and make copy of the corresponding library:

For i.MX6D/Q, please do this:

$ sudo /bin/rm libOpenVG.so

$ sudo cp libOpenVG_355.so libOpenVG.so

For i.MX6S/DL, please do this:

$ sudo /bin/rm libOpenVG.so

$ sudo cp libOpenVG_3D.so libOpenVG.so

  • To compile the sample code in the GPU SDK, you could refer to iMXGraphicsSDK_OpenGLES2.0.pdf or iMXGraphicsSDK_OpenGLES1.1.pdf in ~/gpu_sdk_v1.00.tar/Documentation/Tutorials to set up the cross compilation environment; which is assuming the LTIB and the rootfs is ready.

$ export ROOTFS=/home/vmuser/ltib_src/ltib/rootfs

$ export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-

For OpenVG:

$ cd ~/gpu_sdk_v1.00/Samples/OpenVG

$ make -f Makefile.fbdev clean

$ make -f Makefile.fbdev

$ make -f Makefile.fbdev install

The executable will then be copied to this directory: ~/gpu_sdk_v1.00/Samples/OpenVG/bin/OpenVG_fbdev

For GLES2.0

$ cd ~/gpu_sdk_v1.00/Samples/ GLES2.0

$ make -f Makefile.fbdev clean

$ make -f Makefile.fbdev

$ make -f Makefile.fbdev install

The executable will then be copied to this directory: ~/gpu_sdk_v1.00/Samples/ GLES2.0/bin/GLES20_fbdev

For GLES1.1, please modify the Makefile.fbdev to remove the compilation of example codes "18_VertexBufferObjects" and "19_Beizer" that are not exist. Then,

$ cd ~/gpu_sdk_v1.00/Samples/ GLES1.1

$ make -f Makefile.fbdev clean

$ make -f Makefile.fbdev

$ make -f Makefile.fbdev install

The executable will then be copied to this directory: ~/gpu_sdk_v1.00/Samples/ GLES1.1/bin/GLES11_fbdev

  • Finally, you could copy the executable to the rootfs and test on i.MX6Q SDP/SDB or i.MX6DL SDP board.

NOTE: the newly added makefiles.tgz contains Makefile.x11 hacked from GLES2.0 example code to make OpenVG to compile and run on Ubuntu 11.10 rootfs.

Attachments
Comments

Hi,

I am able to compile the Samples using this sequence but when i am executing the Binaries then following error is  coming:-

./bin/OpenVG_fbdev/CoverFlow: symbol lookup error: ./bin/OpenVG_fbdev/CoverFlow: undefined symbol: fbGetDisplayByIndex

Can you please help?

Are your using min-profile to build the rootfs?

Got L3.0.35_4.1.0 LTIB env on hand and compiled the GPU_SDK accordingly.  The CoverFlow is running well.

IMG_20150116_121942.jpg

SW: L3.0.35_4.1.0 compiled to run on i.MX6Q SDB board and using minimal profile.  "gpu-viv-bin-mx6q" has been selected and installed to the rootfs.

HW: i.MX6Q SDB + LVDS display.

The console print out:

root@freescale ~/OpenVG_fbdev$ ls

CoverFlow  Example1   Example2   Example3

root@freescale ~/OpenVG_fbdev$ ./CoverFlow

EGL Display properly Got

Choose configs OK

NUM Configs OK

init:use config 0x331a36d4

id=14, a,b,g,r=8,8,8,8, d,s=16,0, AA=0,openvgbit=23, surfacebit=1511

Created Window OK

Created Surface OK

Created Context OK

Made current Context OK

Caught signal 2, setting flaq to quit.

Cleaning up...

root@freescale ~/OpenVG_fbdev$

Thanks for your Reply.I am using the same board which you've shown above.

Actually I am using pre-built Linux Images available from Freescale's SABRE-SD Page.I am using the following Tools and Packages:-

1, L3.0.35_4.1.0_130816_images_MX6 for all pre-built images like u-boot,Linux kernel etc.

2, Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER for burning the Image to SABRE-SD board.

3, Acc. to the Re: Running EGL demos on Freescale's 12_09_01_oneiric release I have installed the following GPU and kernel Package:-

   gpu-viv-bin-mx6q_3.0.35-4.1.0_armel.deb

   kernel_3.0.35-imx_4.1.0_armel.deb

4, oneiric.tgz rootfs

I am using the HDMI port for display then using HDMI-DVI connector to display it on a DVI compatible monitor.

Can you check whether there is some issue with these pre-built images?

You need to compile OpenVG to run on X11 backend.  However, there is no Makefile.x11 included in the SDK for OpenVG.  Please refer the attached makefiles hacked from GLES2.0 directory (makefiles.tgz).

Also, If you are using the uboot and kernel from L3.0.35_4.1.0_130816_images_MX6, then please do use the Ubuntu rootfs named: L3035_410_ubuntu_rfs_oneiric.tgz and which should have gcc and needed header files installed and does not need to do any modification.

Clipboard01.jpg

So, untar the makefile.tgz inside OpenCV directory and your will get the additional Makefile.x11 and also inside CoverFlow etc

linaro@linaro-ubuntu-desktop:~/gpu_sdk_v100/Samples/OpenVG$ make -f Makefile.x11 clean

linaro@linaro-ubuntu-desktop:~/gpu_sdk_v100/Samples/OpenVG$ make -f Makefile.x11

linaro@linaro-ubuntu-desktop:~/gpu_sdk_v100/Samples/OpenVG$ make -f Makefile.x11 install

The binaries could be found in OpenVG/bin/OpenVG_x11

Here is what it look like when running CoverFlow:

IMG_20150116_180221.jpg

Hi Puneet,

This error may be because you are trying to run the binaries from the serial terminal appearing on your host PC. Try connecting a keyboard to the target board and from the terminal appearing on HDMI Display panel, try to run the binary.

Hope it helps,

Sudlin

Thanks Sudlin but now i am using LVDS display and everything is working fine.

Hi isaac.ng

After making the changes you suggested I am able to run all the Samples related to Graphic libraries.

Just one more query that do we some have samples available for OpenCL library.
If you have those please send them to me.It would of great help.

Thanks ,

Puneet Pal Singh

Hi Isaac Ng

Now I compiled the OpenVG Sample code :Example3.c

but it display error: the screen flash quickly, when I deleted the eglSwapBuffers(egldisplay, eglsurface); only use the OvgApp_Draw() in main function. it can also display the same thing(I mean it also flash).

I use the /opt/imx-gpu-sdk/OpenVG/Example3/Example3_FB, it can display correctly.

what's wrong?

now I use the libOpenVG.2d.so.@

No ratings
Version history
Last update:
‎06-18-2013 04:10 AM
Updated by: