Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference

Operating Environment Pre-requisites

Introduction

Qtopia is not a complete operating system or environment. Instead, it is an application platform that sits above the Linux kernel and associated operating environment. As such, Qtopia expects certains libraries, device drivers and services to be exposed by the Linux environment within which it operates. This document covers the Linux environment configuration Qtopia requires.

Kernel

Qtopia supports both 2.4 and 2.6 series Linux kernels. Most code is common between the two, although some sections of Qtopia that interact with /proc/ file-system entries do differ. The selection between the 2.4 and 2.6 kernel code paths is made at runtime. That is, the same Qtopia build should run on both a 2.4 and 2.6 series Linux kernel.

Qtopia only relies on the most standard of kernel services. Among these required services are:

Libraries

Overview

This section covers the libraries needed to build and run Qtopia. It does not include a discussion of "standard" libraries, like the C runtime library, that may also be required.

Jpeg

Overview

Qtopia requires that Qt/Embedded is configured with JPEG support in order to build. Qt/Embedded relies on the "libjpeg" library, available from the http://www.ijg.org/ site.

Desktop Compilation

The libjpeg library can be downloaded and compiled from source by following the steps outlined at http://www.ijg.org/. Alternatively, most modern desktop Linux distributions include a pre-built version of libjpeg. The SuSE Linux distribution provides this in the aptly named "libjpeg" package.

Device Compilation

The JPEG source can be downloaded from http://www.ijg.org/.

libjpeg should be configured with the --target=arch option. If libjpeg.so is not copied to $QTDIR the -L option needs to be used when running Qt/Embedded's configure, as demonstrated below.

  cd $QTDIR
  ./configure -L/path/that/libjpeg/lives/in
  

Zlib

Qt/Embedded requires the zlib library. The Qt distribution includes a version of the zlib source that can be compiled into the Qt library. If integrators wish to use a later version of the zlib library, it can be downloaded from the http://www.gzip.org/zlib/ website.

Uuid

Overview

Qtopia relies on the Uuid library to generate 128-bit universally unique identifiers. The Uuid library is not provided with Qtopia, but is distributed as part of the "e2fsprogs" project, available from http://e2fsprogs.sourceforge.net/.

Failure to have libuuid installed will produce a build, or runtime, link error. For illustrative purposes, a build time link error is shown below.

  /usr/lib/gcc-lib/i586-suse-Linux/3.3.3/../../../../i586-suse-linux/bin/ld:
  cannot find -luuid
  

Desktop Compilation

The libuuid library can be downloaded and compiled from source by following the steps outlined at http://e2fsprogs.sourceforge.net/. Alternatively, most modern desktop Linux distributions include a pre-built version of libuuid. The SuSE Linux distribution provides this in the "e2fsprogs-devel" package, and the Debian distribution in the "uuid-dev" package.

Device Compilation

The libuuid source can be downloaded from http://e2fsprogs.sourceforge.net/.

libuuid should be configured with the --target=arch and --enable-elf-shlibs options. If libuuid.so is not copied to $QTDIR or $QPEDIR the -L option will need to be used when running Qtopia's configure.

For example:

  cd $QPEDIR
  ./configure -L/path/that/libuuid/lives/in
  

Linux Utilities

Overview

Where possible, Qtopia leverages standard Linux utility applications to help provide system functionality. These applications are invoked directly by the Qtopia runtime, and must be present on the target system.

Time

For Qtopia to maintain correct "time of day"-time, the device must support a hardware Real Time Clock. While Qtopia does not interact with this component directly, it relies on a number of standard Linux utilities that do:

  1. /sbin/hwclock

    Whenever Qtopia changes the "time of day" time setting, it executes /sbin/hwclock -systohc to synchronize the hardware time from the system time.

    Trolltech recommends that integrators compile their Linux kernel's with the RTC interface enabled. Doing so will allow the standard hwclock application to work correctly. It is also recommended that the system's boot scripts set the system time to hardware time on startup using the /sbin/hwclock -s command.

  2. atd

    Some Qtopia applications, such as the "Clock" application, rely on receiving notifications at specified times. As the device may be put into a suspended state, Qtopia relies on the Linux "at daemon" to wake the device at a given time.

    Qtopia schedules "at" jobs by writing them into the /var/spool/at/ directory. System integrators must ensure that the at daemon is launched at system startup, and monitors this spool directory.

Time conversion data

To ensure that Qtopia can convert time into various time zones the time zone information must be installed. Typically the zone info is installed in /usr/share/zoneinfo/ directory . See : the timezone man page

Linux Devices

Overview

Display

Qt/Embedded, the system component responsible for graphical drawing, provides a graphics device abstraction architecture. Support for new graphics accelerators can be added by creating a new Qt/Embedded graphics driver.

By default, Qt/Embedded comes with a number of prewritten graphics drivers. The most common of these is the "Linux Frame Buffer" driver, that, as its name suggests can draw to a standard Linux frame buffer. Most accelerated drivers are based on this frame buffer driver, and accelerate only a subset of drawing operations.

Trolltech recommends, at least initially, that integrators configure their device to support the standard Linux frame buffer interface, and expose this through the default /dev/fb0 device node.

Sound

Overview

Qtopia requires an Open Sound System (OSS) compatible sound device to be available. Qtopia can only interact with an Advance Linux Sound Architecture (ALSA) compatible device is OSS compatibility is enabled.

Playback and Recording Capabilities

Qtopia expects both the playback and recording device to be available through the /dev/dsp device node. The /dev/dsp node must be writable by Qtopia and the device should support the following IO controls:

The device must support both blocking and non-blocking IO.

Audio Volume

Qtopia uses the Open Sound System mixer interface to control system audio volume. Qtopia expects the mixer to be available through the /dev/mixer device node. Qtopia uses the following mixer channels to control volume:

Camera

The Camera application requires a kernel with Video4Linux version 1 support. Please refer to the official Video for Linux resources site for details about this API.

The Camera application expects the camera to be available through the /dev/video device node.

Development Environment

Compilers

Qtopia is built using a fairly standard subset of the C++ language. Trolltech has found a large number of compilers can successfully build Qtopia. In particular, the following versions of the GNU GCC compiler are known to work:


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.2.0