mag
01

Qt 4.6.2 installation procedure for FriendlyARM mini 2440 board

 

This tutorial will provide a simple list of steps necessary to compile and install Qt 4.6.2 on Mini 2440 friendly ARM board. Italian speaking people can read this tutorial on Qt-Italia community website.

The board is equipped with the default GNU/Linux operating system (kernel 2.6.29)

This guide has been tested on following GNU/Linux host distributions:

  • CentOS 5.4
  • Fedora 12
  • Ubuntu 9.10

Some problems were found on following host distributions:

  • Ubuntu 9.04
  • OpenSUSE 11.2

First of all you have to download the GCC toolchain provided by the supplier:

http://www.friendlyarm.net/dl.php?file=arm-linux-gcc-4.3.2.tgz

Now untar the tgz file:

tar -xzf arm-linux-gcc-4.3.2.tgz

and then copy the directory tree under

/usr/local/

Remember to export this path on your shell

export PATH=/usr/lcal/arm/4.3.2/bin:$PATH

Now we can download Qt

http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz

and untar and unzip the file on a local directory (example:  /home/user)

Now, before running the configure tool, you have to modify the qmake.conf file to inform Qt about your toolchain as described here:

File: mkspecs/qws/linux-arm-g++/qmake.conf

Now change following lines:

#QMAKE_CC = arm-linux-gcc

#QMAKE_CXX = arm-linux-g++

#QMAKE_LINK = arm-linux-g++

#QMAKE_LINK_SHLIB = arm-linux-g++

with:

QMAKE_CC = arm-none-linux-gnueabi-gcc

QMAKE_CXX = arm-none-linux-gnueabi-g++

QMAKE_LINK = arm-none-linux-gnueabi -g++

QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

Also change the following lines:

#QMAKE_AR = arm-linux-ar cqs

#QMAKE_OBJCOPY = arm-linux-objcopy

#QMAKE_STRIP = arm-linux-strip

with:

QMAKE_AR = arm-none-linux-gnueabi-ar cqs

QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy

QMAKE_RANLIB = arm-none-linux-gnueabi –ranlib

In order to avoid some illegal instruction on your ARM compiled application binaries, you have to deactivate compiler optimization:

File: /mkspecs/common/g++.conf

Change this line

QMAKE_CFLAGS_RELEASE += -O2

With:

QMAKE_CFLAGS_RELEASE += -O0

Now we are ready; in the Qt root subdirectory we run this command:

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix

/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support

-no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools

And then we can run the command

make

If everything is ok now we can do

make install

In order to run our ARM compiled applications we have to set following environment variables on the mini2440 board:

export TSLIB_TSEVENTTYPE=INPUT

export TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_TSDEVICE=/usr/input/ts

export TSLIB_CALIBFILE=/usr/etc/pointercal

export TSLIB_CONFFILE=/usr/etc/ts.conf

export TSLIB_PLUGINDIR=/usr/lib/ts

export LD_LIBRARY_PATH=/usr/local/Qt/lib

export QTDIR=/usr/local/Qt

export QWS_MOUSE_PROTO=tslib:/usr/input/ts

export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

The Qt library binary (and fonts subdir) shall be placed on a user defined directory of the mini 2440m board and then it is necessary to set LD_LIBRARY_PATH to this directory.

Qt binary application must be run with –qws command line argument to inform Qt that we are working on a Linux embedded system.

Using the described procedure I was able to compile Qt, qwt library and embedded widgets example.

YouTube Video demo: Embedded Widgets example

YouTube Video demo: Qwt examples:

I hope it will work for you.

Good Luck!

Paolo

Popularity: 1% [?]

  • OkNotizie
  • Upnews
  • Wikio



Puoi visualizzare il post originale qui.




Fatal error: Call to undefined function wp23_related_posts() in /home/tuxfeed/public_html/wp-content/themes/df_marine/index.php on line 68