Cross-Compilation of arm & qtpoia2.2 records in redhat9.0

Source: Internet
Author: User
Cross-compiling arm & amp; qtpoia2.2 in redhat9.0 records general Linux technology-Linux programming and kernel information. The following is a detailed description. The new project is about to begin. It is developed using qt in linux, and the motherboard uses the freescale iMX21 Board. As the learning board they provide has qtopia2.1, for the purpose of learning and in-depth research. Start my learning process on qt:

1. Development Environment
HOST environment:
System: redhat9.0 fully installed
Cross-tool arm 2.9.53 TARGET environment
FreescaleiMX21 (ARM9)
320*240 screen + Touch Screen
Software:
1.qtopia-free-src-2.2.0.tar.gz
2.e2fsprogs-1.39.tar.gz
3.20.src.v6b.tar.gz
4.libpng-1.2.14.tar.bz2
5.tslib-1.3.tar.bz2
6.zlib-1.2.3.tar.bz2
7.freetype-2.1.4.tar.bz2
Note: Cross-compiling has been performed before 2-6, and relevant library files and header files are placed in the Cross Compiler respectively.
Arm-linux/lib
Under the arm-linux/include directory
The working directory is/home/nfs.

2. Cross-compilation process

2.1install freetype-2.1.4.tar.bz2
After decompression, go to the decompressed directory and execute the following command:
./Configure -- prefix =/usr
Make
Make install

2.2 decompress qtopia-free-src-2.2.0.tar.gz
Tar zxvf qtopia-free-src-2.2.0.tar.gz

2.3 obtain the local running uic Tool
: Http://vanille.de/tools/uic-qt2
Change permissions:
Chmod u + rx uic-qt2
Rename:
Music uic-qt2 uic
Copy to qtopia-free-2.2.0/qt/bin
Cp uic/home/nfs/qtopia-free-2.2.0/qt/bin

2.4 set Environment Variables
Export QPEDIR =/home/nfs/qtopia-free-2.2.0/qtopia
Export QTDIR =/home/nfs/qtopia-free-2.2.0/qt2
Export LD_LIBRARY_PATH = $ QTDIR/lib: $ QPEDIR/lib
Export TMAKEDIR =/home/nfs/qtopia-free-2.2.0/tmake
Export TMAKEPATH = $ TMAKEDIR/lib/qws/linux-arm-g ++

2.5 modify Related Files

1. qtopia-free-2.2.0/qtopia/mkspecs/qws/linux-arm-g ++/qmake. conf

Set this line
QMAKE_LIBS_QT =-lqte

Change
QMAKE_LIBS_QT =-lqte-lpng-lz-luuid-ljpeg

2. Modify the $ QPEDIR/src/qt/qconfig-qpe.h file, define the corresponding macro, and add
# Define QT_QWS_IPAQ
# Define QT_QWS_IPAQ_RAW

This is to enable Qtopia to automatically support Touch Screen

3. Modify qtopia-free-2.2.0/qt2/include/qvaluestack. h

Change remove (this-> fromLast (); to this-> remove (this-> fromLast ());

4. qtopia-free-2.2.0/qtopia/src/3 rdparty/plugins/codecs/libflash/

Rename "cmdlib. h" to "cmdlib. h. bak ".

5. qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg. cpp

Set QDawgPrivate ::~ Change QDawgPrivate () ~ QDawgPrivate ()

2.6 Configuration

Prepare the configuration file:
Cp $ QPEDIR/src/qt/qconfig-qpe.h $ QTDIR/src/tools
Cd $ QPEDIR/src/libraries/qtopia
Cp custom-linux-ipaq-g ++. cpp custom-linux-arm-g ++. cpp
Cp custom-linux-ipaq-g ++. h custom-linux-arm-g ++. h

Create the installation directory:
Mkdir/home/nfs/qtopia

Configuration:

Echo 'yes' |. /configure-qte "-embedded-xplatform linux-arm-g ++-qconfig qpe-no-qvfb-depths 16,24-system-jpeg-system-libpng-system-zlib-gif -thread-no-xft-release-lpng-lz-luuid-ljpeg "-qpe '-xplatform linux-arm-g ++-edition pda-displaysize 320x240-prefix = /home/nfs/qtopia'

2.7 make

2.8 make install

2.9 copy qtopia to USB and mount it to the/mnt directory

2.10 set and run environment variables

Export QTDIR =/mnt/qtopia

Export QPEDIR =/mnt/qtopia
Export QWS_MOUSE_PROTO = "TPanel:/dev/h3600_tsraw"

Export PATH =/mnt/qtopia/bin: $ PATH
Export LD_LIBRARY_PATH =/mnt/qtopia/lib
Export QWS_KEYBOARD = TTY

Note: The versions of library files on the Development Board are inconsistent. You can copy these library files to mnt/qtopia.
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.