This chapter mainly describes how to download and compile the Android source code and the Linux kernel source.
1. Download, compile and test Android source code
Configure the Android source code download environment:
First step: Create a directory to hold the download script file (repo) (you can put the script file in any directory where you use ~/bin)
# mkdir ~/bin
# Path=~/bin: $PATH
Step two: Download the repo script file (for downloading Android source code)
# Curl Https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
# Chnod A+x ~/bin/repo
Step three: Create a directory to hold the Android source code
# mkdir Android_source
# CD Android_source
Fourth step: Initialize.
Fifth step: Start downloading Android source code
# Repo Sync
2. Download part of the Android source code
Method One: Use the Repo Sync command
Method Two: Use the git clone command
3. Compiling Android Source code
First step: Initialize the build environment # source Build/envsetup. Sh
Step two: Select Target # Lunch Full-eng
Step three: Compile Android source code # make
Download and compile the Linux kernel source code: Download the Linux kernel source code, the directory structure of the Linux kernel source code, install the Android kernel's compilation environment, configure and compile the Linux kernel.
Welcome to visit my blog address http://home.cnblogs.com/u/haihaizhazha/
Android Deep explore HAL and Driver Development fourth chapter