您的位置:首页 > 产品设计 > UI/UE

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

2015-06-09 09:55 453 查看

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 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: