Android Deep Exploration-Volume 1 the fourth chapter

Source: Internet
Author: User
Tags bz2

Use git to download two sets of source code, one set is the Android source code, one set is the Linux kernel source code. Since Android porting is primarily a migration of the Linux kernel, and the Linux kernel porting is primarily a Linux-driven migration, in order to develop and test Linux drivers, the Ubuntu Linux Build two sets of development environments: Android application development environment and Linux kernel development environment.

First, download, pre-compile, and test the Android source code core steps:

1. Configure the Android source code download environment

(1) Create a directory to hold the download script file (repo)

(2) Download repo script file

(3) Create a directory to hold the Android source code

(4) initialization

(5) Start downloading Android source code

2.Android Source code directory structure parsing

3. Download part of the Android source code

(1) Method 1: Use the Repo Sync command

(2) Method 2: Use the git clone command

4. Compiling Android source code

(1) Initializing the compilation environment

(2) Select Directory

(3) Compiling Android source code

5.OUT Directory Structure Analysis

6. Publish your apk as an Android built-in program

7. Test the System.img file with the simulator

Second, download and compile the Linux kernel source code

1. Download the Linux kernel source code

Directory structure of 2.Linux kernel source code

3. Install the Android kernel's build environment

(1) Preparation: Copy the arm-linux-gcc-4.3.2.tgz file and the arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 file to the working directory.

(2) Unzip the compiler using the following code to extract the above two compressed files

# tar ZXVF arm-linux-gcc-4.3.2.tgz-c/

# tar JXVF arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2-c/

(3) Verify that the cross-compiler is successfully installed

# ls/usr/local/arm–l

(4) Installation libncurses5

# Apt-get Install Libncurses5–dev

4. Configuring and compiling the Linux kernel

#export Path=/root/comppilers/arm-none-linux-gnueabi/bin: $PATH

Android Deep Exploration-Volume 1 the fourth chapter

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.