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