phyCORE-i.MX31
Qtopia Core

First download the package and extract it:

# tar xzf QtopiaCore.tgz

This will create the directory QtopiaCore within your current working directory.

IMPORTANT: This package contains the “Open Source Edition” of Qtopia Core which may not be used for developing closed-source applications. Contact Trolltech if you need to purchase a commercial license.

Target Libraries

We provide Qtopia Core with both touchscreen and keyboard input support. Only USB keyboards are supported, so you may want to connect a USB keyboard to your target before proceeding.

Run the following command to install a minimum set of Qtopia libraries and also some demo applications on your target:

# QtopiaCore/install-target.sh 192.168.3.11

Replace 192.168.3.11 with the actual IP address of your target. (The Board Support Packages provided by PHYTEC use 192.168.3.11 by default.)

You should log out and log in again to your target so that all necessary environment variables will be set. Furthermore, before using the touchscreen for the first time, it should be calibrated by executing ts_calibrate and following the instructions on the screen.

Several demo applications were installed to /usr/local/Qtopia-Demos. For example, run /usr/local/Qtopia-Demos/wiggly -qws (the switch -qws is needed by all stand-alone Qtopia programs). To quit a Qtopia application, you can . . .

If you want to remove all files that were installed by install-target.sh, invoke the following command:

# QtopiaCore/uninstall-target 192.168.3.11

Installing the Pre-Compiled Host SDK

To compile your own Qtopia applications, you need a full Qtopia Core installation on your host. The directory QtopiaCore/Trolltech contains a full, pre-compiled Qtopia Core environment which was built for openSUSE 10.0 (i386). (If you use a different system, you may have to compile the SDK yourself; see the next section on how to do this.)

Additionally, you need the tslib library for touchscreen support. These files are included in the Board Support Packages but for convenience are also available in the QtopiaCore/tslib-i.MX31 directory.

Both directories must be copied to /usr/local—you can run QtopiaCore/install-host.sh to do this. QtopiaCore/uninstall-host.sh will delete all files that were installed by QtopiaCore/install-host.sh.

Compiling the Host SDK Yourself

To compile your own Qtopia applications, you need a full Qtopia Core installation on your host. QtopiaCore/qtopia-core-opensource-src-4.3.3.tar.gz contains the complete Qtopia Core source code so you can compile the SDK yourself.

Additionally, you need the tslib library for touchscreen support. These files are included in the Board Support Packages but for convenience are also available in the QtopiaCore/tslib-i.MX31 directory.

Qtopia Core must be compiled using the arm-none-linux-gnueabi toolchain. This toolchain was installed by the setup on the CD, which is included with the phyCORE-i.MX31. See the Quickstart Manual for more details. This toolchain was installed to /opt/arm-none-linux-gnueabi. We have to make sure that it will be found by Qtopia by creating some symbolic links as follows:

# cd /opt/arm-none-linux-gnueabi/bin
# for F in arm-none-linux-gnueabi-*
> do
>   ln -s $F $(echo $F | sed s/arm-none-linux-gnueabi/arm-linux/g)
> done

Now copy the tslib library files to /usr/local and compile Qtopia Core by executing the following commands:

# cd QtopiaCore
# cp -R tslib-i.MX31 /usr/local
# tar xzf qtopia-core-opensource-src-4.3.3.tar.gz
# cd qtopia-core-opensource-src-4.3.3
# ./configure -embedded arm -xplatform qws/linux-arm-g++ \
              -qt-mouse-tslib \
              -L /usr/local/tslib-i.MX31/lib \
              -I /usr/local/tslib-i.MX31/src \
              && gmake && gmake install

Qtopia core will be installed to /usr/local/Trolltech/QtopiaCore-4.3.3-arm.

Now create a package that contains a minimum set of Qtopia libraries; QtopiaCore/TargetLibs.files lists all necessary files:

# tar czPpf TargetLibs.tgz $(cat QtopiaCore/TargetLibs.files)

Finally you can use QtopiaCore/install-target.sh, as described above, to copy the libraries to your target.

Compiling Your Own Applications

Qtopia Core and Qt/X11 are fully source-code compatible, and compiling Qtopia applications also works exactly the same as with Qt/X11:

# cd DirectoryContainingYourSourceCode
# qmake -project && qmake && make

All Qtopia Core libraries together occupy about 30 MB, and that's far way too big to fit on the i.MX31's root filesystem. By default, install-target.sh copies only those files that are necessary for every Qtopia application, that is:

If your application needs additional libraries, copy them manually from the host's /usr/local/Trolltech/QtopiaCore-4.3.3-arm/lib directory to /usr/local/Trolltech/QtopiaCore-4.3.3-arm/lib on the target.