MTK最新编译环境

MTK的Android编译环境要求:

ubuntu版本要求: 12.04 64位

java版本要求:openjdk 1.7.0_55

Java 7: For the latest version of Android

$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk

配置默认jdk:

$ sudo update-alternatives –config java
$ sudo update-alternatives –config javac

Google要求:

You will need a 64-bit version of Ubuntu. Ubuntu 14.04 is recommended.

$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip

Installing required packages (Ubuntu 12.04)

You may use Ubuntu 12.04 to build older versions of Android. Version 12.04 is not supported on master or recent releases.

$ sudo apt-get install git 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 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

编译命令:

source build/envsetup.sh
lunch full_$project-eng (-eng,-user,-userdebug)
make -j$t 2>&1 | tee build.log ($t:cpu线程数)

基本清单:
1. Linux or Mac OS + 64bit
2. 16GB RAM/swap
3. 100GB free disk space for a checkout, 150GB for a single build, 200GB for multiple builds, ccache need more
4. python2.6-2.7
5. make 3.81-3.82
6. jdk7
7. git 1.7+