Devkit8000(omap3530) tslib1.4+qtopia-core-opensource-src-4.3.5移植全记

参考贴

http://www.cnblogs.com/rockstone/archive/2010/01/15/1648836.html

http://www.eefocus.com/wenes1/blog/10-05/190293_09ed8.html

一: 软硬件
1. 主机:     ubuntu 804

2. 平台:     devkit8000(omap3530)
3. tslib-1.4

4. QT版本:        qtopia-core-opensource-src-4.3.5(ftp://ftp.trolltech.com/qt/source/qtopia-core-opensource-src-4.3.5.tar.bz2一定要用迅雷从这里下,先前在http://www.qtcn.org/download/qtopia-core-opensource-src-4.3.5.tar.gz下的那个版好像不好用。)

5. 交叉编译工具: arm-none-linux-gnueabi-2007q3

 

二: 移植tslib

1.按照 http://www.eefocus.com/wenes1/blog/10-05/190293_09ed8.html帖子的介绍用以下方法得到tslib:

下载最新版本的tslib,目前最新的是1.4版,下载方法是通过CVS下载:
$ mkdir - m777 cvs
$ cd cvs
$ export CVSROOT = : pserver : anoncvs@cvs . handhelds . org : / cvs
$ cvs login
Logging in to : pserver : anoncvs@cvs . handhelds . org : 2401 / cvs
CVS password : anoncvs
cvs login : CVS password file / home / daiq / . cvspass does not exist - creating a new file
$ cvs co apps / tslib
这样会在你的$PWD/cvs下建立一个 apps文件夹,其中的 tslib就是我们下载下来的源码.
(先前在http://blog.chinaunix.net/u2/75270/showart_1793535.html这里下到的tslib不知为什么不好用。)

接着:

cd tslib/
export CC=arm-none-linux-gnueabi-gcc
export CXX=arm-none-linux-gnueabi-g++

2.
./autogen.sh
执行这条命令可能会报错,需要安装以下工具:
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool

3.
echo "ac_cv_func_malloc_0_nonnull=yes" >arm-none-linux-gnueabi.cache

./configure --host=arm-none-linux-gnueabi --cache-file=arm-none-linux-gnueabi.cache --enable-inputapi=no PLUGIN_DIR=/home/davinci/tslib/plugins(你放tslib的目录下的plugins) -prefix=/home/davinci/tslib/build(install好的tslib的位置) -host=arm-none-linux-gnueabi --cache-file=arm-none-linux-gnueabi.cache 2>&1 | tee conf_log

4.
make 2>&1 | tee make_log
make install

5. 将/home/davinci/tslib/build/lib下除去pkgconfig目录外其他所有文件拷贝到开发板/lib目录下
将/home/davinci/tslib/build/bin下的ts_calibrate拷贝到开发板/opt/qtopia/bin目录下

 

6. 将/home/davinci/tslib/build/etc下的ts.conf编辑如下(只要这几行,其他全删):

module_raw input
module pthres pmin
module variance delta=30
module dejitter delta=100
module linear

将此ts.conf拷贝到开发板的/etc下

7. 在开发板上,设置环境变量,在开发板文件系统的/etc/profile文件里添加以下命令,或直接在超级终端输入:

export TSLIB_TSDEVICE=/dev/input/touchscreen0
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts

export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0

 

8.测试tslib

cd /opt/qtopia/bin

./ts_calibrate

依次出现五个点,点击测试。

三: 移植QT

 

1. 准备
 

tar jxvf qtopia-core-opensource-src-4.3.5.tar.bz2

cd qtopia-core-opensource-src-4.3.5

 

修改mkspecs/qws/linux-arm-g++/qmake.conf文件,替换所有arm-linux为arm-none-linux-gnueabi

 

2. 配置

./configure -embedded arm -xplatform qws/linux-arm-g++ -depths 4,8,16,32 -no-qt3support -prefix ${HOME}/work/qt/target -fast -qt-sql-sqlite -no-libtiff -no-libmng -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -optimized-qmake -no-nis -no-separate-debug-info -no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -qt-kbd-usb -no-kbd-qvfb -no-mouse-qvfb -no-mouse-linuxtp -qt-mouse-pc -qt-mouse-tslib -I /home/davinci/tslib/build/include -L /home/davinci/tslib/build/lib

其中/home/davinci/tslib/build/include是tslib的include目录,/home/davinci/tslib/build/lib是tslib的lib目录,配置完成后会提示successful,如果没有,google出错信息,将其解决掉,直到successful才继续往下做

 

3. 编译 安装

 

make
(漫长的等待)

 

make install

 

4. 下载

 

1) 拷贝${HOME}/work/qt/target下整个lib目录到开发板下/opt/qtopia目录下

2) 删掉/opt/qtopia/lib/fonts目录下多余的字体文件,只留下cour.pfa和cursor.pfa两个文件

3) 设置环境变量,在开发板文件系统的/etc/profile文件里添加以下命令:
 

export QTOPIA=/opt/qtopia
export LD_LIBRARY_PATH=$QTOPIA/lib:$LD_LIBRARY_PATH
export PATH=$QTOPIA/bin:$PATH
export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
export QWS_DISPLAY="LinuxFb:mmWidth100:mmHeight130:0"
export QT_QWS_FONTDIR=/opt/qtopia/lib/fonts

 

5. 测试移植结果

 

拷贝${HOME}/work/qt/target/examples/tutorial/t1/t1到开发板下/opt/qtopia/bin目录下并运行t1程序
./t1 -qws

将显示 helloworld界面,而且触摸屏也正常工作!

Key Features Leverage Ionic 2 and its exciting new features to create cutting edge real-time apps Work through simple recipes to address your problems directly and solve them effectively Get examples at each step to guide you on your learning curve Book Description Developing real-time apps is the need of the hour, and apps that deal with humongous amounts of user data and real-time information that needs to be updated frequently are in high demand. Currently, one of the most popular frameworks for this task is Ionic Framework, which is undergoing a major makeover. This book will get you started with Ionic and help you create Angular 2 components that interact with templates. From there, you'll work with Ionic components and find out how to share data efficiently between them. You'll discover how to make the best use of the REST API to handle back-end services and then move on to animating the application to make it look pretty. You'll learn to add in a local push notification in order to test the app. You'll work with Cordova to support native functionalities on both iOS and Android. From there, you'll get to grips with using the default themes for each platform as well as customizing your own. Finally, you'll see how best to deploy your app to different platforms. This book will solve all your Ionic-related issues through dedicated recipes that will help you get the best out of Ionic. What you will learn Create custom UIs using Angular 2 directives Make the best use of REST APIs to submit forms Create beautiful animations and graphics in the application Embed videos and other media into the app Access native device functionalities such as a camera and maps using ngCordova Theme the application based on the various platform styles available Publish your application to a variety of platforms Leverage Angular 2 events and Ionic-specific events to communicate About the Author Hoc Phan is a technologist with a wide range of experiences in frontend development, cloud computing, and big data. He started programming at the age of 12, with Pascal and Assembly, on the Intel 80286 computer. He learned to start practicing right away, even before figuring out the important concepts. Hoc worked on many JavaScript projects in the past by teaching himself the framework using various online sources. He was one of the first few developers who tested Ionic for its feasibility as a JavaScript replacement of the native language of a device. He wrote the Ionic Cookbook (for more information, visit https://www.amazon.com/Ionic-Cookbook-Hoc-Phan/dp/1785287974), which was very well received. He has worked for both start-ups and large companies. By frequently speaking at local meetups as well as cloud computing/big data industry events and conferences, he learns from other experts. He holds an MBA degree from the University of Washington's Michael G. Foster School of Business. Table of Contents Chapter 1. Creating Our First App with Ionic 2 Chapter 2. Adding Ionic 2 Components Chapter 3. Extending Ionic 2 with Angular 2 Building Blocks Chapter 4. Validating Forms and Making HTTP Requests Chapter 5. Adding Animation Chapter 6. User Authentication and Push Notification Using Ionic Cloud Chapter 7. Supporting Device Functionalities Using Ionic Native Chapter 8. Theming the App Chapter 9. Publishing the App for Different Platforms
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值