1.download qt-embedded-linux-opensource-src-4.5.2.tar.gz and tslib-1.4.tar.gz
2. Cross-Compilation
# Cd tslib
# Vi do. Sh
#! /Bin/sh
. /Configure -- Build = i386-linux -- Host = arm-Linux ac_cv_func_malloc_0_nonnull = Yes cc =/usr/local/ARM/4.2.2-Eabi/usr/bin/ARM-Linux-GCC cxx =/ usr/local/ARM/4.2.2-Eabi/usr/bin/ARM-Linux-G ++ -- prefix = $ PWD/build
# Chmod4 755
#./Do. Sh
# Make
# Make install
# Cd qt-embedded-linux-opensource-src-4.5.2
# Vi do. Sh
#! /Bin/sh
./Configure/
-Opensource/
-Prefix/*** (install DIR )/
-Release/
-Shared/
-No-qt3support/
-No-xmlpatterns/
-No-SVG/
-No-WebKit/
-QT-zlib/
-QT-GIF/
-QT-LibTIFF/
-QT-libpng/
-QT-libmng/
-QT-libjpeg/
-Make libs/
-Make tools/
-Nomake examples/
-Nomake docs/
-Nomake demo/
-No-NIS/
-No-cups/
-No-iconv/
-No-keys/
-No-OpenSSL/
-Xplatform qws/linux-armv6-g ++/
-Embedded ARM/
-Little-Endian/
-QT-FreeType/
-Depths 16/
-QT-GFX-linuxfb/
-No-GFX-transformed/
-No-GFX-multiscreen/
-No-GFX-VNC/
-No-GFX-qvfb/
-QT-KBD-tty/
-QT-KBD-USB/
-QT-mouse-tslib/
-QT-mouse-PC/
-No-glib
# Chmod1 755 do. Sh
#./Do. Sh
# Make
# Make install
Set environment variables on the Development Board
# Vi/usr/etc/rc. Local
#! /SH/bin
Export tslib_root =/tslib1.4
Export tslib_tsdevice =/dev/ts0
Export LD_LIBRARY_PATH = $ tslib_root/lib: $ LD_LIBRARY_PATH
Export qws_size = 800x480
Export tslib_fbdevice =/dev/fb0
Export tslib_plugindir = $ tslib_root/lib/TS
Export tslib_consoledevice = none
Export tslib_conffile = $ tslib_root/etc/ts. conf
Export pointercal_file =/etc/pointercal
Export qws_mouse_proto = tslib:/dev/ts0
Export tslib_calibfile =/etc/pointercal
Export qws_display = "linuxfb: mmwidth100: mmheight130: 0"
Export tslib_tseventtyype = h3600
Export qtdir =/usr/QT
Export Path = $ qtdir/bin: $ path
Export LD_LIBRARY_PATH = $ qtdir/lib: $ qtdir/plugins/imageformats: $ LD_LIBRARY_PATH
Export qt_plugin_path = $ qtdir/plugins/
Export qt_qws_fontdir = $ qtdir/Fonts
# Export qws_mouse_proto = linuxtp:/dev/ts0
Export qws_mouse_proto = tslib:/dev/ts0
# Mkdir/usr/QT
Copy the QT library and program (the install directory of QT) compiled and installed to the/usr/Qt directory of the Development Board. The details are as follows:
Bin fonts lib plugins
Put mousecalibration under Bin
Put * qpf font under fonts (the font is large and occupies space. You can only copy the qpf font converted by QT itself)
Put libqtcore. so.4.5.2, libqtgui. so.4.5.2, libqtnetwork. so.4.5.2, and libqtsql. so.4.5.2 under Lib.
Then click
Libqtcore. so.4-> libqtcore. so.4.5.2
Libqtgui. so.4-> libqtgui. so.4.5.2
Libqtnetwork. so.4-> libqtnetwork. so.4.5.2
Libqtsql. so.4-> libqtsql. so.4.5.2
# Mkdir/usr/tslib
Copy the previously compiled tslib library and Program (tslib bulid directory) to the/usr/tslib directory of the Development Board, as shown below:
Bin etc include lib plugins
Set
The QT library is relatively large. It can be under arm-Linux-strip.
# Sh/usr/etc/rc. Local
# Ts_calibrate
# Mousecalibration
The test results of the two programs are successful.
Note: The mouse is disabled in the project, so the compilation option is added with-no-feature-cursor. during compilation, the assistant demo example may contain the cursor code, just comment out all.