I have tried it many times in ubuntu10.10 and Red Hat Enterprise 6, and there are compilation errors! The final change is to miniora 9 in the mini2440 user manual, which indicates that the establishment of the development environment is related to the system. Some online users say that the GCC versions of the two systems are too new, but I tried the GCC compiler of the earlier version, the problem persists! Refer to the arm development environment for building QT creator under fedora12 and port qt4.6.3-books to micro2440 and write your own operation experience.
Environment: Virtual Machine fedora9 (we recommend that you install VMware Tools. For detailed installation methods, see the VMware help documentation), USB serial port, and mini-com terminal.
Software preparation:
To {
Return checkurl (this)
} "Href =" http://qt.nokia.com/downloads-cn "target =" _ blank "> http://qt.nokia.com/downloads-cndownload the latest version of the software package:
1. QT creator 2.0.0 Binary Package for Linux/X11 32-bit qt sdk for Linux/X11 32-bit ** (371 MB )({
Return checkurl (this)
} "Href =" http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2010.04.bin "target =" _ blank "> http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2010.04.bin)
2. QT 4.6.3 package qt-everywhere-opensource-src-4.6.3.tar.gz for Embedded Linux (QT libraries 4.6.3 for Linux/X11 (161 MB ))
3. Copy the arm-linux-gcc-4.3.2.tgz to the CD Linux/to prepare for use
4、your root_qtopia-20100108.tar.gz
Decompress the qt-everywhere-opensource-src-4.6.3.tar.gz package into three parts, respectively compile PC, embedded x86 and arm three versions.
Create a tmpfolder in the rootdirectory. Decompress qt-everywhere-opensource-src-4.6.3.tar.gz and copy the folder for 2 minutes, named PC, x86, and arm respectively.
5. Compile the PC version:
Enter the PC directory
#./Configure
# Gmake
# Gmake install
The installation process is long and has not encountered any errors.
6. Compile the embedded x86 version:
Go to the x86 directory
#./Configure-embedded x86-QT-GFX-qvfb-QT-KBD-qvfb-QT-mouse-qvfb
# Gmake
# Gmake install
The installation process is long and has not encountered any errors.
Compile and install qvfb in PC:
Go to the PC/tools/qvfb/directory
# Make
After compilation, copy the qvfb file under the PC/bin directory to the/usr/local/trolltech/QtEmbedded-4.6.3/bin directory.
Because the Compilation Time is relatively long, Steps 5 and 6 can be performed simultaneously to save time!
7. Compile the Embedded ARM version (support for ARM-Linux-GCC is required ):
Compiled using the friendly built-in arm-Linux-GCC 4.3.2 and installed in the/usr/local/ARM/4.3.2 directory
Add the compiler path to the system environment variable and run the following command:
# Gedit/root/. bashrc
Edit the/root/. bashrc file and add export Path =/usr/local/ARM/4.3.2/bin: $ path to the last line.
Use source/root/. bashrc to load
8. Compile tslib to support touch screen:
Download tslib1.4.tar.gz. After decompression:
#./Configure -- prefix =/usr/local/tslib/-- Host = arm-Linux ac_cv_func_malloc_0_nonnull = Yes
# Make
# Make install
The downloaded package does not have a configure file after being decompressed. You need to run autogen. Sh to generate the package.
9. Enter the qt-everywhere-opensource-src-4.6.3-arm directory to compile and install
First, configure:
Note: The "-Prefix/usr/local/trolltech/QtEmbedded-4.6.3-arm" parameter must be added, otherwise the QtEmbedded-4.6.3-arm is overwritten not in the QtEmbedded-4.6.3 folder after installation.
#./Configure/
-Prefix/usr/local/trolltech/QtEmbedded-4.6.3-arm/
-Opensource/
-Confirm-license/
-Release-shared/
-Embedded ARM/
-Xplatform qws/Linux-arm-G ++/
-Depths 16, 18, 24/
-Fast/
-Optimized-qmake/
-PCH/
-QT-SQL-SQLite/
-QT-libjpeg/
-QT-zlib/
-QT-libpng/
-QT-FreeType/
-Little-Endian-host-little-Endian/
-No-qt3support/
-No-LibTIFF-no-libmng/
-No-OpenGL/
-No-MMX-no-SSE-no-sse2/
-No-3dnow/
-No-OpenSSL/
-No-WebKit/
-No-qvfb/
-No-phonon/
-No-NIS/
-No-OpenGL/
-No-cups/
-No-glib/
-No-xcursor-no-xfixes-no-xrandroid-no-xrender/
-No-separate-debug-info/
-Nomake examples-nomake tools-nomake docs/
-QT-mouse-tslib-I/usr/local/tslib/include-L/usr/local/tslib/lib
Copy the preceding configuration file (#. /configure is pasted to the Super Terminal at this point. Note/there cannot be spaces at the end. If an error occurs during compilation, delete the entire directory and decompress it and re-compile it. No error will occur)
Compile: # gmake
Install: # gmake install
After 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.
10. Porting
I am a system started through NFS. For more information, see the friendly manual {
Return checkurl (this)
} "Href =" http://www.arm9.net/download.asp "target =" _ blank "> http://www.arm9.net/download.asphas download, and the nfsboot system is passed in section 5.5.3.
[Root @ localhost ~] # Service NFS start
Start the NFS service: [OK]
Disable NFS quota: [OK]
Start the NFS daemon: [OK]
Start NFS mountd: [OK]
[Root @ localhost ~] # Ifconfig
Eth0 link encap: Ethernet hwaddr 00: 0C: 29: 71: D5: B3
Inet ADDR: 192.168.1.229 bcast: 192.168.1.255 mask: 255.255.255.0
Inet6 ADDR: fe80: 20c: 29ff: fe71: d5b3/64 scope: Link
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 302975 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 103592 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX Bytes: 23765894 (22.6 MIB) TX Bytes: 115864728 (110.4 MIB)
Interrupt: 19 base address: 0x2024
Lo link encap: local loopback
Inet ADDR: 127.0.0.1 mask: 255.0.0.0
Inet6 ADDR: 1/128 scope: Host
Up loopback running MTU: 16436 Metric: 1
RX packets: 2982 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 2982 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 156260 (152.5 kib) TX Bytes: 156260 (152.5 kib)
[Root @ localhost ~] #
The IP address of eth0 on fedora9 is 192.168.1.229.
My shared directory is/opt/friendlyarm/mini2440/root_qtopia.
After the serial port is connected, start the nor flash or start the NAND Flash immediately press any button to enter the VIVI mode, and enter Q to enter the shell of VIVI
> Param set guest "console = ttysac0 root =/dev/nfs nfsroot = 192.168.1.229:/opt/friendlyarm/mini2440/latest IP = 192.168.1.230: 192.168.1.229: 192.168.1.229: 255.255.255.0: latest: eth0: off"
> Boot
After the system is started, Run ls to check whether the file system is mounted. (First, create a 1234.txt file in the/opt/friendlyarm/mini2440/root_qtopiadirectory)
Please press enter to activate this console.
[Root @ friendlyarm/] # ls
1234 Dev lib opt sbin USR
Settings etc linuxrc proc sys VaR
Bin home MNT root TMP WWW
[Root @ friendlyarm/] #
11. Copy all files in/usr/local/trolltech/QtEmbedded-4.6.3-arm/lib on fedora9 to the/opt/friendlyarm/mini2440/root_qtopia/usr/local/trolltech/QtEmbedded-4.6.3-arm/lib directory (copy the corresponding directory, is copied to the corresponding directory of the Development Board.
12. Copy the database in/usr/local/tslib on fedora9 to/opt/friendlyarm/mini2440/root_qtopia/usr/local. Copy all files under/usr/local/tslib to the/opt/friendlyarm/mini2440/root_qtopia/usr/local folder.
If other libraries are missing at runtime, the replication method is the same. You can also run the "arm-Angstrom-Linux-gnueabi-readelf-a program name | grep" share "command to check which shared libraries are required and copy them together.
To support touch screen, set environment variables automatically at startup and add the following values to/etc/profile of 2440:
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
Cancel the first comment in/usr/local/etc/ts. conf:
# Module_raw input (remove # and the top of the line)
I did not edit "#"
Start mini2440 to run/usr/local/bin/ts_calibrate correction touch screen.
13. Install Qt-creator-2.0.0
Copy the downloaded qt-sdk-linux-x86-opensource-2010.04.bin file to a directory (such as the previous/root/tmp directory) and go to the directory:
Set the qt-sdk-linux-x86-opensource-2010.04.bin file to Executable
# Chmod U + x qt-sdk-linux-x86-opensource-2010.04.bin
Installation:
#./Qt-sdk-linux-x86-opensource-2010.04.bin
Start the installation interface. By default, you can use the next method.
* We downloaded the qt sdk (qt-sdk-linux-x86-opensource-2010.04.bin), here you can choose to install the development environment of QT, this way, in front of the installation of the PC version of QT that step can save, the key is to save a lot of time.
6. Configure the QT-creator Development Environment
Start QT-creator.
In the QT-creator menu bar tools-> OPTIONS... Open the options window.
On the left side of the options interface, click qt4-> QT versions to display the QT versions setting interface.
On the qt versions page, click the blue "RENEWAL" icon.
Enter the version name of QT in the text box, you can differentiate versions (for example, for PC, qt4.6.3-PC, x86, qte4.6.3-x86, and arm, qte4.6.3-arm ).
Click qmake location: browse… on the right... Click to find the qmake program of the corresponding version in the pop-up "select qmake executable" window (the path of the PC version is as follows: /usr/local/trolltech/Qt-4.6.3/bin/qmake, x86 path:/usr/local/trolltech/QtEmbedded-4.6.3/bin/qmake, arm path: /usr/local/trolltech/QtEmbedded-4.6.3-arm/bin/qmake), click open and return to the QT versions interface.
Return to the QT versions page and click the rebuild button on the right side of debugging helper. Wait for a moment and a green "√" appears after you see debugging helper.
Add other versions.
Click OK to close the options window.
At this point, the QT-creator configuration is complete (I have configured these temporarily ).
7. An example
Copy the books routines from usr/local/trolltech/QtEmbedded-4.6.3/demos to the root/tmp folder.
Start QT-creator, file-> open file or project ..., Open root/tmp/books. Pro.
Here we are divided into two parts: first compile the x86 file and run it under qvfb, then compile the file under arm and move it to the Development Board for running.
7.1. Compilation and debugging under x86
Click the projects icon on the left side of the QT-Creator interface to open the project setting interface.
From top down,
In edit project settings for project books --> build settings --> edit build configuration: click Add. In the drop-down list, select using QT version "qte4.6.3-x86" and click OK, in edit build configuration: the blue make qte4.6.3-x86 release active will appear. character, click to activate qte4.6.3-x86 release.
In run settings --> edit run configuration: Click Show Details on the right and add the parameter "-qws" to the arguments: text box in the open drop-down list ".
After setting, click the edit icon to return to the editing page.
Compile: Under the build menu, first clean project "Books", then build project "Books", and then you can see the compilation information in the compile output window in the lower right corner (as shown above, this compilation will not cause problems ).
Run:
Start the terminal, #/usr/local/trolltech/QtEmbedded-4.6.3/bin/qvfb-Width 800-height 480 &, start qvfb.
Return to QT-creator, build --> run, and run the program.
Switch to the qvfb window to see whether the page for running books is displayed.
Debug: Debug --> start debugging to start debugging. (ensure that there is no Chinese name in the books path, that is, do not place the books project in a folder containing Chinese characters, otherwise, debugging cannot be started ).
In this case, if you select Edit project settings for project books --> build settings --> edit build configuration: select the debug item, the debugging startup speed is much faster than that of release.
7.2. Compile and Port arm
Compile: on the projects setting page, select the using QT version "qte4.6.3-arm" item. The remaining parameters remain unchanged and the build is complete.
Copy the compiled files (or even the images folder) to a directory in NFS 2440 file system, I copied the books folder directly (in the/opt/friendlyarm/mini2440/root_qtopia/home/PLG folder in the fedora9 File System ).
Operation and error handling:
Under minicom, click PS to find the PID corresponding to the qpe process, such as 1234, and then kill qtopia through kill 1234.
If you do not kill the qpe process, you can see that there are two layers on the interface, one is books and the other is qtopia.
Go to the books directory and run./books-qws.
If the previous steps are correct, you can see the books page displayed on the LCD !!
If "relocation error:/usr/local/trolltech/QtEmbedded-4.6.3-arm/lib/libqtgui appears. so.4: Symbol powf, version glibcxx_3.4 not defined in file libstdc ++. so.6 with link time reference "error.
The solution is to go to the Host QtEmbedded-4.6.3-arm/lib directory and find libstdc ++. libstdc ++. so.6.0.8 (right-click the property --> basic, you can see the linked file), copy and rename it to libstdc ++. so.6 to the/opt/friendlyarm/mini2440/root_qtopia/lib folder, do not forget to put libstdc ++ in this folder. so.6 move to another place or rename, such as libstdc ++. so.6.old.
* Renaming is actually a brutal method. You can use the ln command.
Then run./books-qws to check whether the problem has been solved!
Small font problems: In the root_qtopia file system, delete all fonts in/usr/local/trolltech/QtEmbedded-4.6.3-arm/lib/fonts and copy the wenquanyi_120_50.qpf fonts to fonts, restart the application!
OK! So far, the arm development environment for building QT creator under fedora9 and porting qt4.6.3 to mini2440 has come to an end. There is still a small problem. Isn't there any built-in program in root_qtopia?
Run the corresponding program directly on the Super Terminal on the Development Board, for example:
# Cd/opt/qtopia/bin/
#./Calculator
The interface is displayed on the Development Board.
If you run on a super terminal in a PC
./Calculator: Error while loading shared libraries: libqtopia2.so. 2: cannot open
Shared object file: no such file or directory
The reason is that after the qtopia system is started in Boot, The qtopia environment has been configured by default, and the Super Terminal running in this environment is equivalent to running in this environment, start the corresponding program and you don't need to configure it first!
You can check the bin/qtopia configuration method and configure it by yourself:
#! /Bin/sh
Export tslib_tsdevice =/dev/input/event0
Export tslib_conffile =/usr/local/etc/ts. conf
Export tslib_plugindir =/usr/local/lib/TS
Export tslib_calibfile =/etc/pointercal
Export qtdir =/opt/qtopia
Export qpedir =/opt/qtopia
Export Path = $ qtdir/bin: $ path
Export LD_LIBRARY_PATH = $ qtdir/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Ts_info_file =/sys/devices/virtual/input/input0/uevent
If [-e $ ts_info_file-a "/bin/grep-Q touchscreen <$ ts_info_file"]; then
Export qws_mouse_proto = "tpanel:/dev/input/event0 USB:/dev/input/mice"
If [-E/etc/pointercal-! -S/etc/pointercal]; then
Rm/etc/pointercal
Fi
Else
Export qws_mouse_proto = "USB:/dev/input/mice"
>/Etc/pointercal
Fi
Unset ts_info_file
Export qws_keyboard = TTY:/dev/tty1
Export kdedir =/opt/KDE
Export Home =/root
Exec $ qpedir/bin/qpe 1>/dev/null 2>/dev/null
I copied it directly.
Export tslib_tsdevice =/dev/input/event0
Export tslib_conffile =/usr/local/etc/ts. conf
Export tslib_plugindir =/usr/local/lib/TS
Export tslib_calibfile =/etc/pointercal
Export qtdir =/opt/qtopia
Export qpedir =/opt/qtopia
Export Path = $ qtdir/bin: $ path
Export LD_LIBRARY_PATH = $ qtdir/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Export qws_keyboard = TTY:/dev/tty1
Export kdedir =/opt/KDE
Export Home =/root
Run./calculator-qws after Configuration
A new problem occurs and the mouse cannot be moved.
This problem is to be solved. I am learning and want to make up for it. Thank you this post reference: http://www.arm9home.net/read.php? Tid-7639.html