Android Deep Exploration (Vol. 1) HAL and Driver Development chapter Fourth

Source: Internet
Author: User

Configure Android source code Download Environment

(1) Create a directory to hold the download script file (repo) (you can put the script file in any directory, use ~/binhere). #mkdir ~/bin #PATH =~/bin: ¥PATH

(2) Download the script file (to download the Android source code). #curl HTTPS://dl-ssl. google.com/dl/googlesource/git-repo/repo>~/bin/repo #chmod a+x ~/bin/repo

(3) Create a directory to hold the Android source code (which can be placed in another directory). #mkdir android-source #cd android-source

(4) Initialize the #rcpo init-u https://android.googlesource.com/platform/manifeet #repo init-u https:// Android.googlesource.com/platform/manifest -B android-4.0.1-rl

(5) Start download Android Source code #repo Sync

Compiling Android Source code

Apt-get commands typically require root access, so follow the sudo command generally.    

sudo apt-get install Git-core curl

This command installs Git-core and Curlfrom the internet's software repository.    

where Curl is a File Transfer tool that works with URL syntax in command-line mode, and it supports many protocols, including FTP,FTPS ,HTTP,HTTPS,telent , etc., we need to install it from the network to get Repo script file.    

Curl Http://android.git.kernel.org/repo >~/bin/repo

This command downloads the repo script file to the current home directory under the /bin directory and saves it in the file repo .    

Finally, we need to Execute permissions on the repo file.

chmod a+x ~/bin/repo

To Be continued ...

Download and compile the Linux kernel source code

1. Using the Git tool to download, execute the following command:

      [email protected]:~/android$ mkdir Kernel

[Email protected]:~/android$ CD kernel
[Email protected]:~/android/kernel$ git clone git://android.git.kernel.org/kernel/common.git
Also after a long wait, in the kernel directory there is a common directory, the Linux kernel code is here.
2. After the download is complete, you can view the downloaded kernel code version:
[Email protected]:~/android/kernel$ CD Common
[Email protected]:~/android/kernel/common$ git branch
android-2.6.36
3. After downloading the Linux kernel code for Android, you will find that there is no hardware profile for the emulator to use under Arch/arm/configs goldfish_defconfig

After the download is complete, you can see the Goldfish_defconfig file under Arch/arm/configs.

Android Deep Exploration (Volume 1) HAL and Driver Development chapter fourth

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.