diff --git a/pdk/docs/guide/build_system.jd b/pdk/docs/guide/build_system.jd index b63248b6c..158a0a76e 100755 --- a/pdk/docs/guide/build_system.jd +++ b/pdk/docs/guide/build_system.jd @@ -21,7 +21,7 @@ pdk.version=1.0 Checking Out a Branch
Verifying Location
-Building the Kernel
+Building the Kernel

Introduction

@@ -134,28 +134,14 @@ PRODUCT_NAME := google_generic

Device Code

-

Of the two options below, the first tends to yield more consistent results.

- - -

Option 1

- -

Create a local version of buildspec.mk. The easiest way to do so is to change to your device directory and execute the following:

-
% cp buildspec.mk.default buildspec.mk ; chmod u=rw buildspec.mk
-

The default buildspec.mk. file is written so that all options appear commented. In order to establish a personal configuration environment, edit buildspec.mk as desired.

-

Once you have established your configuration environment, you can build the device code base by executing make in order to build the Android binaries. This may take a long time the first time you issue this command. On a dual-core machine, consider using '-j2' (or even '-j4') to speed up the build.

-
% make -j2
- - -

Option 2

- -

To do a generic build of android, source //device/envsetup.sh, which contains necessary variable and function definitions, as described below.

+

To do a generic build of android, source build/envsetup.sh, which contains necessary variable and function definitions, as described below.

 % cd $TOP
 
-% . envsetup.sh
+% . build/envsetup.sh
 
-% partner_setup generic
-   //select generic as the product
+# pick a configuration using choosecombo
+% choosecombo
 
 % make -j4 PRODUCT-generic-user
 
@@ -168,19 +154,19 @@ PRODUCT_NAME := google_generic

Cleaning Up

-

Execute % m clean to clean up the binaries you just created. You can also execute % m clobber to get rid of the binaries of all combos. % m clobber is equivalent to removing the //device/out/ directory where all generated files are stored.

+

Execute % m clean to clean up the binaries you just created. You can also execute % m clobber to get rid of the binaries of all combos. % m clobber is equivalent to removing the //out/ directory where all generated files are stored.

Speeding Up Rebuilds

-

The binaries of each combo are stored as distinct sub-directories of //device/out/, making it possible to quickly switch between combos without having to recompile all sources each time.

+

The binaries of each combo are stored as distinct sub-directories of //out/, making it possible to quickly switch between combos without having to recompile all sources each time.

However, performing a clean rebuild is necessary if the build system doesn't catch changes to environment variables or makefiles. If this happens often, you should define the USE_CCACHE environment variable as shown below:

 % export USE_CCACHE=1
 

Doing so will force the build system to use the ccache compiler cache tool, which reduces recompiling all sources.

-

ccache binaries are provided in //device/prebuilt/... and don't need to get installed on your system.

+

ccache binaries are provided in //prebuilt/... and don't need to get installed on your system.

Troubleshooting

@@ -211,7 +197,7 @@ Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

To build the kernel base, switch to the device directory (/home/joe/android/device) in order to establish variables and run:

-% . envsetup.sh
+% . build/envsetup.sh
 % partner_setup generic
 

Then switch to the kernel directory /home/joe/android/kernel.