Friday, August 24, 2012

Qt5 build process for i.MX 5x -- important update!!

A short howto how to build Qt5 for Freescale i.MX 5x


The original post here  is completely outdated!!


Right now you only need a sys root with the GLES headers/libraries in it.
Then configure/build for linux-arm-g++. That's it!
Simple and fun!!



Prerequisites:


A recent ltib envioronment , that you configured and built for your target. You are going to use the rootfs for the Qt5 dependencies. If you at a later stage want to build webkit you also need libicu for your target installed in your rootfs. If you want GLES functionality EGL and GLES2 needs to be in the rootfs. 

1) Get the latest Qt5 from the official GIT repository:
    git clone git://gitorious.org/qt/qt5.git qt5
2) Create a build directory somewhere , for example :
  /home/micken/qtbuild
3) Go to the your newly cloned Qt5 tree and do the following command:
   perl init-repository
   This will download the sourcecode.
3) Inside the sourcetree you can find a directory called qtbase. 
   This directory looks like the root directory of a Qt4x source tree.
4) Find the file  mkspecs/devices/linux-imx6-g++/qmake.conf inside qtbase.
5) Edit it to find your toolchain and rootfs. In order to build for i.MX
   5x you need to comment out EGLFS_PLATFORM_HOOKS_SOURCES.
   Note the configure line at the top of the file and copy it to a textfile
   and modify it to reflect your environment.
6) Go to your created build directory and issue the configure script from the
   with the textfile you created. ( sh /path/to/qt5/qtbase/yourtextfile )
7) After this you should be able to just do make;make install
8) The other libraries / examples can be built by using your installed Qt
   make sure it uses the qmake from the installed Qt.
9) To install Qt5 on target , make a directory named the same as your
   installation path (important) and copy the lib and plugins directories to it.
10) Try some examples ,you can start them like this:
   ./hellogl_es2 -platform eglfs.

Have fun with Qt5. I am working on a new graphics platform plugin that will integrate 2D and 3D on the i.MX. More about that later.

5 comments:

sivamuthaiah said...

Hi,

I successfully compiled Qt 5.0.0 for IMx53 Board.(I used free scal gcc 4.4.4 version).

I configured with -eglfs and -opengl es2 options.
My cross compilation was successful.

When I run application , i got below error message.

./hellogl_es2 -platform –eglfs

Color formats don't match. Falling back to copy forward swap.
This plugin does not support propagateSizeHints()
This plugin does not support setParent!
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.

Color formats don't match. Falling back to copy forward swap.

Color formats don't match. Falling back to copy forward swap.

Color formats don't match. Falling back to copy forward swap.
This plugin does not support setParent!
This plugin does not support setParent!This plugin does not support setParent!
This plugin does not support setParent!
This plugin does not support setParent!
This plugin does not support setParent!
This plugin does not support propagateSizeHints()

Color formats don't match. Falling back to copy forward swap.

QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
Color formats don't match. Falling back to copy forward swap.

Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
Color formats don't match. Falling back to copy forward swap.
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful."
Unable to handle kernel paging request at virtual address 0618f004
pgd = 9d68c000
[0618f004] *pgd=00000000

Please suggest me how to solve the above problem.

Regards,

S.Muthaiah

sivamuthaiah said...

Qt 5.0 Cross Compile App launch issue in IMx53 Board.

sivamuthaiah said...

Qt 5.0 in Imx 53 Board

Gaga said...

Unable to compile with OpenGL ES 2.0 for i.MX53 Quick Start Board R
Error:

The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/gaga/z/installed/QT_ARM/qt-everywhere-opensource-src-5.0.2/qtbase/mkspecs/devices/linux-imx6-g++.
*** qtbase/configure exited with non-zero status.

Used command:

/home/gaga/z/installed/QT_ARM/qt-everywhere-opensource-src-5.0.2/configure -opensource -confirm-license -make libs -qt-xcb -opengl es2 -device imx6 -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi- -sysroot /home/gaga/z/installed/ltib/rootfs -no-gcc-sysroot -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1

There are no errors without opengl es. I need to run QtQuick2 application that would not work without opengl es. Please help me.

Gaga said...

Unable to compile with OpenGL ES 2.0 for i.MX53 Quick Start Board R
Error:

The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/gaga/z/installed/QT_ARM/qt-everywhere-opensource-src-5.0.2/qtbase/mkspecs/devices/linux-imx6-g++.
*** qtbase/configure exited with non-zero status.

Used command:

/home/gaga/z/installed/QT_ARM/qt-everywhere-opensource-src-5.0.2/configure -opensource -confirm-license -make libs -qt-xcb -opengl es2 -device imx6 -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi- -sysroot /home/gaga/z/installed/ltib/rootfs -no-gcc-sysroot -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1

There are no errors without opengl es. I need to run QtQuick2 application that would not work without opengl es. Please help me.