49
RSB-6410 Android User Manual
Chapter 4
A
ndroid
OS
4.3
Set up Build Environment
All instructions in this guide are based on Ubuntu 14.04 64-bit only. Please install
Ubuntu 14.04 64bit with minimum 2GB DRAM in advance, login to the installed sys-
tem and perform the following:
4.3.1
Installing JDK
root@PcName:~#
sudo apt-get update
root@PcName:~#
sudo apt-get install python-software-properties
1.
Get jdk-6u45-linux-x64.bin from android-source-code-directory/tools/
2.
Follow these steps to install JDK 6
4.3.2
Installing Required Packages
sudo apt-get install bison build-essential ccache curl dpkg flex gcc g++ gettext git-
core gnupg gperf g++-multilib ia32-libs intltool lib1g-dev lib32ncurses5-dev
lib32readline5-dev lib32z-dev libarchive-zip-perl libc6-dev libdbus-glib-1-dev
libfreetype6-dev libgl1-mesa-dev libgtk2.0-dev liblzo2-2 liblzo2-dev libncurses5-dev
liborbit2-dev libtool libx11-dev libxml2-utils libxml2-dev m4 mingw32 patch python-
markdown rpm tcl uboot-mkimage uuid uuid-dev tofrodos x11proto-core-dev xsltproc
zip zlib1g zlib1g-dev
4.3.3
Toolchain setup
Before building an Android system, you need setup the toolchain.
Android toolchain is under android/prebuilds.Please refer to 4.2.1
Setup the toolchain path to point to arm-eabi- tools in android/prebuilds/gcc/linux-
x86/arm/arm-eabi-4.6/bin,the command is:
root@PcName:~#
export
PATH=$ANDROID_DIR/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH
$ x jdk-6uXX-linux-x64.bin
$ ./jdk-6uXX-linux-x64.bin
$ sudomkdir -p /usr/lib/jvm
$ sudo mv jdk1.6.0_XX /usr/lib/jvm/
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_XX/
bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/
jdk1.6.0_XX/bin/javac" 1
$ sudo update-alternatives --config java
$sudo update-alternatives --config javac