From CCMOVE(
http://club1.ccmove.com/nclub/topicd...-682222-1.html)
yan0's computer:
Desktop PC: Install Linux; Notebook: WinXP+SP2. Using cable to connect 2 PC to exchange data.
Please install Linux OS first.
Data exchange between Linux and Windows:
1、Linux: Can read/copy files from Windows drivers directly.
2、Windows: Can run the program of "explore2fs-1.08beta9.exe" and access linux ext partition to read/copy files. Just download and run it.
explore2fs-1.08beta9.rar
The files prepare for cross-compile:
release.rar, filesize 124M. Please download first:
Download URL1: Release.rar
Download URL1: Release_yan0.rar
Refer:
1、YouHeng's EZX cross compile setting for E680/i
2、pcs306's first native ezx
3、psysun's source of ezxphoneassist,tbsl,lcdsleep
A1200/E6 cross-compile setting:
Please use WINRAR to extract release.rar on Win2K or XP and get below files:
A1200_lib --include lib.gz,usr_lib.gz
ezx-sdk.tar.gz
Other_lib_headers.gz
qt-2.3.gz
tmake-1.8.tar.gz
xscale-gcc-vfp-3.3.tar.gz
Step on Linux: Please notes difference of upcase and lowcase:
1、login with root
2、Step in GUI:
a. Open root folder, then open "home", create a new folder and name as "mkezx". Open "mkezx" and create new folder of "myfile" to put our source file.
b. Copy these files in the folder of "mkezx": usr_lib.gz,ezx-sdk.tar.gz,Other_lib_headers.gz,qt-2.3.gz,tmake-1.8.tar.gz,xscale-gcc-vfp-3.3.tar.gz
3、Step in terminal(Start-program-accessories-Terminal)
a. Go to the directory of root:cd /
b. Extract xscale-gcc-vfp-3.3.tar.gz:
tar xvzf /home/mkezx/xscale-gcc-vfp-3.3.tar.gz
c. Go to the folder of "mkezx":cd /home/mkezx
d. Extracr below files:
tar xvzf qt-2.3.gz
tar xvzf ezx-sdk.tar.gz
tar xvzf Other_lib_headers.gz
tar xvzf tmake-1.8.tar.gz
tar xvzf usr_lib.gz
Now there are new folder created under /home/mkezx: qt-2.3.6,ezx,other,tmake-1.8,lib,usr. You can delete all files end with "gz" if you like.
4、Step in GUI:
a. copy all files in ezx/include to qt-2.3.6/include;
b. Copy all files in other/include to qt-2.3.6/include;
c. copy all files begined with libezx in usr/lib to qt-2.3.6/lib;
d. Copy all files and all subfolder in usr/lib/ezx/lib to qt-2.3.6/lib.
5、Setup tmake:
a. In tmake-1.8/lib/qws, duplicate the folder of "linux-arm-g++" and name as "linux-e680-g++;
b. In folder of "linux-e680-g++", double click tmake.conf to edit line 53:
Original content:TMAKE_LIBS_QT = -lqte
Revied to:
TMAKE_LIBS_QT = -lezxappsdk -lipp-jp -lezxopenwindow -lipp-miscGen -lezxappbase -lqte-mt -lezxjpeg
Ok, yan0 has followed above steps and can cross-compile below sample program file.
Cross-Compile Our Own Program
Set up enviroment before cross-compile:
export PATH=/usr/local/arm/bin:/home/mkezx/tmake-1.8/bin:$PATH
export QTDIR=/home/mkezx/qt-2.3.6
export TMAKEPATH=/home/mkezx/tmake-1.8/lib/qws/linux-e680-g++
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
We can save these commands as a file named as "path" and store in myfike folder. Open Termianl, go to myfile folder:cd /home/mkezx/myfile
Run this path file, notes there is a space between 2 ".": . ./path
To better know the compile step, yan0 provide a sample, please download it first:
yan0_file1.rar
Extract under Win2k or Xp to get 3 files: path,test1.cpp,test1. path is the file contain above env setting; test1.cpp is source program, yan0 has written English deSCRIPTion. test1 is compiled from test1.cpp, it can run on A1200/E6 under telnet.
Copy path,test1.cpp to /home/mkezx/myfile。
Open Terminal to go to myfile: cd /home/mkezx/myfile
Run path,notes there is a space between 2 ".": . ./path
Follow below step to compile our program:
progen test1.cpp >test1.pro
tmake test1.pro >Makefile
make
After make, test1 will be created that can be run on A1200/E6.
If revised test1.cpp, just enter make to re-compile. If not change on test1.cpp and need to re-compile, enter "rm -f *.o" then make.
yan0 provided test1.cpp with 3 functins: To display Chinese word; Display a dialog with 3 buttons; Return selected button code; Display a dialog with down count while select Yes.
If delete "//" in line 37 and re-compile, running test1 on phone, select Yes will lead phone to restart.
Phone display after running test1 on phone.
How to display system icon in dialog, yan0 has no way till now.
Running program on Phone:
Phone connect with computer Win2K/XP thru USB mode
On Win2k/XP, open phone folder thru \\192.168.16.2\system, open TF/SD card by open mmc/mmca1, create a new folder and name as test. Copy test1 from computer to the folder of test in phone.
Telnet phone and login with root.
Go to test foler:cd /mmc/mmca1/test
Set up environment:. /home/native/.profile Notes there is space between first "." and "/"
Run test: ./test1 No space in it