Before the company to do Android system development, the server compiled environment I came to configure, summed up a document, the document has been placed for a long time, one to share with you, and to prevent loss.
1.JDK environment variable Configuration
Upload mtkoss.tar.gz to/directory, using command: #tar –xvzf mtkoss.tar.gz
Modify the/etc/profile file to include environment variables:
JAVA_HOME=/mtkoss/jdk/1.6.0_45-ubuntu-10.04/x86_64JRE_HOME=/mtkoss/jdk/1.6.0_45-ubuntu-10.04/xCLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JRE_HOMEPATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
2. Configure Android Compilation Environment: (Can execute android_compile_env.sh script directly)
#sudo Apt-get Install Git-core GnuPG Flex Bison Gperf build-essential Zip Curl Libc6-dev Libncurses5-dev: i386 X11proto-core-dev Libx11-dev: i386 Libreadline6-dev: i386 LIBGL1-MESA-GLX: i386 Libgl1-mesa-dev g++-multilib Mingw32 OPENJDK-6-JDK Tofrodos Python-markdown libxml2-utils Xsltproc Zlib1g-dev: i386
3. Reduce the gcc/g++ version (Ubuntu default gcc/g++ version is a bit high)
# sudo apt-get install gcc-4.4
# sudo apt-get install g++-4.4
#sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40
#sudoupdate-alternatives–install/usr/bin/g++g++/usr/bin/g++-4.440
#sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.6 30
#sudoupdate-alternatives–install/usr/bin/g++g++/usr/bin/g++-4.630
Select the version of gcc/g++ 4.4:
# sudo update-alternatives –config gcc
# sudo update-alternatives –config g++
In addition, the MTK code has its own compilation script root directory, ending with. SH, the default setting is the Java JDK compilation path, to be set to its own JDK compilation path to compile through.
Android System build Environment