關於tslib移植問題點,網上有很多介紹,但是大部分都比較零散;
我把自己移植的過程和問題點做了整理總結,這樣就比較完整有序了,有利於大家參考:
1. 在tslib目錄下執行 ./autogen.sh 出錯:possible undefined macro: AS_HELP_STRING
查看autoconf 和 automake的版本, 分別執行 autoconf -V (大寫) 和automake -v(小寫),發現版本低
下載autoconf 2.64 和 automake 1.11.1 版本,安裝方法都是進入解壓目錄: a, ./configure b,make c,make install
2. autoconf 2.64安裝 ./configure時出現問題,no acceptable m4 could be found in $PATH
到網上下載m4-1.4.13版本,安裝:a, ./configure b,make c,make install
3. 進入tslib目錄,先執行./autogen-clean.sh,再執行./autogen
又出現錯誤:possibly undefined macro AC_DISABLE_STATIC
到網上下載libtool-1.5.22 安裝 a, ./configure b,make c,make install
4. linux終端下執行 source /etc/profile 使配置文件生效
5. 再次進入tslib目錄,先執行./autogen-clean.sh,再執行./autogen OK
6. 接着執行 ./configure --prefix=/usr/local/tslib --host=arm-linux --target=arm-linux
make時出現問題:In function 'main': undefined reference to 'rpl_malloc'
執行: echo "ac_cv_func_malloc_0_nonnull=yes" > mytslib.cache
再執行 ./configure --prefix=/usr/local/tslib --host=arm-linux --target=arm-linux --cache-file=mytslib.cache
配置成功. 另外注意安裝目錄的設置最好是/usr/local/tslib,不要隨便更改;編譯器版本要與編譯內核版本一致,如都是
arm-linux-4.12版本
7. 依次執行 make , make install 安裝成功
8. 將/usr/local/tslib目錄下所有內容複製到嵌入式根文件系統的/usr/local目錄下; 修改tslib/etc/ts.conf 將第二行
#module_raw_input前的註釋#去掉; 將/tslib/bin目錄下的ts_calibrate複製到根文件系統/usr/bin目錄下
至此,tslib移植完成