Bitbake fails to compile when fb.h is included

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

Bitbake fails to compile when fb.h is included

1,402 Views
patsandt
Contributor III

I've been building for an i.MX6 (quad core) for a custom board. The board uses a Phytec module, but the build is significantly derived from the Sabre board. The build has been working. The code is working. Now it is time to write the code that transfers data from a frame buffer to the IPU to the HDMI interface. Neither ipu.h nor mxcfb.h were found in my build tree. (I found several versions of ipu.h in my build tree, but none that had non-zero length and were appropriate.) I found a copy of mxcfb.h on line and parked it someplace I would find it. I found several ipu.h files in the old fsl-community-bsp-platform directory and moved them into my build tree in the same locations.

When I try to build, I get a compile error in cpumask.h, apparently because it is a c file and I'm including fb.h from a cpp file. Then I get another error is rcupdate.h because I have an "Unknown RCU implementation specified". I tried specifying each of the three options, and the result is more errors down-line. The first of which is that I have an invalid value for HZ. I would gladly define it if I knew what it was supposed to be. I'm beginning to think that nobody else is having these problems, so I'm doing something wrong.

My bb file for the phytec module has the following, which I suspect must be wrong:

export KERNEL_DIR = "${STAGING_KERNEL_DIR}"
export ARCH_DIR = "${STAGING_KERNEL_DIR}/arch/arm"

I then add these paths to the build. Has anyone gotten a cpp build with fb.h? Any tricks to it?

#

Labels (3)
0 Kudos
Reply
6 Replies

1,026 Views
patsandt
Contributor III

Work continues, but no resolution. I have now gotten to the point where I can compile and run most of my Unit Test, which is based on several egl examples scattered around the internet, most identical. The lines I can't deal with yet are

            glClearColor(1.0, 1.0, 0.0, 1.0);
            glClear(GL_COLOR_BUFFER_BIT);
            glFlush();

The link step (CMake) results in undefined references for these. Please do not tell me to use apt-get. I'm using bitbake and the target is an i.MX6 (deployed on a Phytec module). When I try to build freeglut, I get a "cannot find -lGL". In the hopes that it was available in some non-standard place, I tried to find it. No such luck. It is really not in my target tree. I had expected that freeglut would provide libGL, but I guess not. I have tried searching the internet for what I need to build to get it, but no luck so far. If anyone can point me to a recipe for libGL, I'd appreciate it. I expect it is hw dependent, so something that works for i.MX6.

0 Kudos
Reply

1,026 Views
patsandt
Contributor III

Successfully building everything, but not yest working: quick summary for those who care.

Using the imx6 recipe for graphics, the unit test that called glClearColor and glClear worked. (The HDMI output to the projector changed the color of the display.) However, when I switch to the Phytec recipe, that code builds, but does not work (displaying HAL messages and bad alloc errors on every egl call, even the ones that don't support that error...)

Something is wrong with the Phytec build. Don't know where to go with this yet.

0 Kudos
Reply

1,026 Views
patsandt
Contributor III

I tried manually adding gbm to the recipes and now I get a message that it cannot satisfy the dependency for libegl-mesa. Trying to restore back to a build that will at least complete, I removed gbm. I get the same error. (Full clean and cleansstate. Doesn't seem to matter.) I can't find a recipe for libegl-mesa or even any mention of it.

I want to go back to my basic need: I'm stuck with a phytec module for my imx6. I need to crop a bitmap and drive the output to HDMI. My initial steps were to try to start with the examples for the IPU, but I'm told that I can't use those with Phytec. I must use egl. Up until my recent build issue, I had built an image that tries to use egl, but complains "gbm: failed to open any driver (search paths /usr/lib/dri)failed to load driver imx-drm" and "failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory"

There is no gbm directory in /usr/lib. There is no dri directory in /usr/lib. I had hoped that I could get them added by building mesa-demos, but that did not work (competing sources for many gl related files.)

Any assistance in getting drm or gbm added is useful. Alternately, adding libegl-mesa is useful. Either of these would move me onto the next hurdle.

0 Kudos
Reply

1,026 Views
patsandt
Contributor III

I gather that the ipu interface is blacklisted by Phytec and I'm supposed to use EGL. Towards that end, I've added "#include <EGL/egl.h>" in my Unit Test (no other code yet). That statement fails to build because none of the supported options are defined for eglvivante.h.

I would expect LINUX to be defined, and I promise to add it to my build defines. However, this leaves me with another question: Should EGL_API_DFB be defined? How about EGL_API_FB? Can someone advise me?

0 Kudos
Reply

1,026 Views
jimmychan
NXP TechSupport
NXP TechSupport

We have BSP document talk about this. Hope this can help you.

Download here:

i.MX 6 Series Software and Development Tool|NXP 

Please download the BSP documentation which the BSP version you are using now. 

In the documentation bundle, there are i.MX_6_Graphics_User's_Guide.pdf, i.MX_Linux_Reference_Manual.pdf and i.MX_VPU_Application_Programming_Interface_Linux_Reference_Manual.pdf

0 Kudos
Reply

1,026 Views
patsandt
Contributor III

Interestingly, I'm forced through the registration page again and it will

not navigate past it after the "Submit". (Yes, I clicked the agree box.) I

guess I won't be able to read that documentation.

For what it is worth, I've been able to build something by using egl, but I

can't run it because it says that it can't find gbm in /usr/lib. However,

when I try to add gbm, it complains that files already exist. Still working

on it.

On Mon, Oct 17, 2016 at 12:25 AM, jimmychan <admin@community.freescale.com>

0 Kudos
Reply