Difference between revisions of "Qt/Embedded"

From ArmadeusWiki
Jump to: navigation, search
(Installation)
(Installation)
Line 42: Line 42:
 
  # make confclean
 
  # make confclean
  
Then configure, compile the same package with the virtual frame buffer. Additionally you must compile and install the ''qvfb'' and ''qconfig'' tools. Once done, install all these into the $ARMADEUS_ROOT_DIR/qt folder
+
Then as user, configure, compile the same package with the virtual frame buffer. Additionally you must compile and install the ''qvfb'' and ''qconfig'' tools. Once done, install all these into the $ARMADEUS_ROOT_DIR/qt folder
  
 
  # ./configure -depths 8,16,32 -no-cups -release  -qvfb -prefix $ARMADEUS_ROOT_DIR/qt/qvfb -no-qt3support
 
  # ./configure -depths 8,16,32 -no-cups -release  -qvfb -prefix $ARMADEUS_ROOT_DIR/qt/qvfb -no-qt3support

Revision as of 23:51, 19 November 2006

Instructions to install and use QtEmbedded & Qt virtual frame buffer for Armadeus

Introduction

This page will summarize the process to build, install and use Qtopia.

You will also find instructions to setup a Host development environment for simulating applications before deploying them on the target (Qt virtual frame buffer). The builroot tree must be installed before the installation of Qt.

Getting the packages

You must get the packages qtopia-core-opensource-src-4.2.0.tar.gz & qt-x11-opensource-src-4.2.0.tar.gz from the ftp server of the trolltech company as anonymous user (no password)

# ftp ftp.trolltech.com
# Name (ftp.trolltech.com:user): anonymous
# cd /qt/source
# get qtopia-core-opensource-src-4.2.0.tar.gz
# get qt-x11-opensource-src-4.2.0.tar.gz
# quit

or use the wget command:

# wget --user=anonymous ftp.trolltech.com:/qt/source/qtopia-core-opensource-src-4.2.0.tar.gz
# wget --user=anonymous ftp.trolltech.com:/qt/source/qt-x11-opensource-src-4.2.0.tar.gz

Installation

From now, we consider the variable ARMADEUS_ROOT_DIR as the root directory of the Armadeus SVN snapshot on your computer.

Copy and untar the downloaded packages into an installation folder called qt_installs:

# cd $ARMADEUS_ROOT_DIR
# mkdir qt_installs
# mv $DOWNLOAD_FOLDER/qtopia-core-opensource-src-4.2.0.tar.gz   \ 
   $DOWNLOAD_FOLDER/qt-x11-opensource-src-4.2.0.tar.gz $ARMADEUS_ROOT_DIR/qt_installs
# tar fxz qtopia-core-opensource-src-4.2.0.tar.gz
# tar fxz qt-x11-opensource-src-4.2.0.tar.gz

First you may optionally install/update Qt 4.2 on your system if is not installed yet....

# cd qt-x11-opensource-src-4.2.0
# ./configure
# make
# su root
# make install
# make confclean

Then as user, configure, compile the same package with the virtual frame buffer. Additionally you must compile and install the qvfb and qconfig tools. Once done, install all these into the $ARMADEUS_ROOT_DIR/qt folder

# ./configure -depths 8,16,32 -no-cups -release  -qvfb -prefix $ARMADEUS_ROOT_DIR/qt/qvfb -no-qt3support
# make
# make install
# cd tools/qvfb/ ; make
# install -m 755 -p ../../bin/qvfb $ARMADEUS_ROOT_DIR/qt/qvfb/bin
# cd ../qconfig ; make
# install -m 755 -p qconfig $ARMADEUS_ROOT_DIR/qt/qvfb/bin
# make confclean

Now, the essential: Qtopia

# cd qtopia-core-opensource-src-4.2.0
# ./configure -embedded arm -little-endian -depths 8,16,32 -no-cups -release -fast -qconfig medium \
    -prefix $ARMADEUS_ROOT_DIR/qt/qtopia.4.2.0
# make
# make install

I advise you to preserve the qt_installs/qtopia-core-opensource-src-4.2.0 installation folder. Indeed, you may install Qtopia again in the following cases:

  • You are using a new arm-linux-g++ compiler version
  • You need several different installation because you need different depths (bit per pixels for different LCD)
  • you want to resize the Qt libraries to save some space on your rootfs.

Usage

by default Qt is installed in /usr/lib/ directory of your target rootfs before launching Qt on the target, you should set following env variables to the right value: QTDIR, LD_LIBRARY_PATH, etc... You can do it automatically by sourcing the /etc/set_qt_env.sh script if you have modified it during installation.

# . /etc/set_qt_env.sh

Test the beast: Compile hello example (!! tricky) and copy it to your rootfs Launch it:

# /usr/bin/hello -qws

Qvfb

Qvfb (Qt Virtual Framebuffer) is a framebuffer emulator for your host/devt system. With it you can simulate your target and run your Qt/E programs on your PC before deploying them to your Armadeus board. To use it: - copy software/buildroot/package/qte_gpl/set_qt_env.sh script to yur home directory and edit it to have the right QTDIR path (for example: software/buildroot/build_arm_nofpu/qt_gpl/qt-2.3.10-x86/ ) - source it:

# source /home/julien/set_qt_env.sh

- go in software/buildroot/build_arm_nofpu/qt_gpl/qt-2.3.10-x86/ and launch Qvfb:

# qvfb -width 240 -height 320 &

- then go in examples and launch the program you want to test

# cd examples/hello/
# make
# ./hello -qws

Working examples with current configuration (Opie) are: buttongroups, cursor, customlayout, drawlines, forever, layout, life, lineedits, listbox, listcombobox, menu, popup, rot13, tetris, tictac

Cool ! no ? ;-)

Qtopia

! Not tested/supported yet ! Go here: [[1]] and ask for a free licence

Work in progress / to do list

  • Customisation of src/tools/config-qpe.h to have a custom Qt/E library well designed for Armadeus usage (currently we are using Opie's config
  • Creating support for a new device for compilation customization, cf qt-2.3.10/doc/html/install-qws.html (currenlty arm examples are not compiling automatically)

Links