Compiler: arm-linux-gcc 4.3.3
Development board: TQ2440, Linux-2.6.30.4
Tslib compile a library:
The tslib-1.4.tar.gz into a directory, such as up / down opt directory. Then execute the following commands:
#tar zxvf tslib-1.4.tar.gz
Tslib execute the command cd , tslib into the current directory, and then execute the command as follows:
#./autogen.sh
Then proceed with configuration commands:
#./configure --prefix=/usr/local/tslib --host=arm-linux ac_cv_func_malloc_0_nonnull=yes
Finally compile command and the installation command as follows:
1. make
2. make install
If the above steps right, you can in / usr / local / tslib appear libraries we need next, it will be used when we transplant these libraries.
Errors that occur during compilation: ./autogen.sh: 4: autoreconf: not found
Solution: sudo APT-GET install autoconf automake libtool
Two compiler source code QT4.8.5
1: Extracting Qt-Everywhere the src-4.8.5.tar.gz-opensource- :
#tar zxvf qt-everywhere-opensource-src-4.8.5.tar.gz
2: Create directory: mkdir /opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm
3: Go qt-everywhere-opensource-src- 4.8.5 directory, the following command inputNote: First qt mounting path specified by --prefix, -I specify the include path behind the step tslib, lib -L path specified after the step of tslib
sudo ./configure --prefix=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm -opensource -release -shared -Declarative -importdir /opt/imports -fast -no-largefile -qt-sql-sqlite -qt3support -exceptions -xmlpatterns -no-glib -no-phonon -no-mmx -no-3dnow -no-sse -no-sse2 -svg -no-webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libjpeg -make libs -make tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -iconv -no-dbus -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-freetype -depths 16,24,32 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-kbd-qvfb -armfpa -no-mouse-qvfb -qt-mouse-linuxtp -qt-mouse-tslib -DQT_QLOCALE_USES_FCVT -DQT_NO_QWS_CURSOR -no-pch -I/usr/local/tslib/include -L/usr/local/tslib/lib -confirm-license
# make
# make install
There are mistakes in the translation of:
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/hero/work/qtarm-build/mkspecs/qws/linux-arm-g++.
修改源码路径:qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-arm-g++/qmake.conf
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP =/usr/local/arm/4.3.3/bin/arm-none-linux-gnueabi-strip
QMAKE_INCDIR=/usr/local/tslib/include/
QMAKE_LIBDIR=/usr/local/tslib/lib/
QMAKE_CFLAGS += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t
QMAKE_CXXFLAGS += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t
load(qt_config)
三 设置环境变量
1 输入命令:gedit /etc/profile 在最末尾添加如下,注意目录一定相同/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm
export QPEDIR=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm
export QTOPIA_DEPOT_PATH=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm/bin
export QTDIR=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm
export DQTDIR=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm
export QMAKE=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm/bin/qmake
export UIC=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm/bin/uic
export TMAKEDIR=/opt/EmbedSky/qt-4.8.5/qt-4.8.5_arm/bin
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++
export PATH=$QPEDIR/bin:$QTDIR/bin:$DQTDIR/bin:$TMAKEDIR/bin:$PATH
export LD_LIBRARY_PATH=$QPEDIR/lib:$QTDIR/lib:$DQTDIR/lib:$LD_LIBRARY_PATH
2 跟新环境变量命令:source /etc/profile