Hi,
With OpenEmbedded Core I have build angstrom-lxde-image and then I have compiled the OpenGL ES 2.0 Samples (High performance, low power Embedded Computing Systems | Toradex Developer Center) with the makefile for X11 library and run it on my Toradex Apalis IMX6Q.
It works well.
Now I want to build the console-trdx-image with oe-core to compiled the OpenGL ES 2.0 with the makefile for fbdev. Unfortunately the compilation failed with these errors :
../common/src/fsl_egl.c:53: error: undefined reference to 'fbGetDisplayByIndex'
../common/src/fsl_egl.c:80: error: undefined reference to 'fbCreateWindow'
These references must be in libEGL-fb.so and if I look in usr/lib this library doesn’t exist :
fiveco$ ll oe-core/build/out-glibc/sysroots/apalis-imx6/usr/lib/libEGL*
lrwxrwxrwx 1 fiveco fiveco 13 Mai 2 13:51 oe-core/build/out-glibc/sysroots/apalis-imx6/usr/lib/libEGL.so -> libEGL.so.1.0
lrwxrwxrwx 1 fiveco fiveco 13 Mai 2 13:51 oe-core/build/out-glibc/sysroots/apalis-imx6/usr/lib/libEGL.so.1 -> libEGL.so.1.0
-rw-r--r-- 1 fiveco fiveco 92K Mai 2 13:51 oe-core/build/out-glibc/sysroots/apalis-imx6/usr/lib/libEGL.so.1.0
When I have build the console-trdx-image I have add these lines to build/conf/local.conf
DISTRO_FEATURES_remove = "x11 wayland"
IMAGE_INSTALL_remove = "eglinfo-x11"
But nothing change.
Anybody know how to add correctly framebuffer EGL to console-trdx image ?
NXP provides EGL libraries for various backends (X11, Wayland, Framebuffer…), however the OpenEmbedded build system only installs one of them, packaged in the libegl-imx6 package. Depending on DISTRO_FEATURES, a different library will end up in that package.
The imx-gpu-viv recipe is responsible for the magic: The install step makes sure that only one of those libEGL variants lands in the target directory:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc?h=jethro#n124
To get libegl-fb.so (renamed as libegl.so) in your root file system, you have to make sure that you don’t have x11 or wayland in your DISTRO_FEATURES.
Please note that you usually need to remove all buildoutput when you change the DISTRO_FEATURES variable.
rm -rf oe-core/build/out-glibc oe-core/build/sstate-cache
Thanks for your answer.
Now I have removed all build output, and restarted bitbake and then I have no more egl library, neither x11 nor wayland or framebuffer.
Maybe imx-gpu-viv did not get installed at all anymore? Try adding “virtual/egl” to your image, this should pick up imx-gpu-viv again (since it provides virtual/egl).
Hello finally I add these lines to oe-core/stuff/meta-toradex/recipes/images/console-trdx-image.bb
IMAGE_INSTALL_append_mx6 = " \
eglinfo-fb \
"
and then it works.
Thanks for sharing! That totally makes sense, the eglinfo-fb
recipe has virtual/egl
in its dependency, which makes sure that imx-gpu-viv gets installed again… As my comment above notes, using virtual/egl
or imx-gpu-viv
would have worked too.