Before, I learned how to use git, and now we can finally use git to download the source code we need. The first thing we need to do is configure the Android source code download environment:
1th Step: Create a directory to hold the download script file (repo) (you can put the script file in any directory, use ~/bin here);
2nd step: Download the repo script file (to download the Android source code);
3rd Step: Create a directory to hold the Android source code (can be placed in other directories);
4th step: Initialize;
5th step: Download the Android source code
There are two ways to download a subproject in the Android source code: 1, using the Repo Sync command, 2, using the git clone command.
To compile steps for Android source code:
1th Step: Initialize the compilation environment # source build/envsetup.sh;
2nd step: Select the target;
3rd step: Compile the Android source code.
When we download the kernel code, we need to install the Android kernel's build environment:
1th Step: Preparation: Copy the arm-linux-gcc-4.3.2.tgz file and the arm-none-linux-gnueabi-arm-2008q3-72for-linux.tar.bz.2 file to the working directory.
2nd step: Unzip the compiler
Use the following command to extract the two compressed files above
#tar ZCVF arm-linux-gcc-4.3.2.tgc-c/
#tar JXVF arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2-c/
3rd Step: Verify that the Cross compiler is installed successfully
#ls/usr/local/arm-1
4th Step: Install libnctrses5 (install libnctrses mainly to configure the kernel, can provide a beautiful interface for the character interface of the Linux terminal)
# Apt-get Install Libncurses5-dev
Then configure and compile the Linux kernel, assuming that the Linux kernel source code directory is/root/linux_kernel, use the following command to compile the Linux kernel.
#export Path=/root/compilers/arm-none-linux-gnueabi/bin: $PATH
#cd ~/linux_kernel
#make Clean
# make
The following 4 configuration commands must be executed at the root of the Linux source code
Make Config;make menuconfig;make oldconfig;make xconfig
http://home.cnblogs.com/u/ligang1307/
Chapter fourth download and compile the source code--Reading notes