Build Android on 64bit Ubuntu-12.10
1. Installing the JDK
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
2. Installing the required packages
sudo apt-get install vim minicom ckermit meld ccache indent ssh subversion tree \
libgmp3c2 libgmpxx4ldbl libgmp3-dev libmpc2 libmpc-dev libmpfr-dev libmpfr4 \
libxtst-dev libxtst6 libxtst6-dbg texlive xorg-dev libtool autoconf autoconf2.13 \
binutils-dev uboot-mkimage
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl \
zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev \
libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc readline-common libreadline6-dev \
libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 \
lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 \
libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev \
squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3. Installing the gcc-4.6
Ubuntu 12.10 ships with gcc 4.7, which is too recent to build Android 2.3/4.0. Hence, we need to install gcc 4.6, and make it the default version used on your system:sudo apt-get install gcc-4.6 g++-4.6 gcc-4.6-multilib g++-4.6-multilib
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 50
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 100
sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.7 50
sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 100
sudo update-alternatives --set g++ /usr/bin/g++-4.6
sudo update-alternatives --set g++ /usr/bin/gcc-4.6
sudo update-alternatives --set cpp-bin /usr/bin/cpp-4.6
Links
http://forum.xda-developers.com/showthread.php?t=2043285
http://git.free-electrons.com/training-materials/tree/labs/android-first-compilation/android-first-compilation.tex?id=f67a9d2718836588f4c4c7671f850eebbcde59c5
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home