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 /dev_appserver.py --address 0.0.0.0 \ /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 @@ -18,7 +19,7 @@ pdk.version=1.0

Detailed Instructions

-

The directions below describe how to configure make files for new mobile devices and products.

+

The steps below describe how to configure makefiles for new mobile devices and products running Android.

  1. Create a company directory in //vendor/.
    @@ -26,13 +27,15 @@ pdk.version=1.0
       
  2. Create a products directory beneath the company directory you created in step 1.
       mkdir vendor/<company_name>/products/
  3. -
  4. Create a product-specific make file, called vendor/<company_name>/products/<first_product_name>.mk, that includes the following code:
    +
  5. Create a product-specific makefile, called vendor/<company_name>/products/<first_product_name>.mk, that includes at least the following code:
       $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
       #
       # Overrides
       PRODUCT_NAME := <first_product_name>
    -  PRODUCT_DEVICE := <board_name>
  6. + PRODUCT_DEVICE := <board_name>
    + Additional product-specific variables can be added to this Product Definition file. +
  7. In the products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.
       #
    @@ -51,7 +54,7 @@ pdk.version=1.0
       
  8. Create a board-specific directory beneath your company directory that matches the PRODUCT_DEVICE variable <board_name> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.
       mkdir vendor/<company_name>/<board_name>
  9. -
  10. Create a product_config.mk file in the directory created in the previous step (vendor/<company_name>/<board_name>). If this directory does not include a product_config.mk file, the build will fail.
    +
  11. Create a BoardConfig.mk file in the directory created in the previous step (vendor/<company_name>/<board_name>).
       # 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
  12. -
  13. vendor/<company_name>/<board_name> must include an Android.mk file with at least the following code:

    +
  14. An Android.mk file must be included in vendor/<company_name>/<board_name> with at least the following code:
       # make file for new hardware  from 
       #
    @@ -94,7 +97,10 @@ pdk.version=1.0
       include $(CLEAR_VARS)
       #
       # include more board specific stuff here? Such as Audio parameters.      
    -  #
  15. + #
    + + Additional Android.mk parameters +
  16. To create a second product for the same board, create a second product-specific make file called vendor/company_name/products/<second_product_name>.mk that includes:
       $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
    @@ -231,73 +237,4 @@ PRODUCT_PACKAGE_OVERLAYS := vendor/acme/overlay
     
     
    -

    Build Variants

    -

    -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: -

    - - - - - - - - - - - - - - -
    - eng - - This is the default flavor. A plain "make" is the - same as "make eng". droid is an alias - for eng. -
      -
    • Installs modules tagged with: eng, debug, - user, and/or development. -
    • Installs non-APK modules that have no tags specified. -
    • Installs APKs according to the product definition files, in - addition to tagged APKs. -
    • ro.secure=0 -
    • ro.debuggable=1 -
    • ro.kernel.android.checkjni=1 -
    • adb is enabled by default. -
    - user - - "make user" -

    - This is the flavor intended to be the final release bits. -

      -
    • Installs modules tagged with user. -
    • Installs non-APK modules that have no tags specified. -
    • Installs APKs according to the product definition files; tags - are ignored for APK modules. -
    • ro.secure=1 -
    • ro.debuggable=0 -
    • adb is disabled by default. -
    - userdebug - - "make userdebug" -

    - The same as user, except: -

      -
    • Also installs modules tagged with debug. -
    • ro.debuggable=1 -
    • adb is enabled by default. -
    - -

    -If you build one flavor and then want to build another, you should run -"make installclean" between the two makes to guarantee that -you don't pick up files installed by the previous flavor. "make -clean" will also suffice, but it takes a lot longer. -

    - \ 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
  17. Layers
  18. Building the Android Platform
  19. Building the Android Kernel
  20. +
  21. Build Variants
  22. @@ -108,6 +109,8 @@ include $(BUILD_EXECUTABLE) % make -j4 PRODUCT-generic-eng +

    These Build Variants differ in terms of debug options and packages installed. +

    Cleaning Up

    @@ -194,4 +197,73 @@ Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

    To build the kernel, execute:

     % make -j4
    -
    \ No newline at end of file + + +

    Build Variants

    + +

    +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: +

    + + + + + + + + + + + + + + +
    + eng + + This is the default flavor. A plain "make" is the + same as "make eng". +
      +
    • Installs modules tagged with: eng, debug, + user, and/or development. +
    • Installs non-APK modules that have no tags specified. +
    • Installs APKs according to the product definition files, in + addition to tagged APKs. +
    • ro.secure=0 +
    • ro.debuggable=1 +
    • ro.kernel.android.checkjni=1 +
    • adb is enabled by default. +
    + user + + "make user" +

    + This is the flavor intended to be the final release bits. +

      +
    • Installs modules tagged with user.
    • +
    • Installs non-APK modules that have no tags specified.
    • +
    • Installs APKs according to the product definition files; tags + are ignored for APK modules.
    • +
    • ro.secure=1
    • +
    • ro.debuggable=0
    • +
    • adb is disabled by default.
    • +
    + userdebug + + "make userdebug" +

    + The same as user, except: +

      +
    • Also installs modules tagged with debug. +
    • ro.debuggable=1 +
    • adb is enabled by default. +
    + +

    +If you build one flavor and then want to build another, you should run +"make installclean" between the two makes to guarantee that +you don't pick up files installed by the previous flavor. "make +clean" will also suffice, but it takes a lot longer. +

    \ 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:

    Building a Sensor Library

    To implement a Sensors driver, create a shared library that implements the interface defined in sensors.h. You must name your shared library libsensors.so so that it will get loaded from /system/lib at runtime. -

    +

    The following stub Android.mk file ensures that libsensors compiles and links to the appropriate libraries:

    +
    +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)
    +

    Interface

    -

    Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.