Qt 4.6.3 for SkyEye 1.3.1+ArmLinux 2.6.36

经过前几天实验,发现Qt 4.7.1在SkyEye 1.3.1(s3c2410, 2.6.36的内核)上运行会出现Segmentation fault。查资料,了解到4.7进行了一些指令级的优化,可能用到了SkyEye在模拟s3c2410时没有处理好的特性。使用Qt 4.6.3,成功运行!现在LCD、触摸屏和QT都搞定了。具体步骤如下:

 

1. 按笔者前篇日志(http://blog.csdn.net/Matrix_Designer/archive/2010/12/09/6066055.aspx )编译安装Arm Linux 2.6.36。第六项的LCD大小可以改成640*480,只要把两处320改成640,两处240改成480即可。

 

2. 按笔者前篇日志( http://blog.csdn.net/Matrix_Designer/archive/2010/12/10/6068629.aspx )编译安装触摸屏的适配库tslib 1.4。

 

3. 下载qt-everywhere-opensource-src-4.6.3.tar.gz,地址为 http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz 。

 

4. 执行下面脚本:

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
export PATH=/opt/Qt-4.6.3/bin:$PATH
export PATH=/opt/QtEmbedded-4.6.3/bin:$PATH
tar zxvf qt-everywhere-opensource-src-4.6.3.tar.gz
cd qt-everywhere-opensource-src-4.6.3/
./configure -opensource -confirm-license -prefix /opt/Qt-4.6.3 -qvfb
make
make install
cd tools/qvfb/
cp ../shared/deviceskin/deviceskin.* ./
qmake -project
qmake
sudo sed -i 's/LIBS          = $(SUBLIBS)/LIBS          = $(SUBLIBS) -lXtst/g' Makefile
sudo apt-get install libxext-dev
make
make install
cp qvfb /opt/Qt-4.6.3/bin/
cd ../../../
rm -fr qt-everywhere-opensource-src-4.6.3
tar zxvf qt-everywhere-opensource-src-4.6.3.tar.gz
cd qt-everywhere-opensource-src-4.6.3/
./configure -opensource -confirm-license -release -shared -prefix /opt/QtEmbedded-4.6.3 -embedded arm -xplatform qws/linux-arm-g++ -depths 4,8,16,32 -fast -optimized-qmake -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-webkit -no-qvfb -no-phonon -no-nis -no-opengl -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake docs -D__ARM_ARCH_5TEJ__ -qt-mouse-tslib -I/opt/tslib/include -L/opt/tslib/lib
make
make install

 

5. gedit ~/.bashrc &
添加以下内容:
export PATH=/opt/Qt-4.6.3/bin:$PATH
export PATH=/opt/QtEmbedded-4.6.3/bin:$PATH

 

至此,安装完成。编译时编译器建议使用友善之臂的arm-linux-tools 4.4.3,eabi的

 

在板子上运行需要将下面文件拷贝到板子的lib目录下:

/opt/QtEmbedded-4.6.3/lib/libQtCore.so
/opt/QtEmbedded-4.6.3/lib/libQtCore.so.4
/opt/QtEmbedded-4.6.3/lib/libQtCore.so.4.6.3
/opt/QtEmbedded-4.6.3/lib/libQtGui.so
/opt/QtEmbedded-4.6.3/lib/libQtGui.so.4
/opt/QtEmbedded-4.6.3/lib/libQtGui.so.4.6.3
/opt/QtEmbedded-4.6.3/lib/libQtNetwork.so
/opt/QtEmbedded-4.6.3/lib/libQtNetwork.so.4
/opt/QtEmbedded-4.6.3/lib/libQtNetwork.so.4.6.3

 

可以使用脚本:
cp /opt/QtEmbedded-4.6.3/lib/libQtCore* ~/opt/lib
cp /opt/QtEmbedded-4.6.3/lib/libQtGui* ~/opt/lib
cp /opt/QtEmbedded-4.6.3/lib/libQtNetwork* ~/opt/lib

 

然后将~/opt/lib通过NFS装载到板子上的/opt/QtEmbedded-4.6.3/lib目录下

 

另外,需要设置板子上的环境变量:
export QTEDIR=/opt/QtEmbedded-4.6.3
export QPEDIR=$QTEDIR
export QTDIR=$QTEDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QWS_MOUSE_PROTO=tslib:/dev/ts

 

最后可以通过:
cd /opt/QtEmbedded-4.6.3/demos/embeddeddialog
qmake
make
编译生成测试程序embeddeddialogs。

 

将其拷贝到板子上执行:
embeddeddialogs -qws
即可运行测试程序。我是在XP SP3上装的Vmware 7.1,在其上运行Ubuntu 9.10(已升级到10.04),然后在Ubuntu里面安装运行的SkyEye1.3.1(s3c2410+ArmLinux2.6.36)的。触摸屏是可以用的,就是很慢。奇慢的那种,点了一下等半天才有反应,可能怪我虚拟了好几次的缘故吧。

 

运行截图如下所示:

Qt 4.6.3 for SkyEye 1.3.1+ArmLinux 2.6.36_第1张图片

 

你可能感兴趣的:(vmware,脚本,ubuntu,qt,Path,library)