http://source.android.com/porting/build_new_device.html

Detailed Instructions

    下面步骤描述怎样为一个新的移动设备及产品使用makefiles配置Android运行系统。

 1.在//vendor/目录下创建一个公司目录.

mkdir vendor/<company_name>

2.在上面创建的公司目录下(beneath)创建产品(products)目录

 mkdir vendor/<company_name>/products/

3.创建特定产品的makefile。命名为vendor/<company_name>/products/<first_product_name>.mk。这个文件至少要包含如下代码:

  $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
  #
  # Overrides
  PRODUCT_NAME := <first_product_name>
  PRODUCT_DEVICE := <board_name>

4.另外一些特定产品的变量定义可以添加到这个产品定义(Product Definition:下面有详细说明)文件(3中说的)。

5.在products目录,创建一个AndroidProducts.mk文件,这个文件用来指定(and is responsible for finding)一个特定的产品make 文件(也就是3中的文件)

  #
  # This file should set PRODUCT_MAKEFILES to a list of product makefiles
  # to expose to the build system.  LOCAL_DIR will already be set to
  # the directory containing this file. 
  #
  # This file may not rely on the value of any variable other than
  # LOCAL_DIR; do not use any conditionals, and do not look up the
  # value of any variable that isn't set in this file or in a file that
  # it includes.
  #
  
  PRODUCT_MAKEFILES := \
    $(LOCAL_DIR)/first_product_name.mk \

相关文章: