移植qt到fl2440开发板

将qt4.6和4.8版本分别移植到fl2440开发板上

编译tslib

wget https://coding.net/u/sfantree/p/self_use_OSS/git/raw/master/source/tslib-1.4.tar.gz
tar zxvf tslib-1.4.tar.gz
cd tslib
sh autogen.sh && rm -f mytslib.cache
echo "ac_cv_func_malloc_0_nonnull=yes" > mytslib.cache
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH ./configure --host=arm-linux ac_cv_func_malloc_0_nonnull=yes --cache-file=arm-linux.cache -prefix=/opt/fl2440/tslib
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make install

qt4.6

#wget https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz
wget https://mirrors.ustc.edu.cn/qtproject/archive/qt/4.6/4.6.4/qt-everywhere-opensource-src-4.6.4.tar.gz
# modify src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
FILE=src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
line=`sed -n '/__UCLIBC_SUBLEVEL__/='`
sed -i -e ${line}s"/.*/\t(__UCLIBC_MINOR__ == 9 \&\& __UCLIBC_SUBLEVEL__ <= 32)) \&\& defined(__LINUXTHREADS_OLD__)/" src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
# modify mkspecs/qws/linux-arm-g++/qmake.conf
FILE=mkspecs/qws/linux-arm-g++/qmake.conf
line=`sed -n '/QMAKE_STRIP/=' $FILE`
LIBS_INST_PATH=/opt/fl2440/tslib
sed -i -e `expr $line`a"## Add the additional libraries" $FILE
sed -i -e `expr $line + 1`a"QMAKE_INCDIR += ${LIBS_INST_PATH}/include" $FILE
sed -i -e `expr $line + 2`a"QMAKE_LIBDIR += ${LIBS_INST_PATH}/lib" $FILE
sed -i -e `expr $line + 3`a"QMAKE_LFLAGS_RELEASE += -lts" $FILE 
# configure
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH ./configure -opensource -confirm-license -release -prefix /opt/fl2440/qt46 -embedded arm -xplatform qws/linux-arm-g++ -shared -no-fast -no-largefile -no-multimedia -no-audio-backend  -no-phonon -no-phonon-backend -no-svg -no-opengl -qt-freetype -depths 16,18,24 -little-endian -qt-mouse-tslib -nomake tools -nomake docs -no-xmlpatterns -no-javascript-jit -no-script -no-scripttools -no-declarative -qt-zlib -no-gif -qt-libtiff -qt-libpng  -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -no-dbus -no-mmx -no-3dnow -no-sse -no-sse2 -no-rpath -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info
# about 45min
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make install

qt4.8

#wget https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/4.8/4.8.4/qt-everywhere-opensource-src-4.8.4.tar.gz
wget https://mirrors.ustc.edu.cn/qtproject/archive/qt/4.8/4.8.4/qt-everywhere-opensource-src-4.8.4.tar.gz
tar zxvf qt-everywhere-opensource-src-4.8.4.tar.gz
cd qt-everywhere-opensource-src-4.8.4
# add -lts to mkspecs/qws/linux-arm-g++/qmake.conf
sed -i 's@^QMAKE_CC.*@QMAKE_CC = arm-linux-gcc -lts@' mkspecs/qws/linux-arm-g++/qmake.conf
sed -i 's@^QMAKE_CXX.*@QMAKE_CXX = arm-linux-g++ -lts@' mkspecs/qws/linux-arm-g++/qmake.conf
sed -i 's@^QMAKE_LINK.*@QMAKE_LINK = arm-linux-g++ -lts@' mkspecs/qws/linux-arm-g++/qmake.conf
sed -i 's@^QMAKE_LINK_SHLIB.*@QMAKE_LINK_SHLIB = arm-linux-g++ -lts@' mkspecs/qws/linux-arm-g++/qmake.conf
# configure
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH ./configure -opensource -embedded arm -xplatform qws/linux-arm-g++ -host-little-endian -little-endian -qt-sql-sqlite -no-webkit -qt-libtiff -qt-libmng -qt-libjpeg -qt-libpng -qt-mouse-tslib -qt-mouse-pc -qt-kbd-linuxinput -no-mouse-linuxtp -I /opt/fl2440/tslib/include -L /opt/fl2440/tslib/lib -prefix /opt/fl2440/qt48
# about 50min
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make
PATH=/opt/buildroot-2012.08/arm920t/usr/bin:$PATH make install

编译完成后只需要把/opt/fl2440/qt*下面的lib和plugin目录下载到开发板

移植qt到fl2440开发板》上有3条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注