Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
This document describes the commands required to run Qt Extended. It is assumed that the Qt Extended binaries have been installed using either:
Qt Extended can be run connected to either the Qt Virtual Framebuffer(QVFb) on a desktop or a real framebuffer on an embedded device. Running Qt Extended connected to the QVFb is ideal for developing code, debugging and demonstrating a product. However Qt Extended will need to be run on the embedded device to provide a clearer indication of performance and how well the embedded device's hardware interacts with Qt Extended.
Running Qt Extended on an embedded device requires different binaries from those used to run Qt Extended on the desktop. Creating binaries for an embedded device is not difficult and is done using a cross-compiler. This is handled in the Detailed Build Instructions section of the reference documentation. If you have installed an SDK package then you will find pre-built binaries for an embedded device in specific sub-directories, for instance /opt/Qtopia/SDK/<version>/greenphone. In an SDK package these binaries cannot be rebuilt. For a Qt Extended source package the binaries can be built in any configuration required.
If you only want to run Qt Extended on your desktop machine at this time, then the device-specific binaries are irrelevant. If you do want to run Qt Extended on a device then it is assumed that the binaries for that specific type of device are available.
If this is your first encounter with Qt Extended and/or cross-compiling then it might be best to start with experimenting on the desktop and when you are comfortable with that, start running Qt Extended on a device.
Qt Extended installs into the image directory but it expects to be run from the prefix directory. If you are unfamiliar with how these locations are handled, please see Image, prefix and SDK location.
If you are building against the Greenphone SDK, the image is located at /opt/Qtopia/SDK/<version>/<device>/image. Note that device is either x86 or greenphone.
If the prefix is not the same as the image, you will need to move your files before you can run them. Qt Extended cannot run from a directory other than the prefix.
There are no specific environment variables required to run Qt Extended, however there are some that can be set to control the Qt Extended feature set.
If you specified -no-rpath you will need to set LD_LIBRARY_PATH so that the libraries can be found.
Qt Extended does not require PATH to be set but third party applications may expect it to include <prefix>/bin.
You may wish to set some environment variables to configure Qt for Embedded Linux. You may also need to set QTOPIA_PHONE_DEVICE. See Qt Extended Environment Variables for details on how to set environment variables.
To run Qt Extended on the desktop a runqtopia script is provided. The exact location of the script depends on the package:
package | location |
---|---|
SDK package | /opt/Qtopia/SDK/scripts/runqtopia |
Source package | <qtextended-root-dir>/bin/runqtopia |
where <qtextended-root-dir> is the install location of the source package.
The runqtopia script is designed to ease the burden of running multiple Qt Extended versions on a single machine. It launches QVFb and ensures that Qt Extended can talk to it by setting QWS_DISPLAY. It also changes the value of HOME since running multiple Qt Extended versions with the same HOME directory can cause problems.
To quit Qt Extended and close all Qt Extended applications close the virtual framebuffer.
QVFb is run using a skin to make it feel more like a real device. A skin is simply a set of XML files that define the look and feel of QVFb. You may use a different skin, or create your own to replicate your target device. If you are not familiar with QVFb please refer to: Qt Extended QVFb before continuing.
In practice the runqtopia script can be used in all cases to conveniently start Qt Extended. In cases where the script does not perform as expected, it is is advisable to take the script as the starting point and modify the procedure to meet your specific requirements.
For further information and a description of environment variables used by the script, use the command:
runqtopia -help
For your convenience the options are reproduced here.
Note:
This section describes the procedure to run Qt Extended on a device and is the same for all Qt Extended builds.
Note: The $QWS_DISPLAY environment variable must specify a value for mmWidth and mmHeight so that the screen DPI can be correctly calculated.
Qt Extended can made available into the device in the following ways:
This section describes how to run Qt Extended on a device using an NFS mount partition.
To use an NFS mount partition your device requires a network connection with the desktop machine and accesses Qt Extended binaries on the desktop machine. The binaries must be cross-compiled for the device-type (e.g. ARM) and you control the start/stop of Qt Extended through a terminal connection to the device.
This approach is ideal for some debugging and testing on a real device. The binaries can be quickly modified and re-built and the application under test can be restarted almost instantly. It provides an efficient work process when compared with the delays introduced by building packages and the usually very slow upload and flash process required to run Qt Extended from a standalone device. Performance debugging should not be made using this technique, as the lag in network operations will hinder performace.
To setup the device, use command line tools (or whatever is available on the device) to setup the network configuration and use ifconfig to determine the IP address. Note: Network settings in Qt Extended can be used, however, you would need to exit that Qt Extended in order to run over the network.
To export the Qt Extended image directory to the device, execute the following commands on the desktop machine:
ps aux | grep nfs
Output will be something like this:
tester@desk:~> ps aux | grep nfs root 10661 0.0 0.0 0 0 ? SW 16:20 0:00 [nfsd] root 10662 0.0 0.0 0 0 ? SW 16:20 0:00 [nfsd] tester 10554 0.0 0.1 3540 564 pts/8 S 16:12 0:00 grep nfs
If you only get the bottom line, then NFS is NOT running and needs to be started.
To start NFS use /etc/init.d/nfsserver start (or similar command) as root.
/path/to/image/ *(ro)
This exports the /path/to/image directory (and all subdirectories), and gives read-only access from any computer. In this procedure it is assumed this is the directory you want to export.
exportfs -a
The Qt Extended binaries in /path/to/image/Qtopia/bin are now accessible from the network.
mkdir -p /opt/Qtopia
mount hostip:<path to Qt Extended image> -orsize=8192,wsize=8192,ro,nolock,tcp /opt/Qtopia
This is the ultimate goal and is mentioned here for completeness. However, this option is device specific and not within the scope of this introduction.
As a general rule Qt Extended (or any other application) can be flashed onto a device using a CF or SD card or can be uploaded onto the device using a serial connection. Usually this means the image (for example, <path to Qt Extended image>) must first be packed into a special file such as initrd.bin. This file is uploaded and flashed into the device flash memory. The correct procedure is entirely dependent on the device used and cannot be described here. Please refer to the device manufacturers documentation for details of installing to the device.
Once the software is installed on the device the general rule is to reboot the device and the Linux boot script will ensure that Qt Extended is started automatically. If this doesn't work it is a system integration task to modify the relevant boot scripts.
From a Qt Extended perspective, running Qt Extended on a device means: power on the device and off you go!
For more information about system integration refer to System Customization.
When building Qt Extended for a touchscreen device, the touchscreen must be calibrated manually as Calibration is not run automatically. With Qt Extended running, enter the following command to start calibration:
qcop service send Launcher "execute(QString)" "calibrate"
This outputs calibration information to the /etc/pointercal file.
See also: System Customization.
Qt Extended provides the GUI software that runs on a mobile phone. To make a real phone call the electronics need to connect to a phone network. These electronics are assumed to be in the phone device itself. This section describes how the Qt Extended Phone software can be connected to the phone device hardware.
The phone simulator is an internal tool used to test part of the Qt Extended Phone functionality. It simulates part of the modem functionality and is the first step in debugging software. The simulator has been included in the package because it is well suited to illustrating the capabilities of Qt Extended. Please be advised however that the phone simulator is an unsupported tool.
Connect Qt Extended to the simulator using the following command:
export QTOPIA_PHONE_DEVICE=sim:localhost
This must be set before either Qt Extended or the simulator are started. If the runqtopia script is used, the default value for the environment variable QTOPIA_PHONE_DEVICE is sim:localhost. It is possible to run Qt Extended on one machine (embedded device) and the phone simulator on another machine. To do this replace localhost with the name of the machine on which the phonesim is running.
Note: The phone simulator can be build for either the development host or the target.
Further phone simulator information is available in the Tools section of the reference documentation.
Qt Extended can be connected to a real phone device using a serial connection. Please be advised that the phone device must support the standard AT commands. To connect use the following command:
export QTOPIA_PHONE_DEVICE=/dev/ttyS1:115200 export QTOPIA_PHONE_VENDOR=wavecom
where:
When using Qt Extended connect to a modem the environment variables QTOPIA_PHONE_DEVICE and QTOPIA_PHONE_VENDOR must be set before Qt Extended is started. Entering a baud rate after the serial port name is optional and depends on the modem being used. It is not necessary to start the phonesim application.
If you wish to start Qt Extended with multiplexing disabled then use the following command before starting Qt Extended:
export QTOPIA_PHONE_MUX=no
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |