QT program to arm (A8) Board transplant tour

Source: Internet
Author: User
Tags touch
QT program to arm board transplant trip before: Because of the reasons for the completion of the future need to transplant QT program to arm board operation, so there is this article. Look at the blog to find information, see a writer wrote: Knowledge from the Internet, will return the Internet.         Praise. From unfamiliar to familiar toss, so the transplant process records, issued, to their own province.
———————————————————— remarks ——————————————————————— Note: 1, the transplant process has a variety of situations, such as the compilation error, can be Baidu query, can solve the problem; 2. This article only records the transplant problem that the author encounters, for reference only. 3, refer to another blog: http://whylinux.blog.51cto.com/10900429/1856076 ———————————————————— body ——————————————————————— first, the development environmentHost environment: ubuntu14.04 Target machine: jiuding x210 Development Board (s5pv210) main tool chain: gcc-4.8.2 cross-compilation toolchain: arm-none-linux-gnueabi-gcc-4.4.1 ( Arm-2009q3 from Samsung) QT transplant version: QT-4.7.4 Mount x210 Development Board root file system mode: NFS self-made development Board root filesystem second, transplant TslibDescription: The general QT program put on the arm board need touch control, so need to transplant this touch screen library tslib. (1) DownloadBaidu Download tslib-1.4.tar.gz or development Board Jiuding official TSLIB_X210_IA.TGZ notes: I tslib use jiuding official QT4.8 source (qt_x210v3s_160307.tar.bz2) inside the Tslib_ X210_ia.tgz (2) DecompressionCopy the Tslib source into Ubuntu's/usr/local/src/directory, unzip it, and create a directory tslib_x210For tslib installation at a later time; (3) changes and reasons (look down)View the value of the Ev_version macro in arm-none-linux-gnueabi/libc/usr/include/linux/input.h in the tool chain used, and it must be include/linux/in the kernel Input.h in the same value of the Ev_version macro (generally need to modify, select any one of them to modify the same value can be; I chose to change the kernel value of the macro to 0x010000, because I toolchain the macro value is this, and then recompile kernel burning) The above reasons:In the Tslib source code in the/plugins/input-raw.c file check_fd function, there is a piece of code on the Development Board of the touch screen detection, if the following conditions as long as there is an unsatisfied, the report "Selected device is not a Touchscreen I Understand ", meaning the touch screen is not detected: if (! (IOCTL (TS-&GT;FD, eviocgversion, &version) >= 0) && (Version = = ev_version) && (IOCTL (TS-&GT;FD, eviocgbit (0, sizeof (BIT) * 8), &bit) >= 0) && (bit & (1 << ev_abs) ) && (IOCTL (TS-&GT;FD, Eviocgbit (ev_abs, sizeof (absbit) * 8), &absbit) >= 0) && (absbit & (1 &L t;< abs_x) && (Absbit & (1 << abs_y) && (Absbit & (1 << abs_pressure))) {Fprint F (stderr, " selected device is a touchscreen I understand\ n "); return-1; } A, if you do not know after modifying the parameters is successful, the previous "remarks" 3rd refer to the blogger on the debug of the section; B, note Some board touch screen driver file on the above abs_x, abs_y, abs_pressure definition and use of the situation, In my transplant jiuding x210 Development Board ft5x06 Touch screen driver file, it does not use abs_x, abs_y, but the definition of multi-touch abs_mt_position_x, abs_mt_position_y, resulting in printing "selected Device is not a touchscreen I understand "Workaround: Remove multi-touch related definitions in ft5x06 touch screen driver files Abs_ MT_width_major and Abs_ MT_tracking_id function, then abs_mt_position_x, abs_mt_position_y changed to Abs_x, Abs_y. (mt= multiple) C, the above, only a reminder, the other X210 board users can verify that this problem is true. (4) Configure and install TslibA, after decompression into the Tslib directory, execute./autogen.sh b, execute./configure CC=ARM-NONE-LINUX-GNUEABI-GCC cxx=arm-none-linux-gnueabi-g++--host= Arm-none-linux-gnueabi --prefix=/usr/local/src/tslib_x210Ac_cv_func_malloc_0_nonnull=yes (--prefix Specifies the installation directory for Tslib: This folder was created earlier) C, execute make, make install, then Tslib will be installed in the specified directory tslib_x210, it contains bin, lib, include, etc four folders (5) Modify ts.confEnter the installation directory tslib_x210, vi command to open etc/ts.conf:a, if it is downloaded online, installed tslib-1.4 version, then the second line "# Module_raw input" "#" removed, and Shelf, you can't leave a space.

b, if it is jiuding officially provided Tslib_x210_ia modified content is red font: Module_raw input module pthres pmin=1 module Variance delta=30 module Dejitter Delta = 100 (Original is 10000)Module Linear Save (6) Setting the Development Board environment variableThe entire installation directory tslib_x210Copy to the Development Board file system, launch the Development Board through NFS to launch its file system, and then through the Development Board terminal open environment variable file/etc/profile, add the following: (see below note) export tslib_root= /tslib_x210Export Tslib_tsdevice =/dev/input/event2Export qws_mouse_proto= Tslib:/dev/input/event2Export tslib_calibfile=/etc/pointercal export tslib_conffile= $TSLIB _root/etc/ts.conf Export tslib_plugindir= $TSLIB _ Root/lib/ts Export tslib_fbdevice=/dev/fb0 Export tslib_consoledevice=none export ld_library_path= $LD _library_path:$ Tslib_root/lib:/lib Note: A, the first three items need to self-check, Tslib_root replacement for their actual storage path; b, Tslib_tsdevice (2nd) and Qws_mouse_ PROTO (3rd) These two need to see their own board of touch screen device corresponding to/dev/input/that file, method: Into the view/dev/input/, there are several event, each cat once, and touch the screen to see if SECURECRT has content output, garbled also allowed; C, for the 3rd Qws_mouse_proto, the use of the QT control mode is the touch screen, it is the key word "tslib", if the future QT program would like to allow the use of both touch screen and mouse to control, then this parameter can be changed to export Qws_mouse _proto= " Tslib:/dev/input/event2 MouseMan:/dev/input/ Mouse2"(I am mouse2, can be plugged into the USB mouse after self-test) d, if the QT program is ported to arm only using touch screen control, do not want to see the mouse arrow, then open the QT program main function, add the following code: 1. Introduction of header file #include < Qwsserver ; 2. Set the mouse look property to False qwsserver::setcursorvisible (false); (7) test and calibrate the touch screen(Be sure to calibrate, otherwise the touch position is not accurate) A, perform source/etc/profile update environment variables (remember to execute this command every time you modify the profile file, you do not need to restart the Development Board)
B. Enter the tslib_x210/bin/directory to perform the touchscreen calibration procedure./ts_calibrate If a tslib touchscreen five-point calibration screen appears, the Tslib installation migration is completed successfully. Calibration: Click on the 50-word shelf (click in the order that appears). ) will be pointercal touch screen inspection information files, will appear in the tslib_x210 etc directory, or you can perform other programs in this directory to experience the touchscreen, SECURECRT will output location information.



Iii. transplant QT (0) prepare to remember that this article first downloaded a few libraries, please refer to http://248341.blog.51cto.com/238341/1438867, if in the subsequent make compile process error, online Check the wrong again can download. (1) Download Qtcreator and QT source package, transfer to Ubuntu under
(2) Under Ubuntu install Qtcreator, and extract QT source Package A, to the above. bin file Add "executable" permission: chmod +x file name, and then execute. Qt-creator-linux-x86-opensource-2.4.1.bin, the next qtcreator installation process so easy omitted, Qtcreator will be installed by default in the/usr/local/trolltech directory; b, The QT source package extracted to the/USR/LOCAL/SRC directory, decompression, into the qt-everywhere-opensource-src-4.7.4/mkspecs/qws/linux-arm-g++/directory, Open the qmake.conf file. The contents of the amendment are as follows:


  (3) configuration This article is to install QT in the/usr/local/qt4arm directory, the installation of the embedded version of QT is performed as follows: (see note below)./configure--prefix=/usr/local/qt4arm- Opensource-release-shared-declarative-importdir/opt/imports-fast-no-largefile-qt-sql-sqlite-qt3support- Exceptions-xmlpatterns-no-glib-no-phonon-no-mmx-no-3dnow-no-sse-no-sse2-svg-no-webkit-qt-zlib-qt-libtiff-qt-li Bpng-qt-libjpeg-make libs-make tools-nomake examples-nomake docs-nomake Demos-no-nis-no-cups-iconv-no-dbus-xpla Tform qws/linux-arm-g++-embedded Arm-little-endian-qt-freetype-depths 16,24,32-qt-gfx-linuxfb-qt-gfx-transformed- QT-GFX-MULTISCREEN-NO-GFX-VNC-NO-GFX-QVFB-QT-KBD-LINUXINPUT-NO-KBD-QVFB-ARMFPA-NO-MOUSE-QVFB-QT-MOUSE-LINUXTP- qt-mouse-tslib-dqt_qlocale_uses_fcvt-dqt_no_qws_cursor-no-pch-i/usr/local/src/tslib_x210/include-l/usr/local/ Src/tslib_x210/lib-confirm-license Note:--prefix= is after compiling the source code, the directory where Qt is installed, and-I is followed by your tslib is the path of the header file, and after-L is your tslib in the Lib path; This article can be installed correctly according to this configuration, the source network, can refer to other transplant QT articles   (4) perform make compilation It's a long wait process., this article takes 3 hours, if the compilation process error, it may be missing any library, online query and then Apt-get install can be &nbsp, as long as there is no reconfiguration./configure generate a new makefile,make can continue to compile. (Note: This article in the compilation process a few errors, all on-line search, there is a solution, is not waiting for the background compilation)   (5)   Perform make install install    This article has been configured to install in/usr/local/ Qt4arm directory   (6) Transfer of library files into the QT installation directory/usr/local/qt4arm/lib directory, copy all so files to the Development Board file system under the lib/CP./* /root/rootfs/rootfs/ lib/-RF carefully found QT used font library in Lib/fonts directory, also by the above command copied to the/lib/of the Development Board, it is necessary to the Development Board of the Lib directory of the Fonts Font Library folder to the top of the root directory, the Development Board Terminal execution: mv/lib/ Fonts/  (7) Configure the environment variable again to open the/etc/profile of the Development Board, add the font library to the export qt_qws_fontdir=/fonts; The basic QT transplant to the ARM board is complete, Simply summed up is the embedded version of the Qt Lib Library to the arm board, with the touch screen and other input devices to control the use of   (8) test QT program   ready to write a good QT test program source code, successively execute the following command: Qmake-project Qmake make then use the command file target file name to see if the target executable is an ARM architecture, if the ARM architecture, you need to copy the target executable to the Development Board file system, plus "-QWS" to execute the test program, such as the following example, will execute the command on the board Terminal:. Yizhi_test-qws. Then the board screen will be able to see the QT test program.  
———————————————————— finished ————————————————————— So, the basic QT transplant to arm board work is completed, simply summed up is the embedded version of the QT Lib directory and touch screen library tslib Lib directory ported to arm board         With the input class device such as touch screen to control the use.         If you encounter other problems, please use the powerful Internet. —————————————— "knowledge from the Internet, will return to the Internet" ———————————— this part of the reference blog: http://blog.csdn.net/qq_15653225/article/details/49762385 http://blog.csdn.net/embeddedman/article/details/7423107 http://www.itnose.net/detail/534830.html


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.