diff options
| author | Reena Lee <reena@google.com> | 2009-06-11 13:26:29 -0700 |
|---|---|---|
| committer | Reena Lee <reena@google.com> | 2009-06-11 13:26:29 -0700 |
| commit | d39413e917afd051d0f13d7a518e9901683f191a (patch) | |
| tree | c560ba8ba1cac4681784b5e24205283e7182a943 /pdk | |
| parent | 8d8d3249669149a68f3250cb580d7bfa1dd101dc (diff) | |
| download | android_development-d39413e917afd051d0f13d7a518e9901683f191a.tar.gz android_development-d39413e917afd051d0f13d7a518e9901683f191a.tar.bz2 android_development-d39413e917afd051d0f13d7a518e9901683f191a.zip | |
- Moved the build variants descriptions into build_system
- Added Makefile stub into sensors.jd as a starting point
- Small cleanup to build_new_device to reference the PRODUCT_* parameters
- Fixed URL in the README for app engine testing
Diffstat (limited to 'pdk')
| -rw-r--r-- | pdk/README | 4 | ||||
| -rwxr-xr-x | pdk/docs/guide/build_new_device.jd | 87 | ||||
| -rwxr-xr-x | pdk/docs/guide/build_system.jd | 74 | ||||
| -rwxr-xr-x | pdk/docs/guide/sensors.jd | 21 |
4 files changed, 106 insertions, 80 deletions
diff --git a/pdk/README b/pdk/README index 036912df3..229db43b9 100644 --- a/pdk/README +++ b/pdk/README @@ -58,9 +58,9 @@ Here's the command to run the pdk-docs server locally: python <path_to_appengine_installation>/dev_appserver.py --address 0.0.0.0 \ <path_to_cupcake_code>/android/out/target/common/docs -To verify it is working you can access it with a browser loacally on port 8080: +To verify it is working you can access it with a browser locally on port 8080: -http://localhost:8080/index.html +http://localhost:8080/online-pdk/guide/index.html NOTE: If you are trying to get to the appengine local testing instance remotely you will have to ssh tunnel into your linux box as appengine only serves the web diff --git a/pdk/docs/guide/build_new_device.jd b/pdk/docs/guide/build_new_device.jd index 2e2b367f8..895ed3dbc 100755 --- a/pdk/docs/guide/build_new_device.jd +++ b/pdk/docs/guide/build_new_device.jd @@ -11,6 +11,7 @@ pdk.version=1.0 <ul> <li><a href="#androidOHDPortingDeviceBuildingProcess">Detailed Instructions</a></li> <li><a href="#androidBuildNewFileTree">New Product File Tree</a></li> +<li><a href="#androidBuildSystemProductDefFiles">Product Definition Files</a></li> </ul> </div> </div> @@ -18,7 +19,7 @@ pdk.version=1.0 <a name="androidOHDPortingDeviceBuildingProcess"></a><h3>Detailed Instructions</h3> -<p>The directions below describe how to configure make files for new mobile devices and products.</p> +<p>The steps below describe how to configure makefiles for new mobile devices and products running Android.</p> <ol> <li>Create a company directory in <code>//vendor/</code>.<br/> <pre class="prettyprint"> @@ -26,13 +27,15 @@ pdk.version=1.0 <li>Create a <code>products</code> directory beneath the company directory you created in step 1.<BR> <pre class="prettyprint"> mkdir vendor/<company_name>/products/</pre></li> - <li>Create a product-specific make file, called <code>vendor/<company_name>/products/<first_product_name>.mk</code>, that includes the following code:<BR> + <li>Create a product-specific makefile, called <code>vendor/<company_name>/products/<first_product_name>.mk</code>, that includes at least the following code:<BR> <pre class="prettyprint"> $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk) # # Overrides PRODUCT_NAME := <first_product_name> - PRODUCT_DEVICE := <board_name></pre></li> + PRODUCT_DEVICE := <board_name></pre> + Additional product-specific variables can be added to this <a href="#androidBuildSystemProductDefFiles">Product Definition</a> file. + </li> <li>In the <code>products</code> directory, create an <code>AndroidProducts.mk</code> file that point to (and is responsible for finding) the individual product make files.<BR> <pre class="prettypring"> # @@ -51,7 +54,7 @@ pdk.version=1.0 <li>Create a board-specific directory beneath your company directory that matches the <code>PRODUCT_DEVICE</code> variable <code><board_name></code> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.<BR> <pre class="prettyprint"> mkdir vendor/<company_name>/<board_name></pre></li> - <li>Create a <code>product_config.mk</code> file in the directory created in the previous step (<code>vendor/<company_name>/<board_name></code>). If this directory does not include a <code>product_config.mk</code> file, the build will fail.<BR> + <li>Create a <code>BoardConfig.mk</code> file in the directory created in the previous step (<code>vendor/<company_name>/<board_name></code>). <BR> <pre class="prettyprint"> # These definitions override the defaults in config/config.make for <board_name> # @@ -71,7 +74,7 @@ pdk.version=1.0 PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/first_product_name.mk \ $(LOCAL_DIR)/second_product_name.mk</pre></li> - <li><code>vendor/<company_name>/<board_name></code> must include an <code>Android.mk</code> file with at least the following code:<BR><BR> + <li>An <code>Android.mk</code> file must be included in <code>vendor/<company_name>/<board_name></code> with at least the following code:<BR> <pre class="prettyprint"> # make file for new hardware <board_name> from <company_name> # @@ -94,7 +97,10 @@ pdk.version=1.0 include $(CLEAR_VARS) # # include more board specific stuff here? Such as Audio parameters. - #</pre></li> + #</pre> + + Additional Android.mk parameters + </li> <li>To create a second product for the same board, create a second product-specific make file called <code>vendor/company_name/products/<second_product_name>.mk</code> that includes:<BR> <pre class="prettyprint"> $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk) @@ -231,73 +237,4 @@ PRODUCT_PACKAGE_OVERLAYS := vendor/acme/overlay </pre> -<a name="androidBuildVariants"></a><h3>Build Variants</h3> -<p> -When building for a particular product, it's often useful to have minor -variations on what is ultimately the final release build. These are the -currently-defined build variants: -</p> - -<table border=1> -<tr> - <td> - <code>eng<code> - </td> - <td> - This is the default flavor. A plain "<code>make</code>" is the - same as "<code>make eng</code>". <code>droid</code> is an alias - for <code>eng</code>. - <ul> - <li>Installs modules tagged with: <code>eng</code>, <code>debug</code>, - <code>user</code>, and/or <code>development</code>. - <li>Installs non-APK modules that have no tags specified. - <li>Installs APKs according to the product definition files, in - addition to tagged APKs. - <li><code>ro.secure=0</code> - <li><code>ro.debuggable=1</code> - <li><code>ro.kernel.android.checkjni=1</code> - <li><code>adb</code> is enabled by default. - </td> -</tr> -<tr> - <td> - <code>user<code> - </td> - <td> - "<code>make user</code>" - <p> - This is the flavor intended to be the final release bits. - <ul> - <li>Installs modules tagged with <code>user</code>. - <li>Installs non-APK modules that have no tags specified. - <li>Installs APKs according to the product definition files; tags - are ignored for APK modules. - <li><code>ro.secure=1</code> - <li><code>ro.debuggable=0</code> - <li><code>adb</code> is disabled by default. - </td> -</tr> -<tr> - <td> - <code>userdebug<code> - </td> - <td> - "<code>make userdebug</code>" - <p> - The same as <code>user</code>, except: - <ul> - <li>Also installs modules tagged with <code>debug</code>. - <li><code>ro.debuggable=1</code> - <li><code>adb</code> is enabled by default. - </td> -</tr> -</table> - -<p> -If you build one flavor and then want to build another, you should run -"<code>make installclean</code>" between the two makes to guarantee that -you don't pick up files installed by the previous flavor. "<code>make -clean</code>" will also suffice, but it takes a lot longer. -</p> -
\ No newline at end of file diff --git a/pdk/docs/guide/build_system.jd b/pdk/docs/guide/build_system.jd index 64216d8cb..4b29202e5 100755 --- a/pdk/docs/guide/build_system.jd +++ b/pdk/docs/guide/build_system.jd @@ -12,6 +12,7 @@ pdk.version=1.0 <li><a href="#androidBuildSystemLayers">Layers</a></li> <li><a href="#androidSourceSetupBuildingCodeBase">Building the Android Platform</a></li> <li><a href="#androidSourceSetupBuildingKernel">Building the Android Kernel</a></li> +<li><a href="#androidBuildVariants">Build Variants</a></li> </ul> </div> </div> @@ -108,6 +109,8 @@ include $(BUILD_EXECUTABLE) % make -j4 PRODUCT-generic-eng </pre> +<p>These <a href="#androidBuildVariants">Build Variants</a> differ in terms of debug options and packages installed. + <a name="androidBuildingCleaning"></a><h4>Cleaning Up</h4> @@ -194,4 +197,73 @@ Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing) <p>To build the kernel, execute:</p> <pre class="prettyprint"> % make -j4 -</pre>
\ No newline at end of file +</pre> + +<a name="androidBuildVariants"></a><h3>Build Variants</h3> + +<p> +When building for a particular product, it's often useful to have minor +variations on what is ultimately the final release build. These are the +currently-defined build variants: +</p> + +<table border=1> +<tr> + <td> + <code>eng<code> + </td> + <td> + This is the default flavor. A plain "<code>make</code>" is the + same as "<code>make eng</code>". + <ul> + <li>Installs modules tagged with: <code>eng</code>, <code>debug</code>, + <code>user</code>, and/or <code>development</code>. + <li>Installs non-APK modules that have no tags specified. + <li>Installs APKs according to the product definition files, in + addition to tagged APKs. + <li><code>ro.secure=0</code> + <li><code>ro.debuggable=1</code> + <li><code>ro.kernel.android.checkjni=1</code> + <li><code>adb</code> is enabled by default. + </td> +</tr> +<tr> + <td> + <code>user<code> + </td> + <td> + "<code>make user</code>" + <p> + This is the flavor intended to be the final release bits. + <ul> + <li>Installs modules tagged with <code>user</code>.</li> + <li>Installs non-APK modules that have no tags specified.</li> + <li>Installs APKs according to the product definition files; tags + are ignored for APK modules.</li> + <li><code>ro.secure=1</code> </li> + <li><code>ro.debuggable=0</code> </li> + <li><code>adb</code> is disabled by default.</li> + </td> +</tr> +<tr> + <td> + <code>userdebug<code> + </td> + <td> + "<code>make userdebug</code>" + <p> + The same as <code>user</code>, except: + <ul> + <li>Also installs modules tagged with <code>debug</code>. + <li><code>ro.debuggable=1</code> + <li><code>adb</code> is enabled by default. + </td> +</tr> +</table> + +<p> +If you build one flavor and then want to build another, you should run +"<code>make installclean</code>" between the two makes to guarantee that +you don't pick up files installed by the previous flavor. "<code>make +clean</code>" will also suffice, but it takes a lot longer. +</p>
\ No newline at end of file diff --git a/pdk/docs/guide/sensors.jd b/pdk/docs/guide/sensors.jd index 79a2ad3f9..02f0c4e85 100755 --- a/pdk/docs/guide/sensors.jd +++ b/pdk/docs/guide/sensors.jd @@ -32,13 +32,30 @@ The types of sensors currently supported by Android include: <a name="androidSensorBuildingDriver"></a><h3>Building a Sensor Library</h3> <p> To implement a Sensors driver, create a shared library that implements the interface defined in <code>sensors.h</code>. You must name your shared library <code>libsensors.so</code> so that it will get loaded from <code>/system/lib</code> at runtime. -</p +</p> +<p> The following stub <code>Android.mk</code> file ensures that <code>libsensors</code> compiles and links to the appropriate libraries:</p> +<pre> +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := sensors + +LOCAL_PRELINK_MODULE := false + +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw + +LOCAL_SHARED_LIBRARIES := liblog +# include any shared library dependencies + +LOCAL_SRC_FILES := sensors.c + +include $(BUILD_SHARED_LIBRARY) +</pre> <a name="androidSensorsInterface"></a><h3>Interface</h3> - <p><span class="lh3"><a name="androidDoxygenNote"></a></span> <p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="sensors.html">click here</a>.</p> |
