Qt5 with Qt3D over Wayland rootfs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Qt5 with Qt3D over Wayland rootfs

23,449件の閲覧回数
FranciscoCarril
Contributor V

First  Thanks to PrabhuSundararaj  for sharing his knowledge and tips to be able to accomplish all these steps.

With our new release of wayland coming soon, many of you would like to see it working with the latest Qt.  The process might sound complicated, but it is simpler than it seems.

Once you get in your hands the newest release sources then follow the MX6_Wayland_Weston_User_Guide_Review.pdf  for the instructions to install your Ltib and compile the rootfs.  I was successful creating the rootfs with Gnome profile selected.

Pay a lot of attention to step 8

8 Enabling Wayland/Weston Support for Prebuilt rootfs in

LTIB File System

The prebuilt root file system (rootfs) comes with prebuilt GPU driver. By default, it is set to EGL framebuffer. To enable

Wayland/Weston support, make EGL and GAL point to correct binaries as shown below:

$ ls –l $(ROOTFS)/usr/lib/libEGL.so

libEGL.so -> libEGL-wl.so

$ ls –l $(ROOTFS)/usr/lib/libGAL.so

libGAL.so -> libGAL-wl.so

The manual only advices to change libEGL.so link to libEGL-wl.so,  but you also have to change libEGL.so.1 link,  it should point to libEGL-wl.so as well.

ln -s  libEGL-wl.so  libEGL.so

ln -s  libEGL-wl.so  libEGL.so.1

ln -s  libGAL-wl.so  libGAL.so

Once building the rootfs is successful, please test that it boots correctly and start weston correctly.

$start-weston

$export LD_LIBRARY_PATH="/usr/lib"

$export XDG_RUNTIME_DIR="/tmp"

Proceed to QT5 build.  Please follow the guide to build QT5.

https://community.freescale.com/docs/DOC-94066

Pay attention that the rootfs now is the one created with the wayland release.

For example this  configure line:

./configure -opensource -confirm-license -make libs -device imx6 -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /home/b35153/waylandRootfs/ltib/rootfs -no-gcc-sysroot -prefix /opt/qt5wayland -no-pch -no-opengl -opengl es2 -no-xcb -make examples -make demos

After completing the guide, the next step is to build the Qtwayland plug-in.

1. Download the git repository for Qtwayland:

 

 

$ git clone git://gitorious.org/qt/qtwayland.git

   $ cd qtwayland


2. gedit src/plugins/platforms/qwayland-egl/qwayland-egl.pro

and make the change as like this, please be careful on not to break the syntax:

Delete these lines:

!contains(QT_CONFIG, no-pkg-config) {

    CONFIG += link_pkgconfig

    PKGCONFIG += wayland-egl egl

    } else {

    LIBS += -lwayland-egl -lEGL

}

Replace them with this line

LIBS += -lEGL

3. cd to <qtwayland directory>/qtwayland and run the qmake

(qmake should be in the PATH, or you can specify the full path to qmake)

$ qmake -r

   The qtwayland will test certain packages. The summary should look like this:

Checking for wayland... yes

Checking for xkbcommon... yes

Checking for brcm_egl... no

Checking for egl... yes

Checking for glx... no

Checking for wayland_egl... yes

Checking for xcomposite... no


If you have an error about the wayland-scanner not detected, disable the check at the qtwayland.pro


#!config_wayland_scanner {

#    error(QtWayland requires wayland-scanner)

#}


   4.  Build


make && sudo make install

Ater this step you should be able to run demos  using the wayland-egl platform like this:

$ ./forest_qml -platform wayland-egl

Now in order to install Qt3D follow this guide:

https://community.freescale.com/docs/DOC-94236

And

$./shaders -platform wayland-egl

Voila!

teapotQt.JPG

ラベル(1)
タグ(4)
23 返答(返信)

9,621件の閲覧回数
chengyong_xie
Contributor I

could you please give me some help, thanks.

follows are the details:

My platform is i_MX6QSABRELite, my rootfs come from www.timesys.com and my libEGL-wl.so come from ltib.

I haven't build weston because I want use qtcompositor.

when I use qtwayland(wayland-egl) to run qt application, it will crash with an error "failed to create display no such file or directory". could you give me some suggestions?

0 件の賞賛
返信

9,621件の閲覧回数
venkataraob
Contributor I

Hi Francisco, Satyanarayana murthy,

We are using LTIB release 4.0.0 on imx6q platform. We want to build and run QT5 wayland. Are you successful running hellogles2 example with wayland-egl plugin? Can you share the steps to build with LTIB-4.0.0?

Thanks,

Venkat

0 件の賞賛
返信

9,620件の閲覧回数
ortogonal
Contributor III

Has anyone successfully compiled the qtcompositor instead of using Weston?

I would like to use the qt-qml-compositor on the iMX6 CPU.

Thanks,

Erik Larsson

0 件の賞賛
返信

9,632件の閲覧回数
gavinux
Contributor I

Hi,

I tried to build qtwayland based on LTIB L3.0.35_4.0.0_130424_source.tar.gz(gnome profile) + QT5 from git for iMX6Q Sabre SD

This is what I did:

gavin@U12-Dev:~$ git clone git://gitorious.org/qt/qtwayland.git
Cloning into 'qtwayland'...
remote: Counting objects: 10650, done.
remote: Compressing objects: 100% (6953/6953), done.
remote: Total 10650 (delta 7159), reused 4766 (delta 2882)
Receiving objects: 100% (10650/10650), 2.02 MiB | 954 KiB/s, done.
Resolving deltas: 100% (7159/7159), done.
gavin@U12-Dev:~$ cd qtwayland/
gavin@U12-Dev:~/qtwayland$ git checkout -b qtwayland 77248e2765e4db5cd7fe6e53e07a612d75b91011
Switched to a new branch 'qtwayland'
gavin@U12-Dev:~/qtwayland$ vim src/plugins/platforms/qwayland-egl/qwayland-egl.pro
gavin@U12-Dev:~/qtwayland$ vim qtwayland.pro
gavin@U12-Dev:~/qtwayland$ ll ~/ltib/rootfs/usr/lib/*EGL*
-rwxr-xr-x 1 root root 87872 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libEGL-dfb.so*
-rwxr-xr-x 1 root root 90703 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libEGL-fb.so*
lrwxrwxrwx 1 root root    11 Jul 24 11:47 /home/gavin/ltib/rootfs/usr/lib/libEGL.so -> libEGL.so.1*
lrwxrwxrwx 1 root root    12 Jul 25 16:10 /home/gavin/ltib/rootfs/usr/lib/libEGL.so.1 -> libEGL-wl.so*
-rwxr-xr-x 1 root root 91627 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libEGL-wl.so*
-rwxr-xr-x 1 root root 86484 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libEGL-x11.so*
gavin@U12-Dev:~/qtwayland$ ll ~/ltib/rootfs/usr/lib/*GAL*
-rwxr-xr-x 1 root root 871596 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libGAL-dfb.so*
-rwxr-xr-x 1 root root 877071 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libGAL-fb.so*
lrwxrwxrwx 1 root root     12 Jul 25 16:10 /home/gavin/ltib/rootfs/usr/lib/libGAL.so -> libGAL-wl.so*
-rwxr-xr-x 1 root root 882566 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libGAL-wl.so*
-rwxr-xr-x 1 root root 907010 Jul 22 17:51 /home/gavin/ltib/rootfs/usr/lib/libGAL-x11.so*
gavin@U12-Dev:~/qtwayland$ /usr/local/qt-5/bin/qmake -r
Info: creating cache file /home/gavin/qtwayland/.qmake.cache
Checking for wayland... yes
Checking for xkbcommon... yes
Checking for wayland_scanner... no
Checking for wayland_egl... yes
Checking for egl... no
Checking for brcm_egl... no
Checking for glx... no
Checking for xcomposite... no
Reading /home/gavin/qtwayland/src/src.pro
Reading /home/gavin/qtwayland/src/plugins/plugins.pro
  Reading /home/gavin/qtwayland/src/plugins/platforms/platforms.pro
   Reading /home/gavin/qtwayland/src/plugins/platforms/wayland_common/wayland_common.pro
   Reading /home/gavin/qtwayland/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
Reading /home/gavin/qtwayland/examples/examples.pro
Reading /home/gavin/qtwayland/tests/tests.pro
Reading /home/gavin/qtwayland/tests/auto/auto.pro
  Reading /home/gavin/qtwayland/tests/auto/client/client.pro
gavin@U12-Dev:~/qtwayland$
gavin@U12-Dev:~/qtwayland$ make
cd src/ && ( test -e Makefile || /usr/local/qt-5/bin/qmake /home/gavin/qtwayland/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/home/gavin/qtwayland/src'
cd plugins/ && ( test -e Makefile || /usr/local/qt-5/bin/qmake /home/gavin/qtwayland/src/plugins/plugins.pro -o Makefile ) && make -f Makefile
make[2]: Entering directory `/home/gavin/qtwayland/src/plugins'
cd platforms/ && ( test -e Makefile || /usr/local/qt-5/bin/qmake /home/gavin/qtwayland/src/plugins/platforms/platforms.pro -o Makefile ) && make -f Makefile
make[3]: Entering directory `/home/gavin/qtwayland/src/plugins/platforms'
cd wayland_common/ && ( test -e Makefile || /usr/local/qt-5/bin/qmake /home/gavin/qtwayland/src/plugins/platforms/wayland_common/wayland_common.pro -o Makefile ) && make -f Makefile
make[4]: Entering directory `/home/gavin/qtwayland/src/plugins/platforms/wayland_common'
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ -c -pipe -mfloat-abi=softfp -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -fPIC -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_WAYLAND_WINDOWMANAGER_SUPPORT -DQT_WAYLAND_GL_SUPPORT -DQ_FONTCONFIGDATABASE -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/qt-5/mkspecs/devices/linux-imx6-g++ -I. -I../../../shared -I/home/gavin/ltib/rootfs/usr/local/qt-5/include -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtPlatformSupport -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtPlatformSupport/5.1.1 -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtPlatformSupport/5.1.1/QtPlatformSupport -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtGui -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtGui/5.1.1 -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtGui/5.1.1/QtGui -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtCore -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtCore/5.1.1 -I/home/gavin/ltib/rootfs/usr/local/qt-5/include/QtCore/5.1.1/QtCore -I.moc/release-shared -I/home/gavin/ltib/rootfs/usr/include -o .obj/release-shared/qwaylandwindowmanagerintegration.o windowmanager_integration/qwaylandwindowmanagerintegration.cpp
windowmanager_integration/qwaylandwindowmanagerintegration.cpp:43:51: fatal error: wayland-windowmanager-client-protocol.h: No such file or directory
compilation terminated.
make[4]: *** [.obj/release-shared/qwaylandwindowmanagerintegration.o] Error 1
make[4]: Leaving directory `/home/gavin/qtwayland/src/plugins/platforms/wayland_common'
make[3]: *** [sub-wayland_common-make_first-ordered] Error 2
make[3]: Leaving directory `/home/gavin/qtwayland/src/plugins/platforms'
make[2]: *** [sub-platforms-make_first] Error 2
make[2]: Leaving directory `/home/gavin/qtwayland/src/plugins'
make[1]: *** [sub-plugins-make_first-ordered] Error 2
make[1]: Leaving directory `/home/gavin/qtwayland/src'
make: *** [sub-src-make_first] Error 2
gavin@U12-Dev:~/qtwayland$

Why I don't have egl support as shown in the original post?

Why am I missing files when do make?

Please help, Thanks!!!

0 件の賞賛
返信

9,632件の閲覧回数
FranciscoCarril
Contributor V

Sorry to take so long to reply.

Just to clarify some things.

Are you using the Ltib Gnome  profile?

0 件の賞賛
返信

9,624件の閲覧回数
mohamedsarjoond
Contributor III

Hi,

I have build and compiled Qt for iMx6. I used Qt version 4.8 for building.

I have followed the build steps for Qt4.8 from the below link:

https://community.freescale.com/docs/DOC-94066

Below are the configure options I used:

./configure -qpa -arch arm -xplatform qws/linux-imx6-g++ -no-largefile -no-accessibility -opensource -verbose -system-libpng -system-libjpeg -system-freetype -fast -opengl es2 -egl -confirm-license -qt-mouse-tslib -qt-zlib -qt-libpng -no-webkit -no-multimedia -make examples -make demos -release -make libs -exceptions -no-qt3support -prefix /opt/qt4

I have successfully compiled and all were installed in the /opt/qt4 directory.

After booted my board,

when i run a demo from "/opt/qt4/examples/mainwindows/application/"

./application -platform eglfs &

The demo is successfully loaded but touch is not working. I can't able to give any input.

I have exported all the neccessary TSLIB options:


export TSLIB_ROOT=/usr

export TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_TSDEVICE=/dev/input/event0

export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts

export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf

export TSLIB_CALIBFILE=/etc/pointercal

export QWS_MOUSE_PROTO=Tslib:/dev/input/event0

export QWS_DISPLAY=LinuxFb:/dev/fb0

export set QT_QWS_FONTDIR=$QTDIR/lib/fonts/

My touch dirver and all are working fine..


I didn't get what I am doing wrong..

Does this anything to do with Eglfs platform.

Does Eglfs supports touch ?


Please any help regarding this will be helpful.


Thanks in advance.

0 件の賞賛
返信

9,632件の閲覧回数
gavinux
Contributor I

Yes. Iam using ltib gnome profile.

Gavin

On 2013-07-26 1:08 PM, "Francisco Alberto Carrillo Dominguez" <

0 件の賞賛
返信

9,632件の閲覧回数
FranciscoCarril
Contributor V

Gavin.

I am seeing the exact same error as you, right now I dont have a solution.

However I can see in my old  qtwayland build that I do have those files that are marked as missing in the new build.

So, somewhere in qtwayland commits they decided to remove those files i suspect.    The newer qtwayland needs wayland 1.1.0 ,  and ltib is installing wayland 1.0.3

So we need to work on an old qtwayland release for now. We should try that.

0 件の賞賛
返信

9,632件の閲覧回数
Jessie_Lee
NXP Employee
NXP Employee

Dear Francisco,

Would you please share the previous qtwayland source for wayland 1.0.3 (on ltib)?

thank you.

Jessie.lee

0 件の賞賛
返信

9,632件の閲覧回数
satyanarayanamu
Contributor I

Getting some errors while compiling qtwayland on imx gnome profile and it says qtwayland needs wayland 1.1.0 or greater. Is there a way i can get older qtwayland versions. Thnx for your help  in advance.

0 件の賞賛
返信

9,632件の閲覧回数
satyanarayanamu
Contributor I

Got successful in building qtwayland on imx6 current BSP. Steps followed:

1) Used LTIB to build wayland 1.1.0

2) Build the wayland scanner of wayland 1.1.0 manually.

3) using the wayland 1.1.0 and the wayland scanner, i was successful in building qtwayland plugin.

4)Ran the hellowindow qt application and observed 3 windows running qt logo.

Having explained above status,

one question,  was anyone sucessful in running the "hellogles2" application using qt wayland-egl plugin? I am getting application crash when i ran the application.

Any thougths...

Thnx in advance for help...

0 件の賞賛
返信

9,632件の閲覧回数
sanjeevsharma
Contributor IV

Hello

Are you able to run now hellogles2 example ?

Regard

Sanjeev

0 件の賞賛
返信

9,632件の閲覧回数
gavinux
Contributor I

Hi Francisco

Would you please send your qtwayland source code to me. I need a working

copy.

Thanks

Gavin

On 2013-07-31 12:34 PM, "Francisco Alberto Carrillo Dominguez" <

0 件の賞賛
返信

9,632件の閲覧回数
FranciscoCarril
Contributor V

I am seeing the same error, let me investigate what is going on.

0 件の賞賛
返信

9,632件の閲覧回数
minhyukoh
Contributor I

Hi, I am trying to build the Qt5 over wayland.

I followed what the post describes, but I got these message.

make[4]: Entering directory `/home/bread19/Work/Freescale/Qt5.0/qtwayland/src/plugins/platforms/wayland_common'

wayland-scanner client-header < ../../../3rdparty/protocol/wayland.xml > wayland-wayland-client-protocol.h

<stdin>:70: no interface name given

make[4]: *** [wayland-wayland-client-protocol.h] Error 1

make[4]: Leaving directory `/home/bread19/Work/Freescale/Qt5.0/qtwayland/src/plugins/platforms/wayland_common'

make[3]: *** [sub-wayland_common-make_first-ordered] Error 2

make[3]: Leaving directory `/home/bread19/Work/Freescale/Qt5.0/qtwayland/src/plugins/platforms'

make[2]: *** [sub-platforms-make_first] Error 2

make[2]: Leaving directory `/home/bread19/Work/Freescale/Qt5.0/qtwayland/src/plugins'

make[1]: *** [sub-plugins-make_first-ordered] Error 2

make[1]: Leaving directory `/home/bread19/Work/Freescale/Qt5.0/qtwayland/src'

make: *** [sub-src-make_first] Error 2

anyone can help with that?

Thanks.

0 件の賞賛
返信

9,632件の閲覧回数
minhyukoh
Contributor I

I solved the problem, it was the wayland-scanner binary problem.

I just built wayland-scanner manually, then it worked.

Thanks.

0 件の賞賛
返信

9,632件の閲覧回数
johannesschulte
Contributor I

Thank you for the very helpfull article. I managed to follow your guide and compile QT5 and QTWayland. However, when I start any example with the qtwayland backend, it crashed with a bus error. Could you tell me the exact git commit id, you used for qt5 and qtwayland?

Thank you in advance

0 件の賞賛
返信

9,632件の閲覧回数
FranciscoCarril
Contributor V

I checked with:

git rev-parse HEAD

This is the result for qtwayland:

77248e2765e4db5cd7fe6e53e07a612d75b91011

This is the result for qt5

2f8a096c9cf722978f7995097fd2807445898f58

0 件の賞賛
返信

9,632件の閲覧回数
markusito
Contributor I

Thanks a lot for this step by step guide. I managed to build QT5 and Qtwayland. However I cannot access the link to the Qt3D document. I always get an "Unauthorized" message. Do I need special access rights to download the mentioned document?

0 件の賞賛
返信

9,632件の閲覧回数
FranciscoCarril
Contributor V

Sorry, it was in a private space, but I just moved it to public space.  You should be able to access it once it gets approved.

Thanks

0 件の賞賛
返信