特定的,针对自己硬件平台的Android系统,比如不使用缺省的out/target/prodect/generic目录,
本文档简单介绍了这个编译系统,并做一个针对自己硬件平台的Android,
这部分工作主要是由Android源代码中的Vendor文件夹来实现,如果该文件夹不成立,自己可以在Android源代码的根目录下建立该文件夹,这个文件夹里面存放特定的文件,比如自己板子上的3G驱动,WIFI驱动,自己的应用程序,都可以放在这里。提取文件系统的时候,可以把这个文件夹里面的东东放到文件系统里面,这样用户可以清晰的看到你的板子特有的功能。
PRODUCT_NAME := <first_product_name> PRODUCT_DEVICE := <board_name>
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 /
:= false # TARGET_USE_GENERIC_AUDIO := true
# rild.libargs=-d /dev/ttyS0
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. #
Overrides PRODUCT_NAME := <second_product_name> PRODUCT_DEVICE := <board_name> 目前为止,你已经有了两个新product,<first_product_name>和<second_product_name>,都属于<company_name>。 验证一下一个product是否配置正确,运行 . build/envsetup.sh make PRODUCT-<first_product_name>-user 在/out/target/product/<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. 地区标识 |
en_GB de_DE es_ES fr_CA |
PRODUCT_PACKAGES |
Lists the APKs to install. 在这个product中要安装的APK列表。 |
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" 属性列表,以"key=value"形式列出。 |
|
PRODUCT_COPY_FILES |
List of words like source_path:destination_path. The file at the source 当编译时,源路径上的文件会被复制到目标路径上去,具体的复制规则在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. 包含了项目贡献者名字列表的HTML文件。 |
|
PRODUCT_TAGS |
list of space-separated words for a given product |
:= MyDevicePRODUCT_MANUFACTURER := acmePRODUCT_BRAND := acme_usPRODUCT_LOCALES
:= en_GB es_ES fr_FRPRODUCT_PACKAGE_OVERLAYS := vendor/acme/overlay