一、解压原有文件系统包
[root@localhost ~ ] # tar xvf root_qtopia.tar.bz2
[root@localhost root_qtopia ] # cd root_qtopia/
可先删除原有的qtopia系统
[root@localhost root_qtopia ] # rm -rf opt/Qtopia #确保路径正确
二、加入tslib及qt4.7.2
[root@localhost root_qtopia ] # make -p usr/local/qt-arm9-4.7.2 #存放qt库文件
[root@localhost root_qtopia ] # cp /usr/local/qt-arm9-4.7.2/lib usr/local/qt-arm9-4.7.2 #将交叉编译好的库文件放在此目录
[root@localhost root_qtopia ] # cp /usr/local/tslib/* usr/local/
三、更改相应文件
1。更改ts.conf文件
[root@localhost root_qtopia ] # vim usr/local/etc/ts.conf
将module_row input前面的#号去掉即取消注释
2。更改etc/profile文件
[root@localhost root_qtopia ] # vim etc/profile
在文件中添加如下内容:
export QTDIR=/usr/local/qt-arm9-4.7.2
export T_ROOT=/usr/local
export PATH=$QTDIR/bin:$PATH
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=$T_ROOT/lib/ts
export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export LD_LIBRARY_PATH=$T_ROOT/lib:$QTDIR/lib
3。更改etc/init.d/rcS文件
[root@localhost root_qtopia ] # vim etc/init.d/rcS
删除以下内容
/bin/qtopia &
echo " " > /dev/tty1
echo "Starting Qtopia, please waiting..." > /dev/tty1
添加以下内容
source /etc/profile
echo " " > /dev/tty1
echo "Starting touch calibrate " > /dev/tty1
echo " " > /dev/tty1
sleep 1
/usr/local/bin/ts_calibrate & #开机启动触摸屏校准程序
四、重新制作yaffs文件系统