Hello,
To make a long story short, our plan is to use Torizoncore OS for different containers. This allows us to use different graphical background programs such as navigations and web-browser in our infotainment system in a car.
So technically speaking, we want to develop a docker container to run UI program. We have used Storyboard UI program which traditionally requires to have “eglinfo-fb” recipe with console-tdx-image in yocto. (How to add framebuffer EGL to console-trdx-image? - Technical Support - Toradex Community)
But, I have no idea to run storyboard UI program, in other words, we need to install eglinfo-fb recipe in a ubuntu base container.
Here is what I did so far.
-
My first thought was, if we are able to install eglinfo-fb itself (GitHub - dv1/eglinfo: EGL information utility with support for client APIs like OpenGL ES and OpenVG) in our ubuntu base container like we did with yocto, we will be able to run UI program.
However, when I try to install it “./waf configure --platform=x11 --device=imx6”, there is no error during installation. But, in case of “./waf configure --platform=fb --device=imx6”, it shows below errors0;root@2ff06025ed0b: ~/eglinforoot@2ff06025ed0b:~/eglinfo# ./waf configure --platform=fb --device=imx6
Setting top to : /root/eglinfo
Setting out to : /root/eglinfo/build
Checking for ‘gcc’ (c compiler) : /usr/bin/gcc
Checking for ‘g++’ (c++ compiler) : /usr/bin/g++
Checking for library [‘EGL’, ‘GAL’] : yes
Checking for header EGL/eglvivante.h : yes
Checking for header EGL/egl.h : yes
Checking for library GLESv2 : yes
Checking for header GLES2/gl2.h : yes
Checking for header [‘GLES2/gl2.h’, ‘GLES2/gl2ext.h’] : yes
Checking for fixed gccso shader binary definition : yes
Checking for library OpenVG : yes
Checking for header VG/openvg.h : yes
Checking for compiler switch -Wextra : yes
Checking for compiler switch -Wall : yes
Checking for compiler switch -Wno-unused-parameter : yes
Checking for compiler switch -std=c99 : yes
Checking for compiler switch -pedantic : yes
Checking for compiler switch -Wextra : yes
Checking for compiler switch -Wall : yes
Checking for compiler switch -std=c++98 : yes
Checking for compiler switch -pedantic : yes
Checking for compiler switch -O0 : yes
Checking for compiler switch -g3 : yes
Checking for compiler switch -ggdb : yes
Checking for compiler switch -O0 : yes
Checking for compiler switch -g3 : yes
Checking for compiler switch -ggdb : yes
Checking for compiler switch -O2 : yes
Checking for compiler switch -O2 : yesBuilding for platform : fb
Building for device : imx6API support:
Desktop OpenGL : no
OpenGL ES 1.x : no
OpenGL ES 2.x : yes
OpenVG : yes
‘configure’ finished successfully (14.538s)
0;root@2ff06025ed0b: ~/eglinforoot@2ff06025ed0b:~/eglinfo# ./waf
Waf: Entering directory/root/eglinfo/build/release' [ 1/13] cxx: src/json_writer.cpp -> build/release/src/json_writer.cpp.1.o [ 2/13] cxx: src/log.cpp -> build/release/src/log.cpp.1.o [ 3/13] cxx: src/main.cpp -> build/release/src/main.cpp.1.o [ 4/13] cxx: src/process_egl.cpp -> build/release/src/process_egl.cpp.1.o [ 5/13] cxx: src/scopes.cpp -> build/release/src/scopes.cpp.1.o [ 6/13] cxx: src/text_writer.cpp -> build/release/src/text_writer.cpp.1.o [ 7/13] c: src/json-sax/json.c -> build/release/src/json-sax/json.c.1.o [ 8/13] cxx: src/platform_fb_imx6.cpp -> build/release/src/platform_fb_imx6.cpp.1.o [ 9/13] cxx: src/glapi_stats.cpp -> build/release/src/glapi_stats.cpp.1.o [10/13] cxx: src/process_glapi.cpp -> build/release/src/process_glapi.cpp.1.o ../../src/platform_fb_imx6.cpp: In constructor 'eglinfo::native_window::native_window(const eglinfo::native_display&, EGLint)': ../../src/platform_fb_imx6.cpp:37:83: warning: unused parameter 'p_visual_id' [-Wunused-parameter] native_window::native_window(native_display const &p_native_display, EGLint const p_visual_id) ^~~~~~~~~~~ [11/13] cxx: src/openvg_stats.cpp -> build/release/src/openvg_stats.cpp.1.o [12/13] cxx: src/process_openvg.cpp -> build/release/src/process_openvg.cpp.1.o [13/13] cxxprogram: build/release/src/json_writer.cpp.1.o build/release/src/log.cpp.1.o build/release/src/main.cpp.1.o build/release/src/process_egl.cpp.1.o build/release/src/scopes.cpp.1.o build/releaseo src/platform_fb_imx6.cpp.1.o: In function
eglinfo::native_window::native_window(eglinfo::native_display const&, int)‘:
platform_fb_imx6.cpp:(.text+0xa2): undefined reference tofbCreateWindow' src/platform_fb_imx6.cpp.1.o: In function
eglinfo::native_display::native_display(char const*)’:
platform_fb_imx6.cpp:(.text+0x278): undefined reference tofbGetDisplayByIndex' collect2: error: ld returned 1 exit status Waf: Leaving directory
/root/eglinfo/build/release’
Build failed
→ task in ‘eglinfo’ failed (exit status 1):
{task 3061207952L: cxxprogram json_writer.cpp.1.o,log.cpp.1.o,main.cpp.1.o,process_egl.cpp.1.o,scopes.cpp.1.o,text_writer.cpp.1.o,json.c.1.o,platform_fb_imx6.cpp.1.o,glapi_stats.cpp.1.o,process_g}
[‘/usr/bin/g++’, ‘src/json_writer.cpp.1.o’, ‘src/log.cpp.1.o’, ‘src/main.cpp.1.o’, ‘src/process_egl.cpp.1.o’, ‘src/scopes.cpp.1.o’, ‘src/text_writer.cpp.1.o’, ‘src/json-sax/json.c.1.o’, 'src/platform_fb_] -
Similar problem happens when I attempt to run Storyboard UI program as shown in below log.
root@66e96ff5e542:~# /root/sbengine/bin/sbengine -ogreio,channel=D1 -vvvv /root/OIS1D_D1/OIS1D_D1.gapp
INFO [0.002]:Detected plugin [/root/sbengine/plugins//libgre-plugin-screen-dump.so]
INFO [0.008]:Detected plugin [/root/sbengine/plugins//libgre-plugin-effects-3d.so]
WARN [0.010]:Unable to load plugin: /root/sbengine/plugins//libgre-plugin-mtdev.so Error: libmtdev.so.1: cannot open shared object file: No such file or directory
WARN [0.012]:Unable to load plugin: /root/sbengine/plugins//libgre-plugin-audio.so Error: libasound.so.2: cannot open shared object file: No such file or directory
INFO [0.012]:Detected plugin [/root/sbengine/plugins//libgre-plugin-screen-scale.so]
INFO [0.013]:Detected plugin [/root/sbengine/plugins//libgre-plugin-screen-path.so]
INFO [0.014]:Detected plugin [/root/sbengine/plugins//libgre-plugin-poly.so]
INFO [0.016]:Detected plugin [/root/sbengine/plugins//libgre-plugin-rext-external.so]
WARN [0.017]:Unable to load plugin: /root/sbengine/plugins//libgre-plugin-tslib.so Error: libts-1.0.so.0: cannot open shared object file: No such file or directory
INFO [0.019]:Detected plugin [/root/sbengine/plugins//libgre-plugin-screen-3d.so]
INFO [0.020]:Detected plugin [/root/sbengine/plugins//libgre-plugin-event-redirect.so]
INFO [0.021]:Detected plugin [/root/sbengine/plugins//libgre-plugin-gesture.so]
INFO [0.022]:Detected plugin [/root/sbengine/plugins//libgre-plugin-media.so]
INFO [0.025]:Detected plugin [/root/sbengine/plugins//libgre-plugin-luagredom.so]
INFO [0.027]:Detected plugin [/root/sbengine/plugins//libgre-plugin-circle.so]
INFO [0.029]:Detected plugin [/root/sbengine/plugins//libgre-plugin-rtext.so]
INFO [0.030]:Detected plugin [/root/sbengine/plugins//libgre-plugin-system.so]
INFO [0.031]:Detected plugin [/root/sbengine/plugins//libgre-plugin-animation.so]
INFO [0.032]:Detected plugin [/root/sbengine/plugins//libgre-plugin-capture-playback.so]
INFO [0.033]:Detected plugin [/root/sbengine/plugins//libgre-plugin-screen-rotate.so]
INFO [0.034]:Detected plugin [/root/sbengine/plugins//libgre-plugin-greio.so]
INFO [0.035]:Detected plugin [/root/sbengine/plugins//libgre-plugin-dev-input.so]
INFO [0.035]:Detected plugin [/root/sbengine/plugins//libgre-plugin-timer.so]
INFO [0.036]:Detected plugin [/root/sbengine/plugins//libgre-plugin-canvas.so]WARN [0.038]:Unable to load plugin: /root/sbengine/plugins//librender-plugin-opengles_2.0.so
Error: /root/sbengine/plugins//librender-plugin-opengles_2.0.so: undefined symbol: fbDestroyWindowINFO [0.039]:Detected plugin [/root/sbengine/plugins//libgre-plugin-lua.so]
INFO [0.042]:Detected plugin [/root/sbengine/plugins//libgre-plugin-model3d.so]
INFO [0.043]:Detected plugin [/root/sbengine/plugins//libgre-plugin-logger.so]
INFO [0.057]:Detected plugin [/root/sbengine/plugins//libgre-plugin-ffmpeg.so]
ERROR [0.057]:Unable to load a renderer
ERROR [0.057]:Unable to Load Manager Plugins: name=/root/OIS1D_D1/OIS1D_D1.gapp errno=0
INFO [0.060]:All Plugins and Managers Finalized
Failed to run engine using file: /root/OIS1D_D1/OIS1D_D1.gapp -
My last clue is about “libvivante.so” in /usr/lib. Since there is no “libvivante-fb.so”, “libGAL-fb.so”, “libEGL-fb.so”, or “libOpenVG.so”. So, I followed this guide from NXP (https://community.nxp.com/docs/DOC-330147) to install the BSP packages with below commands. After that, I could see all libraries that I want, but still no luck to run the UI program.
cd …
mkdir –p gpu_pack
cd gpu_pack
wget http://www.nxp.com/lgfiles/NMG/MAD/YOCTO//imx-gpu-viv-5.0.11.p7.4-hfp.bin
wget http://www.nxp.com/lgfiles/NMG/MAD/YOCTO//xserver-xorg-video-imx-viv-5.0.11.p7.4.tar.gz
chmod +x *
./imx-gpu-viv-5.0.11.p7.4-hfp –-auto-accept -–force
cd imx-gpu*
cp g2d/usr/include/* /usr/include/
cp -d g2d/usr/lib/* /usr/lib/
cp -Pr gpu-core/usr/* /usr
So, my thinking so far is that it feels like I’m using X11 based OS image like angstrom-lxde-image in yocto project in order to install required libraries for running UI program. So, basically I think I need to set up an ubuntu container just like a console-tdx-image.
Any thoughts, comments or helps to move forward will be so welcome.
Thank you in advance.