Android module Compilation

Source: Internet
Author: User

Every time boardconfig. mk was modified, it was silly to make clean and re-compile it. This wasted countless times. Later, I couldn't stand this kind of efficiency. I Googled it. As expected, modules can be compiled independently.

1. Go to the android source code root directory and execute source build/envsetup. Sh;

2. You can execute compilation commands for mm, mmm, and other modules. To compile audioflinger, run Mmm frameworks/base/services/audioflinger/-B.

3. Make-Snod to regenerate the system. IMG image.

 

Remove some annotations of envsetup. Sh as follows:

Invoke ". Build/envsetup. Sh" from your shell to add the following functions to your environment:
-Croot: Changes directory to the top of the tree.
-M: makes from the top of the tree.
-Mm: builds all of the modules in the current directory.
-Mmm: builds all of the modules in the supplied directories.
-Cgrep: greps on all local C/C ++ files.
-Jgrep: greps on all local java files.
-Resgrep: greps on all local Res/*. XML files.
-Godir: Go to the directory containing a file.

 

Toolchains required for compiling android2.3:

1. Install jdk1.6: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

Set environment variables:

Export java_home = <jdk_path>
Export java_bin = <jdk_path>
Export Path = $ java_home/bin: $ path
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export java_home java_bin path classpath

2,

Sudo apt-Get install flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev Git-core GnuPG
Sudo apt-Get install x11proto-core-dev libx11-dev

3. My system is 64 bits. You also need:

Sudo apt-Get install libc6-dev lib32ncurses5-dev ia32-libs lib32readline5-dev g ++-multilib

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.