Chapter fourth download and compile the source code--Reading notes

Source: Internet
Author: User
Tags how to use git

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.