글 수 74
2014.01.17 10:47:35 (*.52.177.249)
26269
Android full source 를 빌드할 때, 새로운 product 를 추가하는 과정을 정리했습니다.
1. verder 디렉토리에 company 디렉토리 생성
mkdir vendor/<company_name>
2. products 디렉토리 생성
mkdir vendor/<company_name>/products/
3. product 스팩 makefile 생성, vendor/<company_name>/products/<product_name>.mk
product_name.mk 은 다음 내용을 포함해야 합니다.
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk) # # Overrides PRODUCT_NAME := <first_product_name> PRODUCT_DEVICE := <board_name>
그 외, 스팩은 다음과 같은 형식으로 추가 할수 있습니다.
| Parameter | Description | Example |
|---|---|---|
| PRODUCT_NAME | End-user-visible name for the overall product. Appears in the "About the phone" info. | |
| PRODUCT_MODEL | End-user-visible name for the end product | |
| PRODUCT_LOCALES | A 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_PACKAGES | Lists the APKs to install. | Calendar Contacts |
| PRODUCT_DEVICE | Name of the industrial design | dream |
| PRODUCT_MANUFACTURER | Name of the manufacturer | acme |
| PRODUCT_BRAND | The brand (e.g., carrier) the software is customized for, if any | |
| PRODUCT_PROPERTY_OVERRIDES | List of property assignments in the format "key=value" | |
| PRODUCT_COPY_FILES | List 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_KEYS | List of OTA public keys for the product | |
| PRODUCT_POLICY | Indicate which policy this product should use | |
| PRODUCT_PACKAGE_OVERLAYS | Indicate whether to use default resources or add any product specific overlays | vendor/acme/overlay |
| PRODUCT_CONTRIBUTORS_FILE | HTML file containing the contributors to the project. | |
| PRODUCT_TAGS | list of space-separated words for a given product |
4. products 디렉토리에 AndroidProduct.mk 파일 생성.
이 파일에서 product_name.mk 을 지정해야 합니다.
#
# 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)/product_name.mk \* 다음 편에서 계속 됩니다...


