The fourth chapter: source code download pre-compilation

Source: Internet
Author: User

"Android Deep Exploration" (Vol. 1) HAL and Driver Development review:

The fourth chapter: source code download pre-compilation

In the third chapter, based on the use of Git, this chapter mainly introduces the use of git to download two sets of source code, one set is the Android source code, another set of Linux source code. Since the android transplant is primarily a Linux kernel transplant, the Linux source code is a core part of Android. While the Linux kernel porting is primarily a Linux-driven migration, in order to develop and test Linux drivers, it is necessary to build two development environments under Ubuntu Linux: Android Application development environment Amount Linux kernel development environment. The main purpose of this chapter is to describe how to build these two development environments, in which the Linux kernel development environment is the focus of this chapter!

Through the study of this chapter, I first understand the key content of learning the development of Android Drive, clear the importance of learning Linux drive development, second, I also learned to download, pre-compile, and test the Android source code and the Linux kernel source code related content. The Foundation for better learning about Android Drive development. There will be a clear direction and more interest in learning about Android Drive development.

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 analysis

3. Download part of the Android source code

There are two ways to download an item in the Android source code: Method One, using the Repo Sync command method Two, using the git clone command

4. Compiling Android source code

First step: Initializing the compilation Environment Step two: Select Target step three: 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, the core steps of downloading and compiling 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

Step one: Prepare for the second step: Unzip the compiler step three: Verify that the Cross compiler is installed successfully fourth step: Install LIBNCURSES5

4. Configuring and compiling the Linux kernel

Still in the last chapter, the best way is to read the code of interest, analyze the author's ideas through code, and summarize what belongs to him.

The fourth chapter: source code download pre-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.