Configuring a New Product of Android 2.2 Froyo

Detailed Instructions

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

  1. Create a company directory in //vendor/.
      mkdir vendor/<company_name>
  2. Create a products directory beneath the company directory you created in step 1.
      mkdir vendor/<company_name>/products/
  3. Create a product-specific makefile, called vendor/<company_name>/products/<first_product_name>.mk, that includes at least the following code, all values should contain no space:
      $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
        #
        # Overrides
        PRODUCT_NAME := <first_product_name>
        PRODUCT_DEVICE := <board_name>
  4. Additional product-specific variables can be added to this Product Definition file.
  5. In the products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.
      #
        # 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 /
  6. 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>
  7. 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>
        #
        # TARGET_NO_BOOTLOADER := false
        #
        TARGET_USE_GENERIC_AUDIO := true
        TARGET_CPU_ABI := x86
  8. If you wish to modify system properties, create a system.prop file in your <board_name>directory(vendor/<company_name>/<board_name>).
      # system.prop for 
        # This overrides settings in the products/generic/system.prop file
        #
        # rild.libpath=/system/lib/libreference-ril.so
        # rild.libargs=-d /dev/ttyS0
  9. Add a pointer to <second_product_name>.mk within products/AndroidProducts.mk.
      PRODUCT_MAKEFILES := /
        $(LOCAL_DIR)/first_product_name.mk /
        $(LOCAL_DIR)/second_product_name.mk
  10. An AndroidBoard.mk file must be included in vendor/<company_name>/<board_name> with at least the following code:
      # make file for new hardware  from 
        #
        LOCAL_PATH := $(call my-dir)
        #
        # this is here to use the pre-built kernel
        ifeq ($(TARGET_PREBUILT_KERNEL),)
        TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
        endif
        #
        file := $(INSTALLED_KERNEL_TARGET)
        ALL_PREBUILT += $(file)
        $(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)
        $(transform-prebuilt-to-target)
        #
        # no boot loader, so we don't need any of that stuff..
        #
        LOCAL_PATH := vendor/<company_name>/<board_name>
        #
        include $(CLEAR_VARS)
        #
        # include more board specific stuff here? Such as Audio parameters.
        #
  11. To create a second product for the same board, create a second product-specific make file calledvendor/company_name/products/<second_product_name>.mk that includes:
      $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
        #
        # Overrides
        PRODUCT_NAME := <second_product_name>
        PRODUCT_DEVICE := <board_name>

By now, you should have two new products, called <first_product_name> and <second_product_name> associated with <company_name>. To verify that a product is properly configured (<first_product_name>, for example), execute the following:

  . build/envsetup.sh
make PRODUCT-<first_product_name>-user

You should find new build binaries located in /out/target/product/<board_name>.

New Product File Tree

The file tree below illustrates what your own system should look like after completing the steps above.

 

  • <company_name>
    • <board_name>
      • AndroidBoard.mk
      • BoardConfig.mk
      • system.prop
    • products
      • AndroidProducts.mk
      • <first_product_name>.mk
      • <second_product_name>.mk

 

Product Definition Files

Product-specific variables are defined in product definition files. A product definition file can inherit from other product definition files, thus reducing the need to copy and simplifying maintenance.

Variables maintained in a product definition files include:

 

ParameterDescriptionExample
PRODUCT_NAMEEnd-user-visible name for the overall product. Appears in the "About the phone" info. 
PRODUCT_MODELEnd-user-visible name for the end product 
PRODUCT_LOCALESA space-separated list of two-letter language code, two-letter country code pairs that describe several settings for the user, such as the UI language and time, date and currency formatting. The first locale listed in PRODUCT_LOCALES is is used if the locale has never been set before.en_GB de_DE es_ES fr_CA
PRODUCT_PACKAGESLists the APKs to install.Calendar Contacts
PRODUCT_DEVICEName of the industrial designdream
PRODUCT_MANUFACTURERName of the manufactureracme
PRODUCT_BRANDThe brand (e.g., carrier) the software is customized for, if any 
PRODUCT_PROPERTY_OVERRIDESList of property assignments in the format "key=value" 
PRODUCT_COPY_FILESList of words like source_path:destination_path. The file at the source path should be copied to the destination path when building this product. The rules for the copy steps are defined in config/Makefile 
PRODUCT_OTA_PUBLIC_KEYSList of OTA public keys for the product 
PRODUCT_POLICYIndicate which policy this product should use 
PRODUCT_PACKAGE_OVERLAYSIndicate whether to use default resources or add any product specific overlaysvendor/acme/overlay
PRODUCT_CONTRIBUTORS_FILEHTML file containing the contributors to the project. 
PRODUCT_TAGSlist of space-separated words for a given product 

 

The snippet below illustrates a typical product definition file.

$(call inherit-product, build/target/product/generic.mk)
#Overrides
PRODUCT_NAME := MyDevice
PRODUCT_MANUFACTURER := acme
PRODUCT_BRAND := acme_us
PRODUCT_LOCALES := en_GB es_ES fr_FR
PRODUCT_PACKAGE_OVERLAYS := vendor/acme/overlay

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 很抱歉,您遇到了这个问题。这个错误提示通常是在安装或配置软件时出现的。这可能是由于许多不同的原因造成的,例如配置文件的错误设置、缺少依赖项、权限问题等。 要解决此问题,您可以尝试以下几种方法: 1. 检查您的配置文件是否正确设置,并确保您已经安装了所需的依赖项。 2. 确保您有足够的权限来访问所需的文件和目录。您可以尝试使用sudo命令来运行程序,以便获得管理员权限。 3. 查看程序的日志文件以了解更多信息。日志文件通常包含有关错误原因的详细信息,帮助您更好地诊断问题。 4. 如果您仍然无法解决问题,请尝试在相关的技术论坛或社区中寻求帮助。您可能会得到更多的建议和指导。 希望这些方法能够帮助您解决问题。如果您需要进一步的帮助,请告诉我更多细节,我会尽力回答您的问题。 ### 回答2: "A problem occurred configuring" 是一个英语短语,指的是在配置过程中出现了问题。它通常用于描述在软件安装、网络设置或设备连接等过程中遇到的困难或错误。 这个问题的具体原因可能有很多种。可能是由于错误的输入、配置文件的损坏、网络连接的故障、设备驱动程序的不兼容性或其他未知的技术问题。 解决这个问题的方法取决于具体的情况。首先,我们应该检查输入是否准确且符合要求,确保所有的配置选项都正确填写。如果是配置文件损坏,在备份的前提下,我们可以尝试使用备份文件进行修复。如果是网络连接问题,我们可以检查线缆连接、路由器设置或尝试重新启动网络设备。如果是设备驱动程序不兼容性,我们可以尝试更新或更换驱动程序。 此外,查找错误信息和日志文件也是解决问题的关键。这些信息通常会提供有关具体问题的详细信息,从而指导我们采取正确的行动。我们可以在互联网上搜索类似的问题和解决方案,或者寻求专业人士的帮助。 总之,在遇到配置问题时,我们应该耐心且仔细地诊断问题,并采取适当的解决方案。通过正确的操作和合理的解决方案,我们通常能够成功解决配置问题并继续进行正常的操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值