Android Deep explore HAL and Driver Development fourth chapter

Source: Internet
Author: User

Android Deep Explore HAL with driver development

Fourth Chapter

Download and compile the source code

Reading notes

First, download compile and test the Android Source code

1. Configure the Android Source code Download Environment

Create a directory to hold the download script file (you can put the file in any directory where you use -/bin)

# mkdir ~/bin

# Path=~/bin:$PATH

2. Download repo script file (for download Android source code)

# Curl Htttps://dl-ssl.google.com/dl/googlesource/git-repo/repo> ~/bin/repo

# chmod A+x ~/bin/repo

Repo files are primarily designed to simplify the download of Android source code.

3. Create a directory to hold the Android Source code

# mkdir Android_source

# CD Android_source

4. Initialization

# repo Init-u Https://android.googlesource.com/platfrom/fest

5. Download Android Source code

# Repo Sync

6. Download part of Android source code

Method One: Use the repo sync command

Method Two: Use the git clone command

7. Compiling Android Source code

First step: Initializing the compilation environment

# source build/envsetup.sh or #. Build/envsetup.sh

Step Two: Select the target

# Iunch Fuil-eng

Part III: Compiling Android Source code

# make

# MAKE-J4

Second, download and compile the Linux kernel source code

1. Download the Linux kernel source code

# git clone https://android.gonglesource.com/kernel/common.git

2, install the Android kernel compilation environment

ARCH =arm.

cross_comoplle?=arm-none-linux-gnueabi-

3. Configuring and compiling the Linux kernel

# Expoit Path=/root/compilsers/arm-none-linux-gnueabi/bin: $PATH

# CD ~/linux_kernel

# Make Clean

# make

The Make clean command clears most of the files generated by the compilation, but retains the configuration file.

Make_xconfig: Configure the Linux kernel in graphical form .

(If you are prompted not to install qt , install qt with this command :# apt-get install Libqt4-dev)

4. Note that the signature of the cross-compilation environment is important, using the Make menucofing command

Third, summary

Android porting ———linux kernel porting ———linux Drive porting

Developing and Testing Linux drivers requires installing the Android Application development environment and the Linux kernel development environment.

http://www.cnblogs.com/qwhw/

Android Deep explore HAL and Driver Development 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.