tslib的移植方法网上有很多,不再过多赘述,这里列举几种tslib移植时出现的问题解决方法: 1.Ubuntu12.04无法安装automake解决:下载源不合适,给Ubuntu换源。 换源方法: cd /etc/apt cp sources.list sources.list.backup vi sources.list 删除所有内容,将以下内容添加进去: deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb xenial-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb-src xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://archive.canonical.com/ubuntu/ xenial partner 更新源: apt-get update 2.编译出的可执行文件还是X86架构解决:Ubuntu18.04会出现这种问题,需要配置configure时需要指定CC,Ubuntu12.04可以不指定,命令如下: Ubuntu12.04: ./configure --host=arm-none-linux-gnueabi --cache-file=tmp.cache --prefix=$(pwd)/install/tslib --disable-tools Ubuntu18.04: ./configure --host=arm-none-linux-gnueabi --cache-file=tmp.cache --prefix=$(pwd)/install/tslib CC=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-gcc --disable-tools 3.编译报错ABS_MT_TOOL_X未定义打开src/tslib.h vi src/tslib.h 添加以下内容: #define ABS_MT_SLOT 0x2f /* MT slot being modified / #define ABS_MT_TOUCH_MAJOR 0x30 / Major axis of touching ellipse / #define ABS_MT_TOUCH_MINOR 0x31 / Minor axis (omit if circular) / #define ABS_MT_WIDTH_MAJOR 0x32 / Major axis of approaching ellipse / #define ABS_MT_WIDTH_MINOR 0x33 / Minor axis (omit if circular) / #define ABS_MT_ORIENTATION 0x34 / Ellipse orientation / #define ABS_MT_POSITION_X 0x35 / Center X touch position / #define ABS_MT_POSITION_Y 0x36 / Center Y touch position / #define ABS_MT_TOOL_TYPE 0x37 / Type of touching device / #define ABS_MT_BLOB_ID 0x38 / Group a set of packets as a blob / #define ABS_MT_TRACKING_ID 0x39 / Unique ID of initiated contact / #define ABS_MT_PRESSURE 0x3a / Pressure on contact area / #define ABS_MT_DISTANCE 0x3b / Contact hover distance / #define ABS_MT_TOOL_X 0x3c / Center X tool position / #define ABS_MT_TOOL_Y 0x3d / Center Y tool position */ 4.移植过来tslib替换掉板子上/usr/local目录下的tslib/,出现了能触摸校准,但是qt界面不显示的问题,校准完直接黑屏。原因:在我们的qt应用中,会检查这两个库是否存在,如果读不到这两个库,则qt界面无法启动。 解决:将1.4的库复制一份改名改成1.0的库 5.触摸校准完之后屏幕触摸XY轴是反的分析:尝试删除触摸校准文件,跳过触摸校准,现象依旧,说明触摸校准文件未生效 处理过程:分析可能跟qt有关,因为编译qt时,指定了tslib,遂将编译好的tslib放到指定的路径,重新编译了qt,但现象依旧; 尝试移植更高版本的tslib,经测试,移植tslib1.16不会出现这种问题。 |
|小黑屋|
飞凌嵌入式
( 冀ICP备12004394号-1 )
GMT+8, 2025-4-4 14:35
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.