Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6 – A white paper by Cuong Chou

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6 – A white paper by Cuong Chou

Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6 – A white paper by Cuong Chou

Introduction

Currently there is not an easy procedure to build Qt 5.1 with hardware acceleration support for Freescale i.MX6 platform. This document describes the steps necessary to download all the prerequisite oftware, build Qt 5.1 code and examples, and verify the hardware acceleration support status.

Required Software

1.     To start building, we need some development tools. This build is verified on LTIB (L3.0.35_4.0.0_130424_source.tar.gz downloaded from FreeScale website) and cross-compiled on a Ubuntu 12.04 64-bit PC. Verify that gpu-viv-bin-mx6q option is enabled in the LTIB configuration.
                   $ mkdir -p ~/BSP
                   $ cd ~/BSP
                   $ tar -xzvf L3.0.35_4.0.0_130424_source.tar.gz
 
2.     Download Qt 5.1.1 source code from the Qt-project website. Create a build directory and extract the content in it.
                   $ mkdir -p ~/Qt5
                   $ cd ~/Qt5
                   $ tar -xJvf qtbase-opensource-src-5.1.1.tar.xz

Build procedure:

1.     Enter the Qt5 build directory and create a configuration script as follows:
                  $ cd ~/Qt5/qt-everywhere-opensource-src-5.1.1/qtbase
                  $ vi config.imx6
                  #!/bin/sh
                  ./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- \
                 -no-pch -no-opengl -no-icu
                 -no-c++11 \
                 -opengl es2 \
                 -eglfs \
                 -compile-examples \
 
2.     Edit the device configuration to specify the root file system of the BSP. Make sure the config file contains lines that match with what lists below
                   $ cd ~/Qt5/qt-everywhere-opensource-src-5.1.1/qtbase/mkspecs/devices/linux-imx6-g++
                   $ vi qmake.conf
                   ROOTFS=/home/trainee/BSP/L3.0.35_4.0.0_130424_source/ltib/rootfs
                   QMAKE_INCDIR           += $$ROOTFS/usr/include
                   QMAKE_LIBDIR           += $$ROOTFS/usr/lib
                   QMAKE_LFLAGS           += -Wl,-rpath-link,$$ROOTFS/usr/lib
 
3.     Run the configuration script and make sure that Qt5 has openGL ES 2.0 support when it is complete. Note that you must run 'make confclean' to remove the previous configuration when any hanges are made to the script.
                $ ./config.imx6
                          This is the Qt Open Source Edition.
                          You are licensed to use this software under the terms of  the Lesser GNU General Public License (LGPL) versions 2.1.
                          You have already accepted the terms of the  license.
                          Creating qmake...
                           ….
                           ….
                           Support enabled for:
                           Accessibility  .......... yes
                           ….
                           OpenGL .................. yes (OpenGL ES 2.x)
                            ….
                           Qt is now configured for building. Just run 'make'.
            Once everything is built, you must run 'make install'.
            Qt will be installed into             /home/trainee/BSP/L3.0.35_4.0.0_130424_source/ltib/rootfs/usr/local/Qt5.1.1
            Prior to reconfiguration, make sure you remove any leftovers from
            the previous build.
 
4.     Do a build. Note that all the libraries are copied to the appropriate directories in the root file system.
                   $ make all -j8
                   $INSTALL_ROOT=/home/trainee/BSP/L3.0.35_4.0.0_130424_source/ltib/rootfs/ sudo
                   make install
       5.     Build the examples
               $ cd examples
               $ make
 
6.     Copy an example (hellogl_es2) used to demonstrate openGL ES to the root file system.
               $ sudo cp opengl/hellogl_es2/hellogl_es2
               /home/trainee/BSP/L3.0.35_4.0.0_130424_source/ltib/rootfs/
   Verify h/w acceleration support:
1.     Boot the board and verify that the galcore module is installed
              $ cat /proc/devices | grep galcore
              $ ls /dev/galcore
 
2.     Set up the required Qt environment
              $ export QT_PLUGIN_PATH=/usr/local/Qt-5.1.1/plugins/
       3.     Run the example. You shall see a rotating Qt logo on the display.
              $ cd /
              $ ./hellogl_es
Qtimage.jpg
      4.     Run top command and it shows the application running with a very low (0 – 1 %) cpu usage.
              $ top
                PID PPID USER     STAT   VSZ %VSZ CPU       %CPU COMMAND                     
                2820 2809  root         S         188m 21.5   0              0.7       ./hellogl_es2
About Adeneo Embedded
Adeneo Embedded provides system integration, design, support and training services to companies seeking world-class expertise in embedded solutions using high-performance architectures. For over
10 years, Adeneo Embedded has helped clients, in all stages of development; create profitable, feature-rich products that incorporate software and hardware solutions based on Android, Embedded Linux, Windows Embedded or Windows Mobile operating systems. Close working partnerships with industry-leading silicon and software vendors allow Adeneo Embedded to apply its experience to a wide range
of embedded solutions for the automotive, industrial, medical,  multi-media, navigation,  networking, mobile and wireless markets. Adeneo Embedded has a global sales and support network backed by engineering offices in North America and Europe.

Further information

For more information about Adeneo Embedded competences, products and services around Windows Embedded technologies:
Ä  visit Adeneo Embedded dedicated web site               www.adeneo-embedded.com
Ä  Adeneo Embedded General sales contact                 sales@adeneo-embedded.com
For a local contact in
Ä  Europe, please contact Jeremy Delicato                   jdelicato@adeneo-embedded.com
Ä  America, please contact Mike Ruiz                            mruiz@adeneo-embedded.com






Labels (1)
Comments

Hello:

     thanks for your share ,but follow your steps above,there is no error ,but when I run the demo

   $ ./hellogl_es

it appear

QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed

QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed

Segmentation fault

i don't know why ,can u help me

Thanks for looking at the paper.

I could see there are 2 potential causes to the problem you're seeing:

1. The galcore module is not installed or not installed properly.

2. The version of your kernel doesn't match the version of the Vivante GPU libraries. For example, if you are using a Linux 3.0.35 4.1.0, you need to have the Vivante GPU libraries 4.1.0 and not the version 4.0.0.

Hope this helps.

thanks for you replay,and last week ,I used 4.00 ltib ,and have no error!

Hello all,

Can you provide me LTIB 4.0.0 for imx6 Sabre?

I'm interesting to following this tutorial, but freescale only have available the latest version on your website.

Cheers

No ratings
Version history
Last update:
‎09-23-2013 06:39 PM
Updated by: