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

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

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                 [email protected]

For a local contact in

?  Europe, please contact Jeremy Delicato                   [email protected]

?  America, please contact Mike Ruiz                            [email protected]

时间: 2024-10-26 15:52:01

Adeneo Embedded: Building Qt 5.1 for Freescale i.MX6Introduction on LTIB的相关文章

Building QT projects from the command line

/************************************************************************ * Building QT projects from the command line * 说明: * 很多时候都是通过Qtcreator进行项目的创建以及编译,但是有时候可能 * 会遇到一些编译小问题,这时候命令行创建工程.编译工程可以作为测试.验证 * 的一种手段. * * 2016-3-2 深圳 南山平山村 曾剑锋 *************

Qt在各平台上的搭建qt-everywhere

Qt for windows7-64bit 在电脑上安装mingw(搜索mingw for windows),将C:\MinGW\bin添加进环境变量,打开命令行输入gcc --version和g++ --version和mingw32-make --version验证安装成功 解压qt-everywhere-opensource-src-4.8.1.tar.gz并进入目录 configure -debug-and-release -opensource -platform win32-g++

OpenSSL所有版本的变化,从1.1开始架构有所变化,生成的lib名称也有所不同了,以及对Qt的影响

The complete explanation is that 1.0.x and 1.1.x do not have the same naming conventions for the generated libraries. OpenSSL 1.1.x has moved into what they call the “unified build system” and changed themselves the names of the libraries. This was d

How To Compile Qt with Visual Studio 2010

This post is a step-by-step guide on how to compile Qt 4.x.x with MSVC 2010. Although we use Qt 4.7.1 as an example (for historical reasons), you can also find suggestions on building newer versions of Qt by MSVC 2012 and even by Intel Compiler for b

Compiling Qt 5.5.1 (With Qtwebkit) With Visual Studio 2015

I usually avoid writing articles about building a specific version of a software project but this time I need to archive it for later use and I believe it’s useful to my fellow programmers. Despite it’s been released for a while already, it seems the

QT--以共享的方式发布应用,QT依赖库

Building Qt as a Shared Library 因为:QT基本上都是采用动态编译的(被安装的OS中的),(如安装包往往都是默认动态编译处理好的动态库),所以我们采用动态连接的方式进行发布应用. 如果采用静态的方式发布,则需要重新通过对QT的源码进行“静态编译”后形成lib,或者obj的形式.然后安装在开发的系统中. <1>采用QTCreater继承开发环境编译,以及发布处理. 总体来说非常方便, (1)选择器以Debug或者Release形式构建 (2)先编译通过,完成bug修

Qt 学习第一步 做计划和确定目标

接下来開始一步步深入学习Qt. 学习的第一步是整理资料,也就是找书和sample. 逛了一些论坛,推荐以下3本书 1> C++ GUI programming with Qt 4(2nd Edition) 2> Fundations of Qt development. 3> The art of Building Qt Application 有了资料后.还必须制定学习目标. 依照难易,分为初,中,高 0基础:(入门) 目标: 1> 学会SDI框架 2> 学会文字,图片基本

How to build a GUI in ROS with Qt / C++

p { margin-bottom: 0.1in; direction: ltr; line-height: 120%; text-align: left; widows: 2; orphans: 2 } a:link { color: #0000ff } Overview A graphical user interface or GUI enables people especially end users to interactive with ROS through graphical

QT基础学习笔记

Qt简介:1991, 挪威奇趣科技Trolltech开发的跨平台c++图形用户界面(GUI)应用程序开发.2008,被诺基亚收购2012,转让给芬兰的Digia公司. 商业版:专业版,企业版: // 开源版(GNU) 优势:1.跨平台 2.面向对象 3.丰富API 类库  4.可视化编程 5,时间驱动机制 JAVA--compile once, run anywhere    一次编译,到处运行Qt-- wrire once ,comile anywhere     一次编写,到处编译 桌面操作