Download
First download qt everywhere, the current version is 4.7.2, can be downloaded from Nokia's website, can also be downloaded from the GIT server. Considering that the file is more than 200M in size, the download rate is less than 25kBPS, you need to consider where to copy one, otherwise it will take a long time to download. I downloaded this file at home, so it's the second day to start compiling. If you consider improving your staff's efficiency, you'll need to pre-prepare these downloads or increase your access bandwidth.
Unzip
The first step to download the file is a tar package, so need to decompress, usually decompression needs to be carried out in the unix/linux environment, if just look at the code, the Windows environment of Msys and Cygwin environment is also can be successfully decompressed, but directly not recommended directly with WinRAR decompression, Sometimes you will find that some files have the same name, and you will not know which one to replace. The decompression command is TAR-XVZF qt-everywhere-opensource-4.7.2. tar.gz. Considering that the current PC speed is generally not bad, the decompression will be completed soon, if the decompression is not completed in more than 5 minutes, it is strongly recommended to consider upgrading the machine or check the virtual machine configuration is not a problem, because the compilation is more time-consuming than the decompression of many times.
Compile
The target platform is a MIPS architecture platform, I use the following configure
CD qt-everywehere-opensource-src-4.7.2
./configure-embedded Mips-xplatform qws/linux-mips-g++-little-endian-qt-gfx-linuxfb-no-opengl-no-multimedia- No-qt3support-no-script No-scripttools-no-audio-backend-no-openssl-no-sql-sqlite-no-largefile
Configure begins with an interactive acknowledgment of the OpenSource version license process, and subsequent procedures do not require intervention. This configure process is relatively long, and it seems that configure compilation produces some tools to prepare for the subsequent work.
Since the MIPS architecture belongs to 2nd tier in Qt porting, it is not very well supported, so you need to make some manual changes after the Configure is finished. Modified file in the mkspecs/qws/linux-mips-g++/directory, named qmake.conf, open this file, found some problems, mainly compiler name and cflags, I use the compiler configuration as follows:
QMAKE_CC = MIPS-LINUX-GNU-GCC
Qmake_cxx = mips-linux-gnu-g++
Qmake_cflags + =-el-mips32r2-msoft-float
Qmake_cxxflags + =-el-mips32r2-msoft-float
Qmake_link = mips-linux-gnu-g++-EL-MIPS32R2-MSOFT-FLOAT-LRT
Qmake_link_shlib = mips-linux-gnu-g++-EL-MIPS32R2-MSOFT-FLOAT-LRT
Qmake_ar = Mips-linux-gnu-ar CQS
Qmake_objcopy = Mips-linux-gnu-objcopy
Qmake_strip = Mips-linux-gnu-strip
Compilation is time-consuming, (commands are qmake), especially when compiled with the demo and sample sections. But consider the need to use these demos and sample to run out on the target platform, and then continue to wait. Now that you need to run QT on an embedded platform, the waiting period for compilation can read a document or something. Compiled on an Ubuntu virtual machine on a E5200 pc, it took a long time, I violated the company rules, let it continue to compile last night, this morning to check, see that the compilation has been completed.
Compiled into a bunch of files, including a lot of. So library files to copy these lib files to the target platform, QT will basically start to run.
Problem
1. Missing libqtxxxx.so
Answer: Increase the path of libqtxxxx in Ld_library_path.
2.Cannot create semaphore on '/tmp/qtembedd ...
Answer: Please check if the system V IPC is kernel compiled. The QT Window System relies on this IPC approach.
3. Lack of libstdc++.so, libz.so, etc.
Answer: Please copy the target platform dynamic library provided by the cross compiler to the target platform and describe it in Ld_library_path.
4.framebuffer Sample does not work
Answer: Check the platform video output wiring to check if the framebuffer driver is properly initialized.
5. Mouse not Work
Solution: Export QWS_MOUSE_PROTO=INTELLIMOUSE:/DEV/MOUSE0
6.browser Unable to access Web page
Answer:
-Check the platform IP address ifconfig eth0
-Check the platform's routing table route add default GW
-Check the platform's DNS settings/etc/resolv.conf,nameserver 8.8.8.8
At this point, the QT version can be run on MIPS Linux, with its browser demo can also work, but poor performance, the following should belong to the optimization work, is not described in this article scope.
Summarize
QT platform portability is still very good, in the problems encountered, the most difficult problem is 2, that is, the so-called cannot create semaphore problem, from the beginning of this morning, continue to search Google, but rarely an article to point, many forums on the question, The time range is from 2005 to 2011, but the final solution is rarely seen, so it is highlighted in this article.
In addition, browser performance is not flattering, Qt 4.7.2 was released this March, compiled performance is not even as the platform to run Android browser effect, some people feel puzzled, when the evaluation, both did not open 2D acceleration.
https://d4linux.wordpress.com/2011/03/29/see_qt_run_on_mips_linux/
Let QT run on MIPS Linux good