Because the android source code extracted by Google git is not configured for Distributed compilation, you need to use some tools to build a distributed compilation environment to speed up Android compilation. The following steps are performed on centos 5.2, for more information, see.
1) install the DistCC RPM package
Rpm-IVH distcc-2.18.3-2.el5.rf.i386.rpm
Rpm-IVH distcc-server-2.18.3-2.el5.rf.i386.rpm
2) enable the system to load the distccd service process by default at startup.
Shell-> setup-> System Service-> distccd select this option
Start the distccd Service
/Etc/rc. d/init. d/distccd start
3) copy the compiler to the specified system directory.
All machines involved in Distributed compilation must install the cross compiler under a specific directory,
Arm-linux-4.1.1->/usr/local # This compiler is required for Kernel Compilation
Prebuilt->/usr/local # This compiler is required for Android Compilation
4) modify the configuration file
VI/etc/sysconfig/distccd # Add the following lines
Options = "-nice10-jobs5-Allow 192.168.0.0/16"
User = "DistCC"
Mkdir/etc/DistCC/
VI/etc/DistCC/hosts # Add the host involved in Distributed compilation to the hosts list, such
Localhost/1 192.168.80.3/1 192.168.80.5/1...
5) Create the DistCC home directory
Mkdir-P/home/DistCC
Chown DistCC. DistCC/home/DistCC
6) start to compile the source code.
CD cupcake
. Build/envsetup. Sh
Tapas # configuration options will pop up for this command
Compile after configuration is complete.
Make-J20 #20 indicates that 20 threads are compiled simultaneously.