编译开发板内核时,在make ARCH=arm CROSS_COMPILE=arm-926ejs-linux- menuconfig时,在输入子系统中加入对输入事件的支持。
tslib1.0源代码文件位置:/mnt/nfs/source/tslib-1.0
tslib1.0安装目标位置:/mnt/nfs/touchscreen/tslib
编译tslib
# cd tslib-1.0
export CC=arm-926ejs-linux-gcc
export CXX=arm-926ejs-linux-g++
export PATH=/opt/arm-926ejs-linux/bin:$PATH
./autogen.sh
之后出现configure.ac:7: installing `./missing'
configure.ac:7: installing `./install-sh'
plugins/Makefile.am: installing `./depcomp'
此错误可以完全忽略
echo "ac_cv_func_malloc_0_nonnull=yes">arm-linux.cache
./configure --prefix=/mnt/nfs/touchscreen/tslib --host=arm-linux --target=arm-linx --enable-inputapi=yes --enable-static=yes --cache-file=arm-linux.cache
make
make install
修改tslib
修改/mnt/nfs/source/tslib-1.0/src/ts_config.c的99行
return ret-----------------------return 0;
修改/mnt/nfs/touchscreen/tslib/ts.conf
# Uncomment if you wish to use the linux input layer event interface
module_raw input
qtopia4.3.4源代码目录:/mnt/nfs/source/qtopia-opensource-4.3.2
qtopia4.3.4目标安装目录:/mnt/nfs/touchscreen/qtopia4
修改qtopia
裁减Qtopia core的库
# gedit qtopiacore/qconfig-qpe.h
首先注释掉关于鼠标光标的宏定义,让程序运行时,触摸屏中央有光标出现:
// Qtopia Core
/*
#ifndef QT_NO_QWS_CURSOR
# define QT_NO_QWS_CURSOR
#endif
*/
/*
#ifndef QT_NO_QWS_MOUSE
# define QT_NO_QWS_MOUSE
#endif
#ifndef QT_NO_QWS_MOUSE_AUTO
# define QT_NO_QWS_MOUSE_AUTO
#endif
*/
保存退出。
其它宏定义根据需要进行注释。
保存后将qconfig-qpe.h拷贝到global目录。
cp qtopiacore/qconfig-qpe.h qtopiacore/qt/src/corelib/global/qconfig-qpe.h
5)注释掉其他文件里的QT_NO_QWS_CURSOR的定义
# gedit qtopiacore/qt/src/corelib/global/qfeatures.h
注释掉如下内容:
/*
#if !defined(QT_NO_QWS_CURSOR) && (defined(QT_NO_CURSOR))
#define QT_NO_QWS_CURSOR
#endif
*/
保存退出。
# gedit qtopiacore/qt/src/corelib/global/qglobal.h
注释掉以下内容:
//# define QT_NO_QWS_CURSOR
保存退出。
gedit src/libraries/qtopia/qtimezone.cpp
将114行的 /usr/share/zoneinfo/ 改为//mnt/nfs/touchscreen/qtopia4 ,保存退出。
-------------------------------------------------
修改qmake.conf
/mnt/nfs/source/qtopia-opensource-4.3.2/qtopiacore/qt/mkspecs/qws/linux-arm-g++
将其中带有arm-Linux-的部分前面换成arm-926ejs-linux-
开始编译qt,在最上层目录建立build,然后cd build,之后运行
make 2>../qtopiamakeERR.txt
make install
配置环境变量