Qt5 + OpenGL ES2 + Linux + EGLFS + Wandboard (armhf)

5,058 views
Skip to first unread message

Alfonso Tamés

unread,
Oct 29, 2013, 4:40:31 AM10/29/13
to wand...@googlegroups.com

I am trying to build Qt for eglfs and linuxfb applications using Wandboard and Future Electronics LCD.

I am using an image made from Robert Nelson's guide (http://eewiki.net/display/linuxonarm/Wandboard) with the framebuffer only drivers provided by Timesys (https://www.dropbox.com/s/0dpghzo9u1coqt2/vivante-hf-fbonly.tar.xz)

So far, I am able to build Qt5.2.0 in the Wandboard following these instructions:

$ git clone git://gitorious.org/qt/qt5.git qt5
$ ./init-repository --no-webkit

* Adding these lines at the end of qtbase/mkspecs/linux-g++/qmake.conf

QMAKE_LIBS_OPENGL_ES2 =  -lGLES_CL -lGLES_CM -lVDK -lGLSLC -lGLESv2 -lEGL
QMAKE_LIBS_OPENVG
= -lOpenVG_355 -lOpenVG_3D -lOpenVG -lVDK


IMX6_CFLAGS            
= -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE    
= -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE  
+= $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE
+= $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG    
+= $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG  
+= $$IMX6_CFLAGS


* And configuring with these options:

$ ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -no-icu

* For Wandboard Quad:

$ make -j 4

Everything builds fine and make install puts Qt5 in /usr/local/Qt-5.2.0

The problem is that running the examples using eglfs throws an error:


root@linaro-alip:/usr/local/Qt-5.2.0/examples/opengl/hellogl_es2# ./hellogl_es2 -platform eglfs
QSocketNotifier: Can only be used with threads started with QThread
EGLFS
: Unable to query physical screen size, defaulting to 100 dpi.
EGLFS
: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL
Error : Could not create the egl surface: error = 0x300b


Aborted (core dumped)


I tried to set-up the environmental variables, but again the same error:

# export QT_QPA_EGLFS_DEPTH=16
# export DISPLAY=:0
# export QT_QPA_EGLFS_PHYSICAL_WIDTH=100
# export QT_QPA_EGLFS_PHYSICAL_HEIGHT=80


root@linaro
-alip:/usr/local/Qt-5.2.0/examples/opengl/hellogl_es2# ./hellogl_es2 -platform eglfs
QSocketNotifier: Can only be used with threads started with QThread
EGL
Error : Could not create the egl surface: error = 0x300b


Aborted (core dumped)



Has anyone succeeded with Qt5 / EGLFS / OpenGL ES2 and the Wandboard using armhf?

Thanks,

Alfonso Tamés

Wand Board

unread,
Oct 29, 2013, 4:48:50 AM10/29/13
to wand...@googlegroups.com, Otavio Salvador
Did you already look at Yocto 1.5 by any chance?


--
You received this message because you are subscribed to the Google Groups "Wandboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wandboard+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alfonso Tamés

unread,
Oct 29, 2013, 1:34:11 PM10/29/13
to wand...@googlegroups.com, Otavio Salvador

Not yet! I'll check it today.

Thanks,

Alfonso

Alfonso Tamés

unread,
Nov 3, 2013, 3:38:42 PM11/3/13
to wand...@googlegroups.com, Otavio Salvador

Well, I tried to build Yocto Dora (the Master branch is broken since its not finding a recipe for cmake) with meta-qt5 and tried to build a core-image-minimal image. It fails with lots of errors in qurl.h. I am attaching a file with bitbake's output if anyone is interested.

Cheers,


Alfonso


On Tuesday, October 29, 2013 2:48:50 AM UTC-6, www.wandboard.org wrote:
Yocto-dora-meta-qt5-bitbake.core.image.minimal-output.txt

Alfonso Tamés

unread,
Nov 6, 2013, 11:32:46 PM11/6/13
to wand...@googlegroups.com, Otavio Salvador

This patch solves the problem and lets Yocto build Qt5.


Regards,

Alfonso

Otavio Salvador

unread,
Nov 7, 2013, 6:44:31 AM11/7/13
to Alfonso Tamés, Wandboard Discussion Group
On Thu, Nov 7, 2013 at 2:32 AM, Alfonso Tamés <alfons...@gmail.com> wrote:
>
> This patch solves the problem and lets Yocto build Qt5.
>
> http://patchwork.openembedded.org/patch/60673/

As explained by Martin, in openembedded-devel mailing list thread,
this is a workaround. Quoting him:

"We had similar problem, but fixed gles2 provider instead, in our case we
were using libhybris and the fix was to prevent loading X11 headers when
we want to use just gles2 from it.

Similar changes were added to mesa lately, can you do the same with
gles2 provider on your platform?"

So the right fix here is to pass the proper options to Vivante drivers
and/or patch its headers to do the right thing.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

Alfonso Tamés

unread,
Nov 17, 2013, 3:43:09 PM11/17/13
to wand...@googlegroups.com, Otavio Salvador

Yes, Yocto 1.5 (master branch and Dora) with meta-qt5 are giving the same error :(

Michele Adduci

unread,
May 27, 2014, 3:59:58 AM5/27/14
to wand...@googlegroups.com, Otavio Salvador
Hi

have you solved the running of OpenGL GLES2 demos with Qt on framebuffer?

Lucas Rocha

unread,
Nov 26, 2014, 2:45:51 PM11/26/14
to wand...@googlegroups.com, otavio....@gmail.com
Dos anyone create a compleat qt 5.3.2 including all the features , Qwebkit , Qml , and all?

I´m trying but , when i test any aplication im getting the message below :

root@wandboard-quad:/usr/share/cinematicexperience-1.0# ./Qt5_CinematicExperience -platform eglfs
QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
 If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
mxc_sdc_fb fb.26: 800x480 h_sync,r,l: 10,164,89  v_sync,l,u: 10,10,23 pixclock=33500000 Hz
Segmentation fault

any idea?

Lucas

Alfonso Tamés

unread,
Nov 30, 2014, 12:56:15 AM11/30/14
to wand...@googlegroups.com
Yes, try Yocto 1.7 (Dizzy). The problem was the color bit depth setting. It's now solved.

Alfonso Tamés

unread,
Nov 30, 2014, 12:58:01 AM11/30/14
to wand...@googlegroups.com

Have you tried with Yocto 1.7 Dizzy?

Lucas Rocha

unread,
Dec 2, 2014, 12:11:13 PM12/2/14
to wand...@googlegroups.com
I will try it today , but just to be sure i need just to git clone -b dizzy git://git.yoctoproject.org/poky.git
in the source folder and run bitbake again  ?

Thanks

Lucas

Alfonso Tamés

unread,
Dec 5, 2014, 1:16:33 AM12/5/14
to wand...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages