Qt4.5 Port

Source: Internet
Author: User

 

Qt-embedded-linux-opensource-src-4.5.1 transplanted to qq2440 Development Board

Http://www.cnblogs.com/cnnbboy/archive/2009/06/06/1497780.html

It is a very long process. It can be said that porting qte4.5.1 is the most difficult task for me to transplant QTE. The previous steps have been successfully completed, but this time it has taken a lot of effort, during this period, I got a lot of help from alule. It can be said that the transplantation was completed, and it was the sweat of both of us.

Abstract: In the friendly arm qq2440 arm9-developed version transplanted the latest qt-embedded-linux-opensource-src-4.5.1, and the use of tslib1.4, summed up the transplantation process and problems.

Body:

In order to participate in the Bo Chuang competition, we decided to transplant qte4.5.1. It took a long time for the embedded version name of QT to change. In short, qtembedded is the embedded library of QT, qtextended is the original qtopia.

First, you must have a configured environment. The compiling environment used in this article is as follows:

Host system: Ubuntu 8.04
Host Compiler: GCC version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
Cross Compiler: arm-linux-gcc-3.4.1
Qt-embedded-linux-opensource-src-4.5.1.tar.gz software resources

Qt-x11-opensource-src-4.5.1.tar.gz

 

Porting process:

Generally, the program is completed on the PC. Therefore, we need to install QT of X11 to obtain the qvfb tool. With the embedded development of qvfb, you can develop QT applications without the actual development board.

Qt-x11-opensource-src-4.5.1 compilation Installation Process:

1. decompress the file

Copy qt-x11-opensource-src-4.51.tar.gz to the/root/local/Qt directory, decompress the package, and perform the following operations on the terminal:

# Cd/root/local/QT

# Tar zxvf qt-x11-opensource-src-4.5.1.tar.gz

After decompression, get the/usr/local/QT/qt-x11-opensource-src-4.5.1 directory. The compilation is started below.

2. Compile and install qt-x11-opensource-src-4.5.1

Go to the/usr/local/QT/qt-x11-opensource-src-4.5.1 directory for compilation and installation. Perform the following operations on the terminal:

#./Configure-qvfb

# Make

# Cd tools/qvfb

# Make

# Cd ../..

# Make install

3. Copy an object

After make install is complete, a trolltech directory is generated under the/usr/local directory to form the/usr/local/trolltech Directory, which is the directory where the qt-x11-opensource-src-4.5.1 is installed, go to/usr/local/trolltech and you will see a Qt-4.5.1 directory, copy the qvfb-related files under the/usr/local/QT/qt-x11-opensource-src-4.5.1/tools/qvfb directory to the/usr/local/trolltech/Qt-4.5.1/bin directory, operate on the terminal (determine whether the current directory is/usr/local/QT/qt-x11-opensource-src-4.5.1 ):

# Cp tools/qvfb */usr/local/trolltech/Qt-4.5.1/bin

 

Qt-embedded-linux-opensource-src-4.5.1 compilation and installation process, for the convenience of program development, I installed the x86 version and arm version, first on the PC using x86 version and qvfb development, after that, you can use the arm version for cross-Compiling and put it on the development version for running.

X86 installation process:

1. decompress the file

Copy qt-embedded-linux-opensource-src-4.5.1.tar.gz to the/root/local/Qt directory for decompression. After decompression, obtain the/usr/local/QT/qt-embedded-linux-opensource-src-4.5.1 directory. Rename qt-embedded-linux-opensource-src-4.5.1 to qt-embedded-linux-opensource-src-4.5.1-x86. Decompress qt-embedded-linux-opensource-src-4.5.1.tar.gz, rename it as a qt-embedded-linux-opensource-src-4.5.1-arm, and perform operations in the terminal:

# Cd/root/local/QT

# Tar zxvf qt-embedded-linux-opensource-src.tar.gz

# Mv qt-embedded-linux-opensource-src-4.5.1 qt-embedded-linux-opensource-src-4.5.1-x86

# Tar zxvf qt-embedded-linux-opensource-src.tar.gz

# Mv qt-embedded-linux-opensource-src-4.5.1 qt-embedded-linux-opensource-src-4.5.1-arm

2. Compile and install qt-x11-opensource-src-4.5.1-x86

Go to the/usr/local/QT/qt-x11-opensource-src-4.5.1-x86 directory for compilation and installation. Perform the following operations on the terminal:

# Cd/usr/local/QT/qt-x11-opensource-src-4.5.1-x86

#./Configure-qvfb

# Make (or gmake)

# Make install (or gmake install)

OK, the qt-x11-opensource-src-4.5.1-x86 is compiled.

3. Compile and install qt-x11-opensource-src-4.5.1-arm

Installing this is the most critical, because after compilation, You need to copy lib to the board.

For touch screens, I use tslib1.4

The process of cross-compiling tslib is as follows:

Decompress the package to/home.

#./Autogen. Sh
#./Configure -- prefix =/home/duancp/mytslib/-- Host = arm-Linux ac_cv_func_malloc_0_nonnull = Yes (you can generate a cache file)

# Make

# Make install-strip // generate slimming applications and libraries

Compile qt-x11-opensource-src-4.5.1-arm

Go to the/usr/local/QT/qt-x11-opensource-src-4.5.1-arm directory for compilation and installation. Perform the following operations on the terminal:

#./Configure"

-Release"

-Shared"

-Fast"

-No-largefile"

-QT-SQL-SQLite"

-No-qt3support"

-No-xmlpatterns"

-No-MMX"

-No-3dnow"

-No-SSE"

-No-sse2"

-No-SVG"

-No-WebKit"

-QT-zlib"

-QT-GIF"

-QT-LibTIFF"

-QT-libpng"

-QT-libmng"

-QT-libjpeg"

-Make Libs"

-Nomake Tools"

-Nomake Examples"

-Nomake Docs"

-Nomake Demo"

-No-NIS"

-No-Cups"

-No-iconv"

-No-keys"

-No-OpenSSL"

-Xplatform qws/Linux-arm-G ++"

-Embedded ARM"

-Little-Endian"

-QT-FreeType"

-Depths 16,18"

-QT-GFX-linuxfb"

-No-GFX-transformed"

-No-GFX-multiscreen"

-No-GFX-VNC"

-No-GFX-qvfb"

-QT-KBD-USB"

-No-glib"

-QT-mouse-tslib-I/home/cnnbboy/opt/include-L/home/cnnbboy/opt/lib

The reason for cropping so many parameters is that the space of the Development edition is limited. You only need to complete the required functions, and then configure the environment variables. My configuration is as follows:

Export qtdir =/qq2440

Export t_root =/tslib

Export Path = $ qtdir/bin: $ path

Export tslib_consoledevice = none

Export tslib_fbdevice =/dev/fb0

Export tslib_tsdevice =/dev/input/event0

Export tslib_plugindir = $ t_root/lib/TS

Export tslib_conffile = $ t_root/etc/ts. conf

Export tslib_calibfile =/etc/pointercal

Export qws_mouse_proto = tslib:/dev/input/event0

Export LD_LIBRARY_PATH = $ t_root/lib: $ qtdir/lib

Finally, the QT test program is successfully run and the port is OK.

Problems:

The three files librt. so.1, libstdc ++. so.6, and libgcc_s.so.1 are missing when running the test program. This is because the cross-compilation environment is different and you can copy them from the host. The system also prompts that the font cannot be found because the installation directory is not set during compilation. You can create a connection on the board.

References:

[1] http://cgy136652.blog.163.com/blog/static/36168728200932410649487/

[2] http://blog.chinaunix.net/u2/86708/showart_1924834.html

[3] http://blog.chinaunix.net/u2/75270/showart_1793535.html

[4] http://blog.chinaunix.net/u1/39383/showart_1853496.html

[5] http://www.isongzi.com/2009/05/23/qt-configure/

[6] http://read.pudn.com/downloads78/sourcecode/embed/296243/%E7%94%A8tslib%E6%A0%A1%E5%87%86%E8%A7%A6%E6%91%B8%E5%B1%8F%EF%BC%88%E6%88%90%E5%8A%9F%EF%BC%89.rtf__.htm

Related Article

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.