Building Qt for DM365

Installing the Qt Demos

This section closely follows Building Qt for ARM only devices.

  • Download Qt from here. Grab the “Framework Only” version (not the “Complete Development Environment”).
  • Untar the download somewhere in your filesystem:
$ tar xzf qt-everywhere-opensource-src-4.6.0.tar.gz
  • Create a copy of the directory containing qmake.conf for ARM:
cp -R [qt-install-dir]/mkspecs/qws/linux-arm-g++/ [qt-install-dir]/mkspecs/qws/linux-dm365-g++/
  • Modify the file mkspecs/qws/linux-omapl1-g++/qmake.conf appropriately. Make sure to include the correct paths for QMAKE_INCDIR and QMAKE_LIBDIR to ensure touchscreen support. For example:
#
# qmake configuration for building with arm-linux-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = arm_v5t_le-gcc
QMAKE_CXX               = arm_v5t_le-g++
QMAKE_LINK              = arm_v5t_le-g++
QMAKE_LINK_SHLIB        = arm_v5t_le-g++

#modifications to include ts-lib
QMAKE_INCDIR            = /home/user/workdir/dm365/usr/include
QMAKE_LIBDIR            = /home/user/workdir/dm365/lib

# modifications to linux.conf
QMAKE_AR                = arm_v5t_le-ar cqs
QMAKE_OBJCOPY           = arm_v5t_le-objcopy
QMAKE_STRIP             = arm_v5t_le-strip

load(qt_config)
  • Run the configure script with the following options (prefix should point to the path where qt-embedded will be installed on the root filesystem):
$ ./configure -prefix /opt/qt-embedded -embedded arm -platform /qws/linux-x86-g++ \
-xplatform /qws/linux-dm365-g++ -depths 16,24,32 -no-cups -no-largefile -no-accessibility \
-no-openssl -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp \
-plugin-mouse-pc –fast -qt-mouse-tslib

Note:

  1. “-prefix” <PATH> option in the configure above points to the path inside the rootfs where qt-e will be installedon Target FileSystem
  2. ‘”-platform ‘/qws/linux-x86-g++” in configure above assumes your host machine CPU to be of 32-bit. For 64-bit, use “-platform /qws/linux-x86_64-g++”
  3. For TouchScreen, you need to append the configure options “-qt-mouse-tslib” in above mentioned recommended options
  • Compile and install (This can take a long time)
$ gmake
$ gmake install
  • Add the following lines to the /root/.profile file on the target
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFb:/dev/fb2

Running the Qt Demos

  • Once booted, use the following commands to run a demo (It is assumed you installed qt-embedded in the /opt/qt-embedded directory:
# export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/opt/qt-embedded/lib
# ./<Demo Name> -qws

留下评论