按照书上写的,参考了 http://www.mtime.com/my/rylex/blog/1410413/
sudo apt-get -y install x-dev libx11-dev xlibs-static-dev x11proto-xext-dev libxext-dev libqt3-mt-dev
sudo mkdir -p /usr/X11R6/include
sudo cp -rf /usr/include/X11 /usr/X11R6/include/
sudo apt-get install kdevelop konsole
安装jpeg库
./configure --enable-shared --enable-static --prefix=/usr/local/arm/3.4.1/arm-linux/ --build=i386 --host=arm
这里要改makefile的,否则就不兼容。
make
sudo make install-libLTLIBRARIES //这句无效
sudo make install //这句才ok
打补丁
-p1 <../qtopia-free-2.2.0_100ask.patch
cp custom-linux-cassiopeia-g++.h custom-linux-arm-g++.h
cp custom-linux-cassiopeia-g++.cpp custom-linux-arm-g++.cpp
./configure -qte '-embedded -no-xft -xplatform linux-arm-g++ -qconfig qpe -depths 16,32 -no-qvfb -system-jpeg -gif' -qpe '-xplatform linux-arm-g++ -edition pda -displaysize 240x320' -qt2 '-no-xft' -dqt '-no-xft'
加入触摸屏支持
a)编辑qtopia-free-2.2.0/qtopia/src/qt/qconfig-qpe.h文件,添加以下定义:
#define QT_QWS_IPAQ
b)编辑qtopia-free-2.2.0/qt2/src/kernel/qwsmouse_qws.cpp文件,找到QTPanelHandlerPrivate::QTPanelHandlerPrivate函数实现,将其中的:
"/dev/h3600_ts"和"/dev/h3600_tsraw"都改为你触摸屏的设备文件名称即可。
注意:若注释了1中的三个宏,触摸屏则不会正常通过校准。
make
编译了好半天,终于出错了
: cannot find -luuid
collect2: ld returned 1 exit status
make[5]: *** [../../../lib/libqpe.so.1.5.3] Error 1
显然是没有uuid库。装上吧
解压e2fsprogs-1.40.2,uuid库在他里面呢,似乎都是这么整上去的。
./configure --with-cc=arm-linux-gcc --with-linker=arm-linux-ld --enable-elf-shlibs --host=arm -prefix=/usr/local/arm/3.4.1/arm-linux/
make
make install-libs
sudo apt-get install texinfo
继续make,ok,查看下我的编译器下面的库是不是有了uuid库了?
ls /usr/local/arm/3.4.1/arm-linux/lib/*uuid*
/usr/local/arm/3.4.1/arm-linux/lib/libuuid.a
/usr/local/arm/3.4.1/arm-linux/lib/libuuid.so
/usr/local/arm/3.4.1/arm-linux/lib/libuuid.so.1
/usr/local/arm/3.4.1/arm-linux/lib/libuuid.so.1.2
继续编译qtopia
make
又出错了
-L/home/lzd/qtopia-free-2.2.0/qt2/lib -lqte
: cannot find -lqte
没有libqte这个库,难道前面那里出了问题?
在往上找
jpeglib.h: No such file or directory
kernel/qjpegio.cpp:67: error: expected class-name before '{' token
kernel/qjpegio.cpp:76: error: variable or field `my_error_exit' declared void
kernel/qjpegio.cpp:76: error: `j_common_ptr' was not declared in this scope
kernel/qjpegio.cpp:77: error: expected `,' or `;' before '{' token
kernel/qjpegio.cpp:92: error: expected class-name before '{' token
kernel/qjpegio.cpp:95: error: `JOCTET' does not name a type
是没有jpeg库的问题所致。
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: skipping incompatible /usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/lib/libjpeg.a when searching for -ljpeg
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: skipping incompatible /usr/local/arm/3.4.1/arm-linux/bin/../lib/libjpeg.a when searching for -ljpeg
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: skipping incompatible /usr/local/arm/3.4.1/arm-linux/bin/../../arm-linux/lib/libjpeg.a when searching for -ljpeg
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: cannot find -ljpeg
collect2: ld returned 1 exit status
新问题是libjpeg库不兼容,肯定的,因为忘了在jpeg新生成的makefile里更改CC了
make[6]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia/etc/themes'
make[5]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia/etc/themes'
make[4]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia/src'
make[3]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia/src'
make[2]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia/src'
make[1]: Leaving directory `/home/lzd/qtopia-free-2.2.0/qtopia'
lzd@lzd-laptop:~/qtopia-free-2.2.0$ echo $?
0
lzd@lzd-laptop:~/qtopia-free-2.2.0$
make install
最后在根文件系统中支持qtopia
1。拷贝两个库到/lib
cp /usr/local/arm/3.4.1/arm-linux/lib/*uuid* /home/lzd/nfs/lib/
lzd@lzd-laptop:~/qtopia-free-2.2.0$ cp /usr/local/arm/3.4.1/arm-linux/lib/*jpeg* /home/lzd/nfs/lib/
lzd@lzd-laptop:~/qtopia-free-2.2.0$ ls /home/lzd/nfs/lib/*uuid*
/home/lzd/nfs/lib/libuuid.a /home/lzd/nfs/lib/libuuid.so.1
/home/lzd/nfs/lib/libuuid.so /home/lzd/nfs/lib/libuuid.so.1.2
lzd@lzd-laptop:~/qtopia-free-2.2.0$ ls /home/lzd/nfs/lib/*jpeg*
/home/lzd/nfs/lib/libjpeg.a /home/lzd/nfs/lib/libjpeg.la
lzd@lzd-laptop:~/qtopia-free-2.2.0$
2。复制字库
lzd@lzd-laptop:~/qtopia-free-2.2.0$ cp -rf qt2/lib/fonts/ qtopia/image/opt/Qtopia/lib/
3。搬移qtopia到根。
cp -rf qtopia/image/opt/ /home/lzd/nfs/
4。创建时区文件
lzd@lzd-laptop:~/nfs$ mkdir -p usr/share/zoneinfo/
lzd@lzd-laptop:~/nfs$ ls /usr/share/z
zenity/ zoneinfo/
lzd@lzd-laptop:~/nfs$ cp -rf /usr/
bin/ include/ local/ share/ X11R6/
games/ lib/ sbin/ src/
lzd@lzd-laptop:~/nfs$ cp -rf /usr/share/zoneinfo/America/ usr/share/zoneinfo/
lzd@lzd-laptop:~/nfs$ cp -rf /usr/share/zoneinfo/zone.tab usr/share/zoneinfo/
lzd@lzd-laptop:~/nfs$
5。伪造触摸屏校验文件(不用了,直接用友善的2.6.13内核,touchscreen已经一直好了)
6。新建脚本,启动qtopia,用触摸屏。
#! /bin/sh
export HOME=/root
export QTDIR=/opt/Qtopia
export QPEDIR=/opt/Qtopia
export QWS_DISPLAY=LinuxFb:/dev/fb0
export QWS_KEYBOARD="TTY:/dev/tty1"
#export QWS_MOUSE_PROTO="USB:/dev/mouse0"
export QWS_MOUSE_PROTO="TPanel:/dev/ts0"
export PATH=$QPEDIR/bin:$PATH
export LD_LIBRARY_PATH=$QPEDIR/lib:$LD_LIBRARY_PATH
$QPEDIR/bin/qpe &
修改上面文件属性加上可执行
chmod +x /home/lzd/nfs/bin/qpe.sh
最后在rcS里加上
/bin/qpe.sh &
阅读(4982) | 评论(0) | 转发(0) |