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