Android system porting and Driver Development Chapter Fourth reading notes

Source: Internet
Author: User

1 , Download the source code

To download the source code, you first need to install the following tool software: Curl and Git-core

1.1 Installing Curl:

Open terminal, you can open terminal by using the shortcut of Ctrl+alt +t

Execute command in terminal: sudo apt-get install curl

1.2 Installing Git-core

1.2.1 Creating a new Bin directory under the user directory

Execute in Terminal: mkdir ~/bin

1.2.2 Installation Git-core

Execute in Terminal: Curl Https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

Execute permissions for repo: chmod a+x ~/bin/repo

Add ~/bin environment variable to execute command in Terminal: Path=~/bin: $PATH

1.3 Download Source code

Go to the directory where the source code will be saved

Choose to download the latest source code, specific commands:

~/bin/repo init-u https://android.googlesource.com/platform/manifest-b android-4.3_r2.1

Execute this command will download some files to our computer, the main function of this command is to initialize the source code we want to download some of the configuration files, see similar to the following prompt, indicating initialization is complete.

Repo has been initialized In/opt/[email protected]:/opt/android4.3$

After initialization is complete, a. Repo directory is generated in the/opt/android4.3 directory (this directory is a hidden property file, we can use the Ls-la command in the terminal, or select "View" in the file browser, and then check "Show hidden files" to see this directory). This directory holds the information about the source code that will be downloaded, and below we start to download the source code

Synchronous access to source code

#~/bin/repo Sync

After the source code download is complete, the size of the/opt/android4.3 folder is around 20G, of which. Repo has ten g+.

2 , build the environment

Install the software required for compiling

1. Installing the JDK

When open, select Jdk-6u45-linux-x64.bin.

Modify the environment variables when you are finished installing.

2. Install some other software required for compiling

2.1 Compile initialization: Execute in Terminal: Source build/envsetup.sh or:. build/envsetup.sh

2.2 Select the compilation target: Execute the following command in the terminal: lunch

After selecting the device you want to compile, after selection, the related files of the compiled project are initialized.

2.3 Compile code: Execute in Terminal: MAKE-J4

-j4: Indicates a four thread compilation

3 , run Simulator, execute in Terminal: Emulator

Android system porting and Driver Development Chapter Fourth reading notes

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.