This chapter describes the necessary installations on your desktop. It includes the description of the installation and compile processes for the cross-compiler including the ARM kernel as well as the installation of all necessary QT / QTE / QVFB packages.
The cross-compiler is used to generate code for your iPAQ on your LINUX desktop. To be able to comile the QT / QPE ARM versions, as well as the ARM-kernel, you need to install the cross-compiler first.
The ARM-kernel is used to check, whether your ARM application fits the iPAQ kernel requirements. In fact you would only need the inlude- and lib- directory. But you should compile the kernel to be sure to hav no conflicts running your new programs on th iPAQ.
This chapter describes, what has to be prepared to compile the tools necessary, as well as to compile your iPAQ programs. There are some modifications necessary on your .bashrc. Beneath that, some scripts have to be installed.
The idea is to have some shell-variables, that control some "platform"-dependent configurations for the cross-compilers. The next chapters describe the different entries and scripts.
You should run a bash to be able to use the following scripts. The changes should
be either done for your (user-) files as well as for the user root
(needed to compile the kernel and QT/QPE libraries)
You can download some examplefiles http://www.uv-ac.de/ipaqhelp/scripts.tar.gz. This files can be adopted to your needs.
The following entries have to be added to your .bashrc-file and the .bashrc-file for root.
Together with the scripts below, they make it very easy to change between the different
compiling environments.
If you logout and login again, the aliases are valid. You can enter qtarm to
enable the shell variables for arm-development.
Note !!
If you dont use bash as your shell, you might adopt the scripts to your favorite shell.
# save LD_LIBRARY_PATH to not recuresively use it
# when using the .goxxrc files
export LD_LIBRARY_PATH_SAVE=$LD_LIBRARY_PATH
# runs the .goqtarmrc script
alias qtarm='/bin/bash --rcfile ~/.goqtarmrc'
# runs the .goqtopierc script
alias qtopie='/bin/bash --rcfile ~/.goqtopierc'
# runs the .goqtopieembrc script
alias qtopieemb='/bin/bash --rcfile ~/.goqtopieembrc'
# runs the .goqtembrc script
alias qtemb='/bin/bash --rcfile ~/.goqtembrc'
# runs the .goqtx11rc script
alias qtx11='/bin/bash --rcfile ~/.goqtx11rc'
# TMAKE is used for some QT-compilations (like the linguist).
# you can retrieve the tmake-package from
# <htmlurl url="http://www.trolltech.com" name = "http://www.trolltech.com">
TMAKEPATH=/usr/lib/tmake/linux-g++
export TMAKEPATH
This script sets the required shell-variables for X11-development. It is an example for my own installation. You can modify it to your needs.
#!/bin/bash
#
# .goqtx11rc
# 14.09.02 - sc V1.3
# -------------------------------------------------
# sets some Environment variables for QT X11
# compiling
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your compiler
# is located (for the embedded its not necessary).
# It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/src/linux
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=
# QTDIR is the directory, where the QT-Directory is located.
QTDIR=/usr/lib/qt2
# PATH has to be added by QTDIR bins.
PATH=$QTDIR/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
# LD_LIBRARY_PATH extended for runups
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH_SAVE
export COMPILER_PATH LD_LIBRARY_PATH KERNEL_PATH
export QTDIR PATH MANPATH
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=o
SO_EXT=so
LIB_EXT=so
HEADER_EXT=h
CPP_EXT=cpp
export _EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
# to your Makefiles
# QPEINC_PATH=/opt/qpe-1.3.1/library
EXTRA_INC_PATH=-I/usr/X11R6/include \
-I$QTDIR/include \
-I$KERNEL_PATH/include \
-I/usr/local/include
EXTRA_LIB_PATH=-L$KERNEL_PATH/lib \
-L$QTDIR/lib \
-L/usr/local/lib
export EXTRA_INC_PATH EXTRA_LIB_PATH
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib
INC_INST_PATH=/usr/local/include
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD=$COMPILER -E
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CCX CXX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB=-lqt
export XT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
OPTIONS=-fno-exceptions -pipe
export OPTIONS
# set the prompt ...
PS1=[QT-X11]$PS1
This script sets the required shell-variables for Embedded-development. It is an example for my own installation. You can modify it to your needs.
#!/bin/bash
#
# .goembrc
# 14.09.02 - sc V1.3
# -------------------------------------------------
# sets some Environment variables for QTOPIA
# compiling
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your compiler
# is located (for the embedded its not necessary).
# It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/src/linux
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=/usr/local/bin
# QTDIR is the directory, where the QT-EMBEDDED-Directory is located.
QTDIR=/usr/lib/qt2e
# QPEDIR is the directory, where the QPE-EMBEDDED-Directory is located.
QPEDIR=/usr/lib/qpe
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
# LD_LIBRARY_PATH extended for runups
LD_LIBRARY_PATH=/usr/local/lib-emb:$LD_LIBRARY_PATH_SAVE
export COMPILER_PATH LD_LIBRARY_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH QPEDIR
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=emb.o
SO_EXT=emb.so
LIB_EXT=emb.so
HEADER_EXT=emb.h
CPP_EXT=emb.cpp
export _EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
# to your Makefiles
EXTRA_INC_PATH=-I$QPEDIR/library \
-I$QTDIR/include \
-I$KERNEL_PATH/include \
-I/usr/local/include-emb
EXTRA_LIB_PATH=-L$QTDIR/lib \
-L$QTDIR/lib \
-L$KERNEL_PATH/lib \
-L/usr/local/lib-emb
export EXTRA_INC_PATH EXTRA_LIB_PATH
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-emb
INC_INST_PATH=/usr/local/include-emb
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD=$COMPILER -E
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB=-lqte -lqpe
export XT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
OPTIONS=-DQWS -fno-exceptions -fno-rtti -pipe
export OPTIONS
# set the prompt ...
PS1=[QT-EMB]$PS1
This script sets the required shell-variables for ARM-development. It is an example for my own installation. You can modify it to your needs.
#!/bin/bash
#
# .goqtarmrc
# 14.09.02 - sc V1.3
# -------------------------------------------------
# sets some Environment variables for QT ARM
# Crosscompiling
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=/usr/local/arm-linux
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/local/linux-arm-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=/usr/local/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=/usr/lib/qt2arm
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=/usr/lib/qpearm
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH
export QPEDIR
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
# to your Makefiles
EXTRA_INC_PATH=-I$QPEDIR/library \
-I$QTDIR/include \
-I$KERNEL_PATH/include \
-I$/usr/local/include-arm
EXTRA_LIB_PATH=-L$QTDIR/lib \
-L$KERNEL_PATH/lib \
-L$/usr/local/lib-arm
export EXTRA_INC_PATH EXTRA_LIB_PATH
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD=$COMPILER -E
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB=-lqte -lqpe
export XT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
OPTIONS=-DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti -pipe
export OPTIONS
# set the prompt ...
PS1=[QT-ARM]$PS1
This script sets the required shell-variables for OPIE-development. It is an example for my own installation. You can modify it to your needs.
#!/bin/bash
#
# .goqtopierc
# 14.09.02 - sc V1.3
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=/usr/local/arm-linux
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/local/linux-arm-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=/usr/local/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=/usr/lib/qt2opie-arm
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=/usr/lib/opie-arm
OPIEDIR=/usr/lib/opie-arm
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
# to your Makefiles
EXTRA_INC_PATH=-I$QPEDIR/library \
-I$QTDIR/include \
-I$OPIEDIR \
-I$OPIEDIR/libopie \
-I$KERNEL_PATH/include \
-I$/usr/local/include-arm
EXTRA_LIB_PATH=-L$QTDIR/lib \
-L$KERNEL_PATH/lib \
-L$/usr/local/lib-arm
export EXTRA_INC_PATH EXTRA_LIB_PATH
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD=$COMPILER -E
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB=-lqte -lqpe -lopie
export XT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS=-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe
export OPTIONS
# set the prompt ...
PS1=[QT-OPIEARM]$PS1
This script sets the required shell-variables for OPIE-development using qvfb. It is an example for my own installation. You can modify it to your needs.
#!/bin/bash
#
# .goqtopieembrc
# 14.09.02 - sc V1.3
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (emb)
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/src/linux
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=/usr/local/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=/usr/lib/qt2opie-emb
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=/usr/lib/opie-emb
OPIEDIR=/usr/lib/opie-emb
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
# LD_LIBRARY_PATH extended for runups
LD_LIBRARY_PATH=/usr/local/lib-emb:$LD_LIBRARY_PATH_SAVE
export COMPILER_PATH LD_LIBRARY_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=emb.o
SO_EXT=emb.so
LIB_EXT=emb.so
HEADER_EXT=emv.h
CPP_EXT=emb.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
# to your Makefiles
EXTRA_INC_PATH=-I$QPEDIR/library \
-I$QTDIR/include \
-I$OPIEDIR \
-I$OPIEDIR/libopie \
-I$KERNEL_PATH/include \
-I$/usr/local/include-emb
EXTRA_LIB_PATH=-L$QTDIR/lib \
-L$KERNEL_PATH/lib \
-L$/usr/local/lib-emb
export EXTRA_INC_PATH EXTRA_LIB_PATH
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-emb
INC_INST_PATH=/usr/local/include-emb
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD=$COMPILER -E
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB=-lqte -lqpe -lopie
export XT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS=-DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe
export OPTIONS
# set the prompt ...
PS1=[QT-OPIEEMB]$PS1
There are several crosscompilers (so called toolchains) available. You can find them e.g. at Handhelds.org.
As I started with a Lisa iPAQ (including a development CD), I used their proposal, the netwinder toolchain. It only has to be copied to e.g. /usr/local/arm-linux.
You can also load it from netwinder.org, which unfortunatly is not yet up again at this time. You need the following packages.
You just have to install the packages using rpm. Become superuser and enter
rpm -U cross-arm-binutils*rpm and so on with the other files.
You find the arm-linux utils in /usr/local/arm-linux.
If you want to use the Netwinder compiler, you have to change your .goqtarmrc file (described in
.goqtarmrc). Change the COMPILER_PATH entry to
/usr/local/arm-linux.
Additional, you have to add the /usr/local/cross/arm-linux/lib entry into your /etc/ld.so.conf
and run ldconfig once.
Important Hint
================================================================================
I dont know why, but the compiler dir (and all files below that dir ?) have to belong
to your user and group account. So change to /usr/local and enter chmod -R youruser.group arm-linux.
If not done, the linker may not find any extra libs.
================================================================================
I tried also the SuSE crosscompiler. This is downloadable from SuSE crosscompiler.
Also you can install it directly via yast. Just enter yast (or yast2)
and choose installation method as FTP.
Connect your host to the internet and confirm the FTP-update. YAST will get the list of available updates form the Suse-host (ftp.suse.com). After that is done (several MBytes) you can choose the Cross-Compiler for ARM from the dev-packages. Please load
As this is approx. 40MByte, this takes some time :(.
If you loaded them manually (as I did), you just have to install them using rpm.
Become superuser and enter rpm -U cross-arm-binutils*rpm and so on with the other files.
The installation is done in /opt/cross. You find the arm-linux utils in
/opt/cross/arm-linux.
As the zlib is missing (and necessary for the iPAQ), you have to get that into your arm-lib tree.
I could not find out where to find it, so I used the one from the Lisa distribution. You can load
that from my page ( see
Introduction ). Just tar xvfz zlib-lisa.tar.gz and
copy the lib-entries into opt/cross/arm-linux/lib and the headers z*.h into
/opt/cross/arm-linux/include. Enter the arm-lib directory, remove libz.so and libz.so.1
and create links for that using ln -s libz.so.1.1.2 libz.so and
ln -s libz.so.1.1.2 libz.so.1.
If you want to use the SuSE compiler, you have to change your .goqtarmrc file (described in
.goqtarmrc). Change the COMPILER_PATH entry to
/opt/cross/arm-linux.
Additional, you have to add the /opt/cross/arm-linux/lib entry into your /etc/ld.so.conf
and run ldconfig once.
Now the comilation should work.
I tried also the Trolltech SDK toolchain, which maybe required for the qtopia contest. This is downloadable for contest members from Trolltech crosscompiler if you are a contestant.
You get one single rpm-file, that can be install using
rpm -Uv *.rpm (as superuser).
The installation is done in /usr/local/arm.
As the zlib is missing (and necessary for the handheld), you have to get that into your arm-lib tree.
I could not find out where to find it, so I used the one from the Lisa distribution. You can load
that from my page ( see
Introduction ). Just tar xvfz zlib-lisa.tar.gz and
copy the lib-entries into /usr/local/arm/lib and the headers z*.h into
/usr/local/arm/include. Enter the arm-lib directory, remove libz.so and libz.so.1
and create links for that using ln -s libz.so.1.1.2 libz.so and
ln -s libz.so.1.1.2 libz.so.1.
If you want to use the Trolltech compiler, you have to change your .goqtarmrc file (described in
.goqtarmrc). Change the COMPILER_PATH entry to
/usr/local/arm.
Additional, you may add the /usr/local/arm/lib entry into your /etc/ld.so.conf
and run ldconfig once or add it to your $LD_LIBRARY_PATH.
Attention !!!
If you do so, you may loose terminal accessabillity, because your running linux searches
for libc and so on and may find the arm versions first. On my machine I decided
not to use this method, which requires, to add a -L/usr/local/arm/lib to
every make file (using configurations).
The netwinder and SuSE systems dont hav this problem.
Always if you want to extend or reduce functionality in your ARM-kernel, you have to recompile it with your cross-compiler. This chapter describes, how to do that.
As I always need to use a special PCMCIA-card, which requires the memory_cs module, which is not included in the kernel-tree, but found in the pcmcia sources, I try to describe, how I get the compilation of the PCMCIA-modules working.
Grab the kernel-sources from handhelds.org. You find them e.g. under
ftp://lorien.handhelds.org/pub/linux/feeds/demo/.
Copy the tarball into /usr/kernel and extract it using tar xvfz somekernel.tar.gz.
Set a link /usr/local/linux-arm-kernel to the kernel using
"ln -s /usr/kernel/somekernel.x.y.z/kernel /usr/local/linux-arm-kernel".
To get the newest (or an older) version of the kernel sources, you may use the anonymous CVS access. This chapter describes, how to get and prepare the sources for kernel 2.4.16-rmk1-hh15 (familiar 0.5.3).
export CVSROOT=:pserver:anoncvs@cvs.handhelds.org:/cvscvs login. Enter the required password anoncvs. You
should be looged in.cvs co linux/kernel will prepare your linux/kernel repository.cvs co -r K2-4-16-rmk1-hh15 linux/kernel grab the sources from
the kernel repository.
Become superuser, enter the subdir linux/kernel and type
make h3600_config;make old_config
to get the config done for the h3600 ipaq.
Type qtarm to get all necessary environment variables set.
Type make dep clean bzImage modules and drink some coffee (it may take hours).
Enter make modules_install (they are standardwise are installed into /lib/modules/kernelversion).
If you dont want that, you can set $INSTALL_MOD_PATH as a prefix.
After the kernel is ready, and the link is remade,
the kernel can be found in /usr/local/linux-arm-kernel/arch/arm/boot.
The file bzImage is a new kernel binary.
To install it, you have to reflash the kernel-partition (for familiar0.4) or to load the kernel
to the /root partition (from familiar 0.5). Dont forget the kernel-modules. Copy them
from /lib/modules/kernel-version to your handheld and call depmod there.
After a reboot, the new kernel should hopefully work :).
Grab the pcmcia package from
sourceforge.org.
Just search for pcmcia and download the source tarball. Extract it, enter the source
directory and type make clean. Remove config.out and edit config.in. Insert the
compiler and linker names and the correct path, as well as the ARCH entry. The next paragraph
shows an example config.in.
#
# config.in 1.18 2001/02/09 04:03:37 (David Hinds)
#
LINUX=/usr/local/linux-arm-kernel
PREFIX=
MODDIR=
UCC=arm-linux-gcc
KCC=arm-linux-gcc
LD=arm-linux-ld
PCDEBUG=
KFLAGS=
UFLAGS=
ARCH=arm
UNSAFE_TOOLS=n
CONFIG_CARDBUS=n
CONFIG_PNP=n
USE_PM=y
CONF_SRC=1
Type qtarm to get all necessary environment variables set.
Type make config. Dont choose Cardbussupport, as this requires the PCI kernel-modules
and they are not support3ed on the actual iPAQ.
Type make all. If you have errors, enter the clients directory and type make
to compile at least the clients (the rest should be on the iPAQ already). Copy the requested
clients to your iPAQ into /lib/modules/<kernelversion>/kernel/pcmcia and add
a link to it in /lib/modules/<kernelversion>/pcmcia. Call depmod.
The QT-Sources are downloadable from Trolltech.com. They are free as long you are producing free code yourself.
As the Suse-Installation has a running KDE, you should not have any problems to install an compile the QT packages. Please load
As am developing a program to grab / select photos from my digital camera, I need jpeg support. Form this you need to compile system-jpeg support into the qte libs. Follow the hints in section qte jpeg extension.
Extract QT-X11 by using tar xvfz qt-x11. Move the directory e.g. to /opt and name it
qt-x.y.z (where actually x.y.z is 2.3.2beta). Enter this directory and follow the steps below.
export QTDIR=$PWDmake clean./configuremakeIf you want to use this QT-version as your Desktop-library, just clear the /usr/lib/qt2-link and add a
new one (cd /usr/lib;ln -s /opt/qt-x.y.z qt2).
Extract QT-X11 by using tar xvfz qt-x11-free-3.0.0. Move the directory e.g. to /opt and name it
qt-x11-x.y.z (where actually x.y.z is 3.0.0). Enter this directory and follow the steps below.
Note !!!
I found out, that QT3 is not yet supporting QPE. This will be available in the near
future.
export QTDIR=$PWDexport LD_LIBRARY_PATH=$QTDIR:$LD_LIBRARY_PATHmake clean./configuremakeIf you want to use this QT-version as your Desktop-library, just clear the /usr/lib/qt2-link and add a
new one (cd /usr/lib;ln -s /opt/qt-x11-x.y.z qt2).
To create a QVFB device, you have to enter the $QTDIR/tools/qvfb, change to "qtx11" and type "make", to create the qvfb program. You can start it with "qvfb -depth 16" (16 for iPaq compatibility).
Instead of this, you can use the run_demo, that comes with the qpe-x86-bin version from trolltech. just enter the directory and call run_demo and you have a complete qpe-demo running. You can add your piece of software by compiling for qt-embedded and start the result. It will launch into the qvfb.
see also chapter QVFB.
Extract QT-embedded by using tar xvfz qt-embedded.tar.gz. Move the directory e.g. to /opt and name it
qt-emb-x.y.z. Before you compile it, extract qpe (described below) and copy
the file $QPEDIR/qt/qpe231-for-qpe.patch to /opt/qt-emb-2.3.1/src/tools to patch the
qt-embedded. If you don't do this, your applications will not work on the iPAQ later.
Note !!!
There is a final version 2.3.2 available on
ftp://ftp.trolltech.com/qt/embedded.
Another Note !!!
There is another version 2.3.3 available on
http://www.trolltech.com together with qtopia 1.5.0 as an rpm package.
rpm -i qtopia-free-1.5.0 installs the package after download. You will
find two tar.gz archives in your /usr/local/packages/SOURCES dir. Move that packages
to a place where approximatliy 200 MByte (per environment) is free. Unpack both
using tar.
To patch enter the directory /opt/qt-emb-2.3.1/src/tools and enter
patch -p0 -e <qte231-for-qpe.patch.
If you use qte2.3.2beta (with qpe1.4.0), the patch is not necessary.
Enter the /opt/qt-emb-2.3.X directory and follow the steps below.
For qt-2.3.3-emb no patch is necessary. Only qconfig-qpe.* have to be copied from the qtopia/qt dir into qt2-emb/src/tools.
qtemb This command sets the requiered Shell-Variables.make clean./configure -qconfig qpe -depths 4,16,24 -no-xft -vnc -system-jpeg \yesyesmake/opt/qt-emb-x.y.z/bin and copy the UIC into it by
entering cp /usr/lib/qt2/bin/uic .Remove /usr/lib/qt2emb link and add a new one (cd /usr/lib;ln -s /opt/qt-emb-x.y.z qt2emb).
Extract QT-embedded by using tar xvfz qt-embedded.tar.gz. Move the directory e.g. to /opt and name it
qt-emb-x.y.z (where actually x.y.z is 3.0.0).
Note !!!
I found out, that QT3 is not yet supporting QPE. This maybe be available in the near
future.
Enter the /opt/qt-emb-3.0.0 directory and follow the steps below.
qtemb This command sets the requiered Shell-Variables.export QTDIR=$PWDexport LD_LIBRARY_PATH=$QTDIR:$LD_LIBRARY_PATHmake clean./configureyes16yesmake/opt/qt-emb-3.0.0/bin and copy the UIC into it by
entering cp /usr/lib/qt2/bin/uic .Remove /usr/lib/qt2e-link and add a new one (cd /usr/lib;ln -s /opt/qt-emb-x.y.z qt2e).
Copy the complete directory qt-emb-x.y.z by entering cp -r /opt/qt-emb-x.y.z /opt/qt-arm-x.y.z.
Enter this directory and follow the steps below.
Use qte2.3.2beta, if you want to use qpe-1.4.0 or later.
Note !!!
There is another version 2.3.3 available on
http://www.trolltech.com together with qtopia 1.5.0 as an rpm package.
rpm -i qtopia-free-1.5.0 installs the package after download. You will
find two tar.gz archives in your /usr/local/packages/SOURCES dir. Move that packages
to a place where approximatliy 200 MByte (per environment) is free. Unpack both
using tar.
For qt-2.3.3-arm no patch is necessary. Only qconfig-qpe.* have to be copied from the qtopia/qt dir into qt2-arm/src/tools.
qtarm This command sets the requiered Shell-Variables./opt/qt-arm-x.y.z/bin and copy the UIC into it by
entering cp /usr/lib/qt2/bin/uic .make clean./configure -qconfig qpe -xplatform linux-ipaq-g++ -depths 4,16,24 \
-no-xft -no-qvfb -vnc -system-jpeg \
-I$KERNEL_PATH/include -L$KERNEL_PATH/libyesmakeRemove /usr/lib/qt2arm-link and add a new one (cd /usr/lib;ln -s /opt/qt-arm-x.y.z qt2arm).
Extract QPE by using tar xvfz qpe. Move the directory e.g. to /usr and name it
qpe-x.y.z (where actually x.y.z is 1.3.1). Enter this directory and follow the steps below.
Use QTE-2.3.2beta with QPE-1.4.0. Use QTE-2.3.3 with Qtopia-1.5.0.
qtemb This command sets the requiered Shell-Variables.make clean./configuremakeRemove /usr/lib/qpe and add a new one (cd /usr/lib;ln -s /usr/qpe-x.y.z qpe).
Copy the complete directory qpe-x.y.z by entering cp -r /usr/qpe-x.y.z /usr/qpe-arm-x.y.z.
Enter this directory and follow the steps below.
Use QTE-2.3.2beta with QPE-1.4.0. Use QTE-2.3.3 with Qtopia-1.5.0.
When this is done a "make" will create the qpe-library (this is copied into the $QTDIR/lib dir) and the programs.
qtarm This command sets the requiered Shell-Variables.make clean./configure -xplatform linux-ipaq-g++-I$(KERNEL_PATH)/include to the configure script, I prepared
a small shell- and perl-script, that extend the INCPATH line in every Makefile used
by -I$(KERNEL_PATH)/include. You can find this scripts on my homepage http://www.uv-ac.de/ipaqhelp.
Grab the scripts.tar.gz, unpack it and copy ~/qpearm/* to $QPEDIR. Call ./chmake.rc there.
HintmakeRemove /usr/lib/qpearm and add a new one (cd /usr/lib;ln -s /usr/qpe-arm-x.y.z qpearm).
To get QT-embedded to use jpeg file format, you have to add a
-system-jpeg
option when configuring the qte- and qtarm-lib.
In case of the arm lib, you also have to prepare the system to find the header-files and the libjpeg itself.
For this copy jpeglib.h, jconfig.h and jmorecfg.h from your x86 include path (e.g.
/usr/include) into the cross-compilers include dir. Install the libjpeg ipkg on your handheld
and transmit the resulted libjpeg (/lib or /usr/lib) to the hosts cross-compiler lib dir.
Attention !!!
Dont copy the libjpeg directly into /where-your-cross-compiler-is/lib.
LD_LIBRARY_PATH maybe set to there, which has the effect, that your x86 programs
search the lib there, find a arm-lib and will deny work. This also may effect
the compilation of qpearm. The UIC compiler cannot create some header files,
because it cannot read the library.
I copied the libjpeg and the links to /where-my-cross-compiler-is/lib/gcc-lib/arm-linux/2.95.2
where all the other arm-libs from the netwinder live. If that is not possible, you
should not use LD_LIBRARY_PATH in your .goqtarmrc file. You have to tell gcc directly, where to look
for the libs (/where-your-cross-compiler-is/lib).
Set the appropriate links (e.g. ln -s libjpeg.so.62.0.0 libjpeg.so) in the lib dir and
reconfigure / make your qte and qpe libraries new (adding -system-jpeg on qte).
The result should have jpeg possibilities.
This chapter is mainly a copy of the OPIE download info. For actual versions check opie sources.
Assuming CVS is available on your host and the host is connected to the internet, you can obtain the latest Opie source running the following commands. These will place the Opie sources in ./opie, so ensure that you are in a directory where you have permission to write.
cvs -d:pserver:anoncvs@cvs.handhelds.org:/cvs login
Enter 'anoncvs' as the password
cvs -d:pserver:anoncvs@cvs.handhelds.org:/cvs co opie
Later, if you just want to update your local repository, execute the following inside the opie directory:
cvs up
Wait until everything is transfered.
For ipkg creation you also need mkfs.jffs2. This is available from mkfs.jffs2 tool.
For the compilation you need tmake, a free trolltech tool. This should be available from trolltech by download, but is not any more found using the ftp-link. I used the tmake shipped with my SuSE 7.3 distribution.
The location where the tmakepath can be found has to be in the path, as well as TMAKEPATH has to be exported (which leads to /whereYourTMakeLibIs/linux-g++). TMAKEPATH is set in the above mentioned .bashrc file change and PATH is normally /usr/bin, which should be in your path anyway.
Copy the complete directory qt-emb-x.y.z by entering cp -r /opt/qt-emb-x.y.z /opt/qt-emb-opie-x.y.z.
Enter this directory and follow the steps below.
Use qte2.3.2beta (if 2.3.3 not available).
Note !!!
There is another version 2.3.3 available on
http://www.trolltech.com together with qtopia 1.5.0 as an rpm package.
rpm -i qtopia-free-1.5.0 installs the package after download. You will
find two tar.gz archives in your /usr/local/packages/SOURCES dir. Move that packages
to a place where approximatliy 200 MByte (per environment) is free. Unpack both
using tar.
qtopieemb This command sets the requiered Shell-Variables./opt/qt-emb-opie-x.y.z/bin and copy the UIC into it by
entering cp /usr/lib/qt2/bin/uic .cp $OPIEDIR/qt/qconfig*.h $QTDIR/src/toolscd $QTDIR; cat $OPIEDIR/qt/qte233-anypatch.patch | patch -p0make clean./configure -qconfig qpe -depths 4,16,24 \
-qvfb -system-jpeg -vnc \
-I$KERNEL_PATH/include -L$KERNEL_PATH/libconfirm the license question with yesmakeRemove /usr/lib/qt2opie-emb-link and add a new one (cd /usr/lib;ln -s /opt/qt-2.3.3-opie-emb qt2opie-emb).
Copy the complete directory qt-emb-x.y.z by entering cp -r /opt/qt-emb-x.y.z /opt/qt-arm-opie-x.y.z.
Enter this directory and follow the steps below.
Use qte2.3.2beta (if 2.3.3 not available).
Note !!!
There is another version 2.3.3 available on
http://www.trolltech.com together with qtopia 1.5.0 as an rpm package.
rpm -i qtopia-free-1.5.0 installs the package after download. You will
find two tar.gz archives in your /usr/local/packages/SOURCES dir. Move that packages
to a place where approximatliy 200 MByte (per environment) is free. Unpack both
using tar.
qtopie This command sets the requiered Shell-Variables./opt/qt-arm-opie-x.y.z/bin and copy the UIC into it by
entering cp /usr/lib/qt2/bin/uic .cp $OPIEDIR/qt/qconfig*.h $QTDIR/src/toolscd $QTDIR; cat $OPIEDIR/qt/qte233-anypatch.patch | patch -p0make clean./configure -qconfig qpe -depths 4,16,24 \
-xplatform linux-ipaq-g++ -no-qvfb -system-jpeg -vnc -no-xft \
-I$KERNEL_PATH/include -L$KERNEL_PATH/lib./configure -qconfig qpe -depths 16,32 \
-xplatform linux-sharp-g++ -no-qvfb -system-jpeg -vnc -no-xft \
-I$KERNEL_PATH/include -L$KERNEL_PATH/libconfirm the license question with yesmakeRemove /usr/lib/qt2opie-arm-link and add a new one (cd /usr/lib;ln -s /opt/qt-2.3.3-opie-arm qt2opie-arm).
When download is done (see see download instructions) and QT-OPIE-EMB is compiled we can compile OPIE itself for embedded.
qtopieemb This command sets the requiered Shell-Variables.make clean./configuremakeRemove /usr/lib/opie-emb and add a new one (cd /usr/lib;ln -s /usr/opie-emb-x.y.z opieemb).
When download is done (see see download instructions) and QT-OPIE is compiled we can compile OPIE itself.
qtopie This command sets the requiered Shell-Variables.make clean./configure -xplatform linux-ipaq-g++-I$(KERNEL_PATH)/include to the configure script, I prepared
a small shell- and perl-script, that extend the INCPATH line in every Makefile used
by -I$(KERNEL_PATH)/include. You can find this scripts on my homepage http://www.uv-ac.de/ipaqhelp.
Grab the scripts.tar.gz, unpack it and copy ~/opiearm/* to $OPIEDIR. Call ./chmake.rc there.makeRemove /usr/lib/opie-arm and add a new one (cd /usr/lib;ln -s /usr/opie-arm-x.y.z opie-arm).
You may want to strip the results to reduce memory usage on the iPaq (qte-lib and OPIEDIR) ...
$STRIP_PROG $QTDIR/lib/*
$STRIP_PROG $OPIEDIR/bin/*
and create the ipkgs (get root and change again to OPIE environment entering qtopie.
./mkipks will do that for you. You have to export OPIEDIR explicitly using
export OPIEDIR=$PWD, because find (used in mkipks) does not follow symbolic links.
Also PATH has to be extended using export PATH=.:$PATH.
You may need to update the Packages file using mkPackages.