- 论坛徽章:
- 0
|
kernel: rethat 2.6
gcc: gcc-3.4.2
交叉编译:mipsel-linux-gcc
target:MIPS
交叉编译qtopia-core
下载解压qtopia-core-opensource-src-4.3.4.tar.gz
#cd qtopia-core-opensource-src-4.3.4
#export QTDIR=$PWD
#export PATH=$PATH:$QTDIR/bin
#export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
#./configure -xplatform qws/linux-mips-g++ -embedded mips -no-largefile -little-endian -depths
4,8,16,32 -qt-mouse-linuxtp -qt-gif -qt-libpng -qt-zlib -qt-libmng -qt-libjpeg
#gmake
#gmake install
瘦身
由于MIPS的flash空间小,所以要瘦身;
使用strip对库文件、可执行文件进行操作,库文件、可执行文件中的一些与正常运行无关的调试信息和符号信息会被剔除掉,而且操作前和操作后文件
的大小变化特别明显,一般可以减少1/3或更多,所以在嵌入式的平台上是非常有用的。但是在开发过程并不提倡这一做法,因为使用strip后,使用gdb
时就无法获得调试信息了。
先用file命令检查是否已被strip了;
eg:file libQtGui.so.4.3.4
mipsel-linux-strip libQtGui.so.4.3.4
测试中出错
出错一
# ./helloworld -qws
QWSServerSocket::init: Function not implemented
QWSServerSocket: unable to create socket.
QWSServerPrivate::initServer: server socket not listening: Illegal seek
Failed to bind to /tmp/qtembedded-0/QtEmbedded-0
解决方法:
重新配置内核:# make menuconfig
选中:Networking——>Networlding options——>Unix domain sockets
保存
重新烧写板子,运行。
出错二
QFontDatabase: Cannot find font directory /usr/local/Trolltech/QtopiaCore-4.3.4-
mips/lib/fonts - is Qt installed correctly?
解决方法:
创建/usr/local/Trolltech
ln -s /mnt/sd/usr/QtopiaCore-4.3.4-mips .
出错三
./helloworld: can't resolve symbol '__ctype_b_loc'
解决方法:
缺少库 ;查看依赖库 readelf -d helloworld
find -name *.so.*
出错四
QScreenLinuxFb::connect: No such device or address
Error opening framebuffer device /dev/fb0
解决
加framebuffer驱动
解压最新版的mrua,
# make kernel //重新编译 llad.ko em8xxx.ko
# make apps //在bin下生成osdbuf_control fb_test
将em8xxx.ko、osdbuf_control、fb_test复制到板子上
make kernel是会遇到错误
出错:
/usr/qtopia4/mrua_SMP8634_2.8.0.1_facsprod_legacy_dev.mips.nodts/MRUA_src/lib//librmjpeg.so: undefined reference to `__ctype_b'
/usr/qtopia4/mrua_SMP8634_2.8.0.1_facsprod_legacy_dev.mips.nodts/MRUA_src/lib//librmhttp.so:
undefined reference to `__ctype_tolower'
/usr/qtopia4/mrua_SMP8634_2.8.0.1_facsprod_legacy_dev.mips.nodts/MRUA_src/lib//libsamples.so:
undefined reference to `__ctype_tolower'
解决方法:
到/usr/qtopia4/mrua_SMP8634_2.8.0.1_facsprod_legacy_dev.mips.nodts/MRUA_src/lib/下运行
# make librmjpeg.so
# make librmhttp.so
# make libsamples.so
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78300/showart_1871119.html |
|