Common API versions:
Qtopiacore-x86, Qt-X11, QT-Windows
QtopiaCore-X86 for Linux text interface
Qt-X11 in Linux graphical interface
Use QT-windows in Windows
The latter two can be installed directly. There is nothing to say.
Now try qtopiacore -- x86 (default) to run the QT program on the Linux character interface.
Compile
#./Configure-embedded x86-qvfb-no-OpenSSL
# Make
# Make install
Then set the environment variables: default installation path/usr/local/trolltech/QtopiaCore-4.3.5
# Vi. bash_profile
Add the new qtopiacore environment variable before the original path, so that the system first finds the qtopiacore environment variable before the original qtx11.
Therefore, the qtopiacore command is run instead of the following qtx11 command.
Note: If you exit VI in the ": X" mode, an error occurs in source. bash_profile.
Qtopiacore:
# Qmake-Project
# Qmake
# Make
#./Gameboard-qws
Qws indicates that the program runs as a server;
But now the machine is not a server. What should I do?
Solution:
Run a terminal simulator and enter the command
# Qvfb
You can find the qvfb executable program in qtx11/opensource. You can copy qvfb to/usr/bin to execute the qvfb command.
Or, you can change the graphical interface currently running the system to the character interface as follows:
# Vi/etc/inittab
Change the default value of "ID: 5: initdefault:" In line 1 from "5" to "3", that is, change the default GUI to the character interface.
# Vi/boot/GRUB/grub. conf
Change 15 lines to kernel/vmlinz-2.4.20-8 Ro root = label =/VGA = 0x314 to set screen resolution
Restart the system to enter the character Interface
Run commands
#./Gameboard-qws
You can.
Transplantation of QT to arm Board:
With QtopiaCore-4.3.5-arm, it can be achieved in the following two ways
Compile
#./Configure-Embedded ARM
# Make
# Make install
Method 1:
First set the environment variables, the default installation path/usr/local/trolltech/QtopiaCore-4.3.5-arm:
# Vi. bash_profile
1. Add the improved qtopiacore-arm/bin environment variable before the original path.
2. Enter the folder of source code to be transplanted to the arm board, and enter the command
# Qmake-Project
# Qmake
# Make
# File gameboard // check whether the file is compiled with a QtopiaCore-4.3.5-arm
3. Upload the compiled executable file to the arm board and run it. When the arm prompts the missing library file, add the corresponding library file until the file is successfully added.
Note:
A. Some library files may be linked files. In this case, we only need to upload the final file to the arm and enter the command on the arm terminal.
# Ln-S <final file name pointed to by the linked File> <link file name>
You can create a soft link.
B. Make sure to add environment variables and execute commands.
# Export LD_LIBRARY_PATH =/mnt/yaffs
C. In addition to the yaffs directory on the arm Board, other directories cannot be written, but you do need to add something to/usr/lib or some other directories. In this case, you can run the command to mount the virtual content.
# Mount-T ramfs/usr/lib
Method 2:
This method is a common porting method.
1. Obtain a root file system root. cramfs to be written to the arm board.
2. Download a compressed package of the mkcramfs and cramfsck commands of cramfs.tar.gz, decompress and make, and run the mkcramfs and cramfsck executable programs.
Copy to/usr/bin
3. view the image file and type the command
# Cramfsck-x <target File> <source Image File> for example, # cramfsck-x rootfs. cramfs
4. # import CD rootfs to the target file
5. Open another terminal, add the new qtopiacore-arm environment variable before the original path, enter the folder of the source code to be transplanted, and enter the command
# Qmake-Project
# Qmake
# Make
Use qtopiacore-arm to generate an executable program (my name is) gameboard.
6. Type A command to check whether the executable program of the generated gameboard is used to run on the arm board.
# File gameboard
7. Copy the generated gameboard to the Home Directory of the target rootfs file.
8. Run the command to check the database support required to run the executable program on the arm board.
# Arm-Linux-readelf-A gameboard | grep shared
9. Add the required library files found in Step 8 to the lib directory under the target file of rootfs
10. Run the command to make the target rootfs file into the image file of the root file system of rootfs. cramfs
# Mkcramfs rootfs. cramfs
11. Rewrite the image file of the root file system of rootfs. cramfs to the arm board.
12. Run
#./Gameboard-qws
Qws indicates running as a graphic window server.
Note: The default frame buffer (framebuffer) is/dev/fb0. If not, run the following command to create a soft connection:
# Cd/dev
# Ln-s FB/0 fb0
Appendix: For details about how to burn and write the root file system, refer to cross-compilation environment Establishment
Http://blog.csdn.net/xiaozhi_su/archive/2009/03/21/4011311.aspx