Android, Linux kernel source code download and compilation

Source: Internet
Author: User

1. Configure the Android source code download environment
A. Create a directory to hold the download script file
mkdir ~/bin
Path=~/bin: $PATH
B. Download the repo script file
Curl Https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
C. Create a directory to hold the Android source code
mkdir Android_source
CD Android_source
D. Initialization
Repo Init-u https://android.googlesource.com/platform/manifest
E. Download
Repo Sync

2. Compiling Android source code
A. Initializing the compilation environment
SOURCE build/envsetup.sh
B. Selecting a target
Lunch Full-eng
C. compiling Android source code
MAKE-J4 (sets the number of cores to use at compile time)

3. Download the Linux kernel source code
A. git clone https://android.googlesource.com/kernel/goldfish.git (download kernel)
b. Git checkout-b android-goldfish-2.6.29 remotes/origin/android-goldfish-2.6.29

4. Install the Android kernel compilation environment
A. Modify the makefile file in the root directory of the Linux kernel source code, arch?= arm and cross_compile?=arm-none-linux-gnueabi-

5. Configure and compile the Linux kernel (assuming the Linux kernel source code directory is/root/linux_kernel)
Export Path=/root/compilers/arm-none-linux-gnueabi/bin: $PATH
CD ~/linux_kernel
Make clean
Make

Android, Linux kernel source code download and compilation

Related Article

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.