[Turn]ubuntu 11.10 mini2440 qte4.6.3 Development Environment establishment

Source: Internet
Author: User
Tags tmp folder

Original: http://blog.chinaunix.net/uid-26696487-id-3149316.html

Environment: Ubunt 11.10 HDD Installation
QT Version: qte4.6.3
Equipment Platform: mini2440
Cross Editor: 4.4.3
1. Unzip the qt-everywhere-opensource-src-4.6.3.tar.gz compressed package to 3 parts, compiling the PC, embedded x86 and arm three versions respectively.
2. Compile the PC version:
Go to the PC catalog
#./configure
# Gmake
# gmake Install If gmake cannot be used:
A bug was found when compiling the ncurses program
Gmake:command not found

The full name of Gmake should be gnumake,

It has been canceled in Ubuntu and is replaced with make.
$ sudo ln-s/usr/bin/make/usr/bin/gmake
If it appears in the Gmake:
/USR/INCLUDE/X11/EXTENSIONS/XTEST.H:50:35: Error: x11/extensions/xinput.h: no file or directory
In file included from x11keyfaker.cpp:47:
/USR/INCLUDE/X11/EXTENSIONS/XTEST.H:104: Error: ' Xdevice ' not declared
/usr/include/x11/extensions/xtest.h:114: Error: ' Xdevice ' not declared
/usr/include/x11/extensions/xtest.h:124: Error: ' Xdevice ' not declared
/usr/include/x11/extensions/xtest.h:133: Error: ' Xdevice ' not declared
Make: * * * [. OBJ/RELEASE-SHARED/X11KEYFAKER.O] Error 1

Workaround:

sudo apt-get install Xorg-dev
3. Compile the embedded x86 version:
Enter the x86 directory
#./configure-embedded X86-QT-GFX-QVFB-QT-KBD-QVFB-QT-MOUSE-QVFB
# Gmake
# gmake Install
The installation process is long and no errors have been encountered.
Compile and install the QVFB in the PC version:
Enter the pc/tools/qvfb/directory
#make
If make is present:
X11KEYFAKER.CPP:48:34: Fatal error: x11/extensions/xtest.h: no file or directory

Compile interrupts.

Make: * * * [. OBJ/RELEASE-SHARED/X11KEYFAKER.O] Error 1

Workaround:

sudo apt-get install Xorg-dev
After compiling, copy the Qvfb file from the Pc/bin directory to the/usr/local/trolltech/qtembedded-4.6.3/bin directory.
Because the compilation time is long, 5, 6 steps can be done simultaneously, to save time!
4, compile the embedded arm version (need ARM-LINUX-GCC support):
Refer to the Friendly Arm Development Board manual, execute build-all directly in the arm-qte-4.6.3 folder, then execute mktarget.
5, compile Tslib to touch screen support:
Download, tslib-1.4.tar.gz, unzip:
#./configure--prefix=/usr/local/tslib/--host=arm-linux Ac_cv_func_malloc_0_nonnull=yes
# make
# make Install
The package I downloaded does not have a configure file and needs to run autogen.sh before it can be generated. Run autogen.sh script, need "Autotools", namely autoconf, Automake, Libtool, install these three gadgets directly in the software center
After the installation is complete, there are three folders in the/usr/local/trolltech directory: Qt-4.6.3, QtEmbedded-4.6.3, Qtembedded-4.6.3-arm.
6. Transplant

Follow the mini2440 manual to put the target-qte-4.6.3.tgz into the Development Board to extract the root record
7. Copy the library from Ubuntu on/usr/local/tslib to the/usr/local of the Development Board. Copy all files under/usr/local/tslib to the/usr/local folder on the Development Board.
If the runtime also lacks additional libraries, the copy method is the same. You can also use the ARM-ANGSTROM-LINUX-GNUEABI-READELF-A program name | grep "Share", command to see which shared libraries are needed, to copy the past together.
To support the touchscreen, the boot automatically sets the environment variable, which is appended in the 2440/etc/profile:
Export ld_library_path=/usr/local/lib: $QTDIR/lib: $LD _library_path
Export Tslib_root=/usr/local/lib
Export Tslib_tsdevice=/dev/input/event0
Export tslib_fbdevice=/dev/fb0
Export Tslib_plugindir=/usr/local/lib/ts
Export Tslib_consoledevice=none
Export tslib_conffile=/usr/local/etc/ts.conf
Export pointercal_file=/etc/pointercal
Export tslib_calibfile=/etc/pointercal
Export Qws_mouse_proto=tslib:/dev/input/event0
Cancels the second comment in/usr/local/etc/ts.conf:
# Module_raw input (remove #, and the line shelf)
I don't have "#" when I edit.
Start mini2440 run/usr/local/bin/ts_calibrate to calibrate the touchscreen.
8, installation qt-creator-2.0.0
Install directly in the Software center
9, the Qt-creator development environment configuration
Start Qt-creator.
In the Qt-creator menu bar tools-〉options ... Open the Options window.
On the left side of the Options screen, click on QT4-〉QT versions to display the Qt versions Settings screen on the right.
In the QT versions interface, click Add
In the below version name: The text box entered the QT version name, can be filled out, can be separated from each version (such as the PC version of the QT4.6.3-PC, x86 version take qte4.6.3-x86, ARM version to take Qte4.6.3-arm).
Click Qmake Location: Right Browse ... button, in the pop-up "Select QMake executable" window find the corresponding version of the QMake program (according to our front, the PC version of the path:/usr/local/trolltech/qt-4.6.3/bin/qmake, x86 version path:/usr/local/trolltech/qtembedded-4.6.3/bin/qmake,arm version path:/usr/local/trolltech/qtembedded-4.6.3-arm/bin/ Qmake), click Open to go back to the QT versions interface.

If I can't find/bin/qmake, then chmod 777/usr/local/trolltech
Similarly, complete the addition of other versions.
When you have finished adding, click the OK button to close the Options window.
Here, the Qt-creator configuration is complete (i configured these for the time being).
10. An example
Copy the books routine from Usr/local/trolltech/qtembedded-4.6.3/demos to the Root/tmp folder.
Start Qt-creator,file-〉open File or Project ... and open Root/tmp/books/books.pro.
Here we are divided into two parts, first compiled under the x86, and run under the QVFB, and then compiled under the arm, moved to the Development Board to run.
10.1, x86 under the compilation and debugging
Click the Projects icon on the left side of the Qt-creator interface to open the Project Settings screen.
In the Edit Project Settings for Project Books--〉build settings--〉edit Build Configuration: Click Add and select Using Qt Version in the drop-down list QtE4 .6.3-x86 "Pop-up dialog box click the OK button.
In the Run Settings-arguments: text box, add the parameter "-qws".
After setting, click the Edit icon to return to the editing screen.
Compile: Under the Build menu, clean project "books", then Build project "Books", in the lower right corner compile the output window to see the compilation information (as we have done above, to this compilation will not be problematic).
Run:
Start the terminal, #/usr/local/trolltech/qtembedded-4.6.3/bin/qvfb-width 800-height 480 &, start QVFB.
Go back to Qt-creator,build--〉run and run the program.

If it appears: Qtopia Core Data Directory is not owned by user 1000

May be something that is generated under/tmp and you rm/tmp/qt*/tmp/.qt*-R
Switch our QVFB window, is not see books run interface.
Debug: Debug--〉start debugging--〉start debugging, you can start debugging (please ensure that there is no Chinese name in the books path, that is, do not put the books project in a folder containing Chinese characters, or you can not start debugging).
At this time feel if the previous compilation option Edit Project Settings for Project Books--〉build settings--〉edit Build Configuration: Select the Debug Item, The Debug startup speed is much faster than when you release it.
7.2, ARM compiled and ported
Compile: Under the Projects setting interface, select the Using Qt Version "Qte4.6.3-arm" entry, the remaining parameters are unchanged, build. Put the generated files on the board to run. Here run Settings-arguments: The text box does not have to fill in any parameters, appears

P, Li {white-space:pre-wrapfailed to start program.  Path or permissions wrong? Do not care about it, and then in the Xxx-build-desktop folder will generate the executable file, put it on the development Board, execute./xxx-qws.

[Turn]ubuntu 11.10 mini2440 qte4.6.3 Development Environment establishment

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.