Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6Introduction on LTIB

本文档介绍了为Freescale i.MX6平台构建带有硬件加速支持的Qt5.1的具体步骤。包括所需软件的下载、配置文件的编辑、构建过程及验证硬件加速支持的方法。

Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6Introduction

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

转载于:https://www.cnblogs.com/yechuang/p/4562642.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值