Today, the Qtopia-opensource-src-4.3.2 for mipsel is successfully compiled.

Source: Internet
Author: User
Qtopia-free-1.7.0.tar.gz is used in the first burst, because it is already running on the Development Board. However, due to hardware mouse requirements, analysis is required.
The source code of qtopia. I visited the Internet and found that the latest full version of qtopia is 4.3.2, and the interface is also very beautiful. So I thought, since I want to analyze the source code of qtopia,
Why not directly use the latest qt4, and qt4 will be the mainstream for a period of time in the future, so decided to transplant the latest full version of the qtopia-4.3.2.

Concept:
What is qtopia?
Qtopia is a comprehensive application development platform for Embedded Linux. It is also a user interface for Linux-based PDA (Personal Digital Assistant), smart phone (smartphone), and other mobile devices. In short, qtopia is essentially a combination of PDA and smart phone applications. If you need to develop such products, you can quickly build a PDA or smart phone on the basis of this program.

I. Environment:

Host system: fedora 10

Target Board: cq8401 industrial computer development board of Chongqing shenzhoulongcore Technology Co., Ltd., 1024x768 LCD display, pS2 mouse, keyboard
CPU: mipsel, clock speed 400 MHz,
64 MB memory
File System: NFS (busybox 1.13.1)
Hard Disk: 160 GB (IDE or SATA)

Qtopia version: qtopia 4.3.2 size: 109.89 m
: Ftp://ftp.trolltech.com/qtopia/source/qtopia-opensource-src-4.3.2.tar.gz

Cross-compiler: mipsel-Linux-GCC, mipsel-Linux-G ++ // GCC version 3.3.6

Ii. preparations:

Create the build directory and installation directory:
Directory structure:
Extract the source code of/opt/qtopia/source to this directory (the source directory must be as prompted by. Configure.

/Opt/qtopia/Target compiling Directory: stores files generated by configure and make (the compiling directory cannot be the source directory)

/Usr/local/qtopia installation directory. After installation, copy it to the corresponding directory of the NFS file system. For example, my NFS file system structure is/nfsroot/cq8401/{bin, etc, Lib, opt, TMP, USR, VAR}

Then, copy the qtopia directory/usr/local/qtopia to the/nfsroot/cq8401/usr/local directory. Why? Because you enter the system on the Development Board and run the QT application, it will search for the library configuration under/usr/local/qtopia!

Iii. Configuration and Compilation:


Because I didn't configure this before, there was no cursor in the middle of the screen, only my hardware mouse, but the hardware mouse I implemented has no interface with the QT mouse event

In combination, the click always becomes invalid. You need to guess where the current mouse position of QT is!

CD/opt/qtopia/source

# Vi qtopiacore/qconfig-qpe.h

First, comment out the macro definition of the mouse cursor so that the cursor appears in the center of the screen when the program is running:

// Qtopia Core

/*

# Ifndef qt_no_qws_cursor

# Define qt_no_qws_cursor

# Endif

*/

/*

# Ifndef qt_no_qws_mouse

# Define qt_no_qws_mouse

# Endif

# Ifndef qt_no_qws_mouse_auto

# Define qt_no_qws_mouse_auto

# Endif

*/

Other macro definitions are annotated as needed.

Save and copy the qconfig-qpe.h to the global directory.

# Cp qtopiacore/qconfig-qpe.h qtopiacore/QT/src/corelib/global/qconfig-qpe.h

Comment out the definition of qt_no_qws_cursor in other files

# Vi qtopiacore/QT/src/corelib/global/qfeatures. h

Comment out the following content:

/*

# If! Defined (qt_no_qws_cursor) & (defined (qt_no_cursor ))

# Define qt_no_qws_cursor

# Endif

*/

Save and exit.

# Vi qtopiacore/QT/src/corelib/global/qglobal. h

Comment out the following:

// # Define qt_no_qws_cursor

# Cd/opt/qtopia/Target

#
../Source/configure-release-image/usr/local/qtopia-Prefix
/Usr/local/qtopia-xplatform Linux-MIPS-G ++-arch MIPS-no-qvfb
-Displaysize 1024x768-no-modem-extra-qtopiacore-config "-release
-Xplatform qws/Linux-MIPS-G ++-embedded MIPS-qconfig qpe-depths
8, 16, 32 "2> ../configure_error.log

# Make 2> ../make_error.log

Output the error to the make_error.log file. Otherwise, after compilation, you do not know where the error occurred, because the input information is quite large!

The main configuration options are described as follows:

-Release create a release build.

-Xplatform Linux-MIPS-G ++-arch MIPS // The target platform is MIPS-Linux and the architecture is MIPS. (. Configure how does it detect whether it is a large-end or a small-end CPU? Of course, you can also force to specify:
-Little-Endian... force target build to use little endian (LSB first ).
-Big-Endian ...... force target build to use big endian (MSB first ).)
Supported arch lists: Alpha, arm, boundschecker, generic, i386, IA64, MacOSX, MIPS, parisc, PowerPC, s390, iSCSI, windows, x86_64

-No-qvfb // The target platform already supports framebuffer, so no virtual frame buffering is used.

-Extra-qtopiacore-config // specifies the qtopia core configuration option.

-Xplatform qws/Linux-MIPS-G ++-embedded MIPS // use the qtopiacore/QT/mkspecs/qws/Linux-MIPS-G ++ directory to compile the configuration file on the target platform. configuration file, the embedded platform is MIPS.

-Qconfig qpe // use the profile qconfig-qpe.h and use the-qconfig large option if the qconfig-large.h profile is used.

2> ../confgure_error.log // Finally, output errors in the configuration process to the confgure_error.log file.

After the compilation and installation are complete, what is in/usr/local/qtopia is the file required for qtopia to run on mipsel.

Create Time Zone Information:

Copy the/opt/qtopia/target/etc/zoneinfo directory under the compiled directory to the usr/share directory of the NFS file system.

# Cp-A/opt/qtopia/target/etc/zoneinfo/nfsroot/cq8401/usr/share/

Copy the Host:/usr/local/qtopia directory to the corresponding directory of the NFS file system: (74 MB in total)

# Cp-A/usr/local/qtopia/nfsroot/cq8401/usr/local/
 

4. Enter the Development Board, configure and run

Now, go to the Development Board System:

Environment Settings: (it is best to write them to the/etc/profile file, so that you do not have to re-enter the file every time you restart the system)

Export Home =/root # Set the user directory. After QT is run, the corresponding configuration file is stored in the user's main directory.
Export Path =/usr/local/qtopia/bin: $ path # Set the QT program search path
Export LD_LIBRARY_PATH =/usr/local/qtopia/lib: $ LD_LIBRARY_PATH # Set the QT library search path
Export qws_keyboard_proto = TTY:/dev/tty0 # Set the keyboard
Export qws_mouse_proto = mouseman:/dev/input/mice # Set mouse settings
Export TZ = Asia/Chongqing # set the time zone, which can be Beijing or Shanghai. I am in Chongqing, so I set it to Chongqing.
Export qws_display = "linuxfb: mmwidth35: mmheight45: 0" # The font and icon of this sentence are displayed.

After completion, execute

# Qpe-qws &

If you see the qtopia enabled on the target board screen, it indicates that it is successful.

(Welcome to reprint, but please indicate the source: http://blog.csdn.net/sabalol/archive/2009/01/08/3737093.aspx)

References:
Http://blog.chinaunix.net/u1/49924/showart_667900.html
Http://blog.csdn.net/imho888/archive/2008/12/02/3426436.aspx

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.