Miqipi/Build environment
From wiki
Create it own
To compile Android, requirement of PC is:
- 64 bit CPU
- 16GB physical memory + swap memory
- 30GB free disk space to build. The source code tree take another 25GB space.
- Ubuntu 14.04 is officially recommended. However, Ubuntu 12.04 is confirmed to be supported, providing the requirements of software and hardware in http://source.android.com/source/building.html are met.
To initialize compiling environment, please reference http://source.android.com/source/initializing.html .
- Install OpenJDK 7:
sudo apt-get install openjdk-7-jdk
Tips: After installing openjdk-7-jdk, you might need to fix JDK's default link:
$ sudo update-alternatives --config java $ sudo update-alternatives --config javac
to switch JDK version. SDK will switch to internal JDK path once the default one cannot be found. Therefore, in order to compile Android 5.1 and before, removing the JDK7 link is more preferable:
$ sudo /var/lib/dpkg/info/openjdk-7-jdk:amd64.prerm remove
- Ubuntu 12.04 packages install:
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 \ g++-multilib mingw32 tofrodos gcc-multilib ia32-libs \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ lzop libssl1.0.0 libssl-dev
- Ubuntu 14.04 packages install:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev \ libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl \ libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \ xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev \ lib32readline-gplv2-dev gcc-multilib libswitch-perl \ libssl1.0.0 libssl-dev
Virtual machine
if you don't want to setup the environment by self,we have set a v-box virtual machine OS img for you,this OS is tested by us can build the Android source success!