Build a distributed Android compiling environment

Source: Internet
Author: User

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.

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.