***************************************************************************************************************************
作者:EasyWave 时间:2012.11.03
类别:Android system 分析 声明:转载,请保留链接
注意:如有错误,欢迎指正。这些是我学习的日志文章......
***************************************************************************************************************************
1: Setup the Ubuntu10.04 source.list file and update source.list file
a: You have to modify source.list file in /etc/apt folder on the ubuntu10.04 LST.Because the Source.list file doesn't support java on the Ubuntu10.04 LST.
b: You need to add a line codes in end line of source.list file.
c: You need to execute sudo apt-get update on the terminal.
deb http://cz.archive.Ubuntu.com/ubuntu hardy-updates main multiverse
$ sudo apt-get update
2: Need to install packages as below
$ sudo apt-get install git-core
$ sudo apt-get install gnupg
$ sudo apt-get install flex
$ sudo apt-get install bison
$ sudo apt-get install gperf
$ sudo apt-get install libsdl-dev
$ sudo apt-get install libesd0-dev
$ sudo apt-get install build-essential
$ sudo apt-get install zip
$ sudo apt-get install curl
$ sudo apt-get install libncurses5-dev
$ sudo apt-get install zlib1g-dev
3: Need to install Java JDK
$ sudo apt-get install sun-java5-jre sun-java5-plugin sun-java5-fonts sun-java5-jdk
or
$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts sun-java6-jdk
Note: Run make doc command maybe error on the java6 in the Android system.So we need to install sun-java6-jdk after,and to install sun-java5-jdk or install sun-java5-jdk only.
If you are using java6 and at the same time to use sun-java5-jdk, you need to modify some files in the Ubuntu10.04 LST.
The code modify as below:
$ cd etc/alternatives
$ sudo rm javadoc.1.gz
$ ln -s /usr/lib/jvm/java-1.5.0-sun/man/man1/javadoc.1.gz javadoc.1.gz
$ sudo rm javadoc
$ ln -s /usr/lib/jvm/java-1.5.0-sun/bin/javadoc javadoc
4: Ubuntu10.04 setup defalut path:
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
JRE_HOME=$JAVA_HOME/jre
HOME_BIN=~/bin/
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$HOME_BIN:$PATH
export JAVA_HOME;
export JRE_HOME;
export CLASSPATH;
5: Install compiler tool and download android source
$ cd ~
$ mkdir bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir android
$ cd android
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo sync
Downloading JPEG picture as below:
6: Download the kernel source
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/exynos.git
$ git clone https://android.googlesource.com/kernel/goldfish.git
$ git clone https://android.googlesource.com/kernel/msm.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
$ git clone https://android.googlesource.com/kernel/tegra.git
a:The goldfish project contains the kernel sources for the emulated platforms.
b:The msm project has the sources for ADP1, ADP2, Nexus One, and can be used as a starting point for work on Qualcomm MSM chipsets.
c:The omap project is used for PandaBoard and Galaxy Nexus, and can be used as a starting point for work on TI OMAP chipsets.
d:The samsung project is used for Nexus S and can be used as a starting point for work on Samsung Hummingbird chipsets.
e:The tegra project is for Xoom and Nexus 7, and can be used as a starting point for work on NVIDIA Tegra chipsets.
f:The exynos project can be used as a starting point for work on Samsung Exynos chipsets.
$ git branch -a
$ git checkout android-3.3
$ git checkout -b android-2.6.39 origin/android-2.6.39
I have downloaded goldfish and samsung kernel source... Downloading JPEG picture as below: