Hi, sure. But please be aware this was the tinker/hack'n'slash way that I did just to gain understanding if or not it is possible in the first place. Aka The fun way ;-)
(I think more proper way would be getting the meta-qt5 up and running with XCB + understanding the "x11 visual" <--> "EGL" color depth incompatibility issue. With Eric's patch the Qt built for XCB but then there is still the color depth issue and lack of qmake to compile Qt things. And also with the patch I think the Qt was configured slightly "wrong" in a sense that XCB QPA uses GLX instead of EGL). 1) downloaded the fsl community yocto project and checked out master-next branches of "meta-fsl-arm", "meta-fsl-arm-extra", and "poky" 2) to be on the safe side I modified the poky.conf under the poky to rid the wayland. Not sure if this was necessary: -POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl multiarch wayland" +POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl multiarch x11" 3) bitbaked the project. I baked the fsl-image-gui (next time I would try/check the core-image-x11). So the usual MACHINE=nitrogen6x source setup-environment build bitbake fsl-image-gui 4.1) once built I ripped the "eglvivante.h" file found under sysroots/nitrogen6x/usr/include/EGL In essence the file has a main level #ifdef logic to see which EGL definitions to use. Because we are building the Qt "outside" the defines are not correct and you will end up with wrong EGL definitions. So delete all other except the X11 #ifdef branches (starting below /* X11 platform */ -comment). Alternatively I guess you could add appropriate defines to your Qt's .pro files somewhere. The resulting file is quite small (< 70 lines). If you don't do this the first likely symptom is something like error: cannot convert 'Display* {aka _XDisplay*}' to 'EGLNativeDisplayType {aka _FBDisplay*}' and now you know roughly why. 4) downloaded Qt 5 pretty much as in the instructions: https://community.freescale.com/docs/DOC-94066 But don't do the configure just yet. 5) modified the Qt a bit 5.1) Turned on the hard floats by adding DISTRO_OPTS += hard-float to /qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf To know this was effective later when configuring Qt you should see "-mfloat-abi=hard" in the g++ command. If you don't see it _AND_ the all of Qt configure tests fail this is a likely cause. This may work the other way around too, really depends if your sysroot abi is hard / soft float. 5.2) Brute-forced the egl - x visual compatibility issue by tweaking the file under qtbase: src/platformsupport/eglconvenience/qxlibeglintegration.cpp the function VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLDisplay to return - return (VisualID)0; + return (VisualID)33; 6) Configured Qt This of course comes in many flavors but this was my line: ./configure -v -opensource -confirm-license -no-pch -qpa xcb -qt-xcb -no-eglfs -no-kms -no-linuxfb -no-directfb -opengl es2 -make libs -make examples -device imx6 -device-option CROSS_COMPILE=/home/tummeli/yocto/fsl-master-next/build/tmp/sysroots/i686-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /home/tummeli/yocto/fsl-master-next/build/tmp/sysroots/nitrogen6x -prefix /home/tummeli/nx6-xcb-inst 7) make, make installed Qt 8) deployed Qt on the device There are many ways to do this but I used simple "scp" as I don't currently have TFTP sysroot nor use rootfs as build sysroot. You need to copy three things and set environment variables accordingly on the device. If you copy stuff to Qt default locations then the environment variables are not needed. You will find the below stuff under sysroot whereever you set the "-prefix". - Qt libs (libQt5*so.5) at lib/* --> LD_LIBRARY_PATH - Qt plugins (QPAs, bearer management, ...) at plugins/* --> QT_PLUGIN_PATH - Qml plugins (if needed) at qml/* --> QML2_IMPORT_PATH 9) Run the apps! scp your app on the device and run, for example DISPLAY=:0 ./analogclock Note: on first time after boot none of the Qt apps show anything and there is an XCB error: QXcbConnection: XCB error: 146 (Unknown), sequence: 156, resource id: 0, major code: 139 (Unknown), minor code: 20 Kill the app and all subsequent runs for all Qt apps will work. Any thoughts / help in this area would be highly appreciated! cheers, Juha 2013/9/11 Ahmed Ammar <aam...@genesi-usa.com>: > That sounds great. > > Any chance you can give a complete write up on how to reproduce this? > > Regards, > Ahmed. > > On Sep 11, 2013, at 5:29 AM, Juha Vuolle <juvuo...@gmail.com> wrote: > >> After a small hiatus I returned to this and got the qt5 + gles2 + xcb >> combination working. >> Just to let people know that it is possible. I can now run QtQuick2 >> apps QGLWidgets etc. hellogl_es2 seems to go closer to 300 FPS. >> As an additional cherry on top the x11vnc works with them too. >> >> I took the latest master-nexts of everything, compiled Qt myself and >> put a small bruteforce hack into Qt relating to the "incompatable >> color depths". >> Note: you may have to force the hard floats on in the Qt compilation, >> I added "DISTRO_OPTS += hard-float" to the "linux-imx6-g++/qmake.conf >> ". If you don't do this the likely first symptom is that all Qt's >> configure tests fail. >> >> Juha >> >> >> 2013/8/27 Juha Vuolle <juvuo...@gmail.com>: >>>>> some polish >>>>> If you can try it and provide feedback that would help to get xcb into >>>>> master. >>>> >>>> Thanks appreciated. >>> >>> Can't yet comment on the real XCB patch as it's still baking, have to >>> get back to that later. >>> >>> In the meanwhile I thought I'd mention I managed to manually compile >>> qt5 with xcb support against the master. >>> There were some hurdles on the way but I got at least the Qt widget >>> applications running on the X (run in the default matchbox window >>> manager of my image). >>> >>> The QtQuick2 and consequently EGL/gles2 didn't at least yet work so great: >>> >>> root@nitrogen6x:~/helloworld# DISPLAY=:0 ./helloworld >>> Qt Warning: Could not find a location of the system's Compose files. >>> Consider setting the QTCOMPOSE environment variable. >>> Warning: EGL suggested using X Visual ID 33 (RGB565) for EGL config 28 >>> (RGB444), but this is incompatable >>> Unable to find an X11 visual which matches EGL config 28 >>> Could not initialize EGL >>> Aborted >>> >>> cheers, >>> Juha >>> >>>>> Thanks, >>>>> Eric >> _______________________________________________ >> meta-freescale mailing list >> meta-freescale@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/meta-freescale > _______________________________________________ meta-freescale mailing list meta-freescale@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-freescale