arm-linux-gcc -v
4.3.2
cd /tslib-1.4.1
./autogen.sh
echo "ac_cv_func_malloc_0_nonnull=yes" > arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=/usr/local/tslib
make
make install
修改tslib/ect/ts.conf
去掉第二行的注释,即将
# module_raw input
改为
module_raw input
cd /usr/local
备份一个
tar czvf tslib1_4.tar.gz tslib
把tslib copy 到开发板的/usr/local上
cd qt-embedded-linux-opensource-src-4.5.3-arm
./configure -prefix /usr/Qt453arm -release -shared -fast -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libjpeg -make libs -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-freetype -depths 16 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-usb -no-glib -armfpa -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
gmake
gmake install
将/usr下的Qt453arm copy 到 开发板的/usr下(注意把能删的删掉)
修改开发板的
profile
添加如下:
export QTDIR=/usr/Qt453arm
export QPEDIR=/usr/Qt453arm
export TSLIB_ROOT=/usr/local/tslib
export PATH=$QTDIR/bin:$PATH
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFb:/dev/fb0
export QWS_SIZE=240:320
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH
写一个测试程序
mkdir hello
cd hello
gedit main.cpp
#include
#include
#include
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QFont("Vera", 50, QFont::Normal);
QPushButton *btn = new QPushButton("Hello Qt");
btn->setFont(font);
btn->setFixedSize(240, 320);
btn->show();
return app.exec();
}
/usr/Qt453arm/bin/qmake -project
/usr/Qt453arm/bin/qmake
make
把 hello copy 到开发板上
./hello -qws &
OK
阅读(1809) | 评论(0) | 转发(0) |