Problem porting an OpenGL application in yocto

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

Problem porting an OpenGL application in yocto

2,481 Views
priyank_bhatt
Contributor III

Hello Everyone,

We are working on imx8qxp MEK board with Yocto zeus and kernel version L5.4.24_2.1.0. We have a test application to display HD images on HD display. For the same we are using OpenGL(Open Graphics Libaray), DevIL(Developer's Image Library) and glut(OpenGL Utility Toolkit) libraries.

We have checked that imx8qxpmek has support for OpenGL from the i.MX 8DualX/8DualXPlus/8QuadXPlus Applications Processor Reference Manual

We have created a layer in yocto, which has a recipe for our application which includes src(.c) file. The src(.c) file is compiled from the recipe by the following command

do_compile () {

 ${CC} hdimages.c ${LDFLAGS} -lGL -lglut -lIL -o hdimages
}‍‍‍‍

The src(.c) file is compiling fine on Ubuntu 18.04 terminal and we are succesfully able to see images. But it is giving some issues when running on yocto build.
1. bitbake using bitbake recipe_name (For compiling that specific recipe only)
2. bitbake using bitbake imx-image-multimedia (For compiling whole image)

While compiling the application recipe, it gives an error saying that il.h header file does not exist. The error looks like

fatal error: IL/il.h: No such file or directory
   40 | #include <IL/il.h>              /* DevIL libarary for loading images */
      |          ^~~~~~~~~

We had got the same error while compiling on Ubuntu terminal but that was resolved by installing the following package

sudo apt-get install libdevil-dev

The same was tried on yocto to install the libdevil-dev package by adding the following line in local.conf :

CORE_IMAGE_EXTRA_INSTALL += "libdevil-dev" OR IMAGE_INSTALL += " libdevil-dev"


to install the extra packages which is dependent for that recipe. But this approach did not work fine and its giving same error again.

  • On checking for the il.h header file, it is available on the following path yocto imx-multimedia build :-
    Path for il.h header file - /build-imx_image_multimedia/tmp/sysroots-components/imx8qxpmek/devil/usr/include/IL
  • On checking for the glut.h header file, it is available on the following path yocto imx-multimedia build :-
    Path for glut.h header file - /build-imx_image_multimedia/tmp/sysroots-components/aarch64-mx8/freeglut/usr/include/GL

Is there any solution to compile this recipe without going for SDK approach?

Thank you

0 Kudos
2 Replies

2,407 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Priyank,

I haven´t try devil with MX8 but here is the recipe you need for compiling:

recipes-graphics/devil/devil_1.7.8.bb · 937690e39b1ea2432a9e207d9070eb795c7530fd · yocto / meta-fsl-... 

This recipe is required for gpu-sdk. Let us know if this work for you.

Regards

0 Kudos

2,364 Views
priyank_bhatt
Contributor III

Hello @Bio_TICFSL,
The "fatal error: IL/il.h: No such file or directory" is resolved by adding the dependency of devil in the recipe, now the application is compiled successfully with core-image-base & imx-image-multimedia. But presently we are facing the issue that while executing the application, it is not displaying images on the HDMI display instead it is showing some flickerings on the screen

Please suggest us some application with which we can display HD images on the HDMI display, we are using the LVDS0 port

Thank you

0 Kudos