Configuring a New Product In this document




Download 1.28 Mb.
bet12/95
Sana22.12.2019
Hajmi1.28 Mb.
#4580
1   ...   8   9   10   11   12   13   14   15   ...   95

Configuring a New Product

In this document

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/

  1. Create a products directory beneath the company directory you created in step 1.

mkdir vendor//products/

  1. Create a product-specific makefile, called vendor//products/.mk, that includes at least the following code:

  2. $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)

  3. #

  4. # Overrides

  5. PRODUCT_NAME :=

PRODUCT_DEVICE :=

  1. Additional product-specific variables can be added to this Product Definition file.

  2. In the products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.

  3. #

  4. # This file should set PRODUCT_MAKEFILES to a list of product makefiles

  5. # to expose to the build system. LOCAL_DIR will already be set to

  6. # the directory containing this file.

  7. #

  8. # This file may not rely on the value of any variable other than

  9. # LOCAL_DIR; do not use any conditionals, and do not look up the

  10. # value of any variable that isn't set in this file or in a file that

  11. # it includes.

  12. #



  13. PRODUCT_MAKEFILES := \

$(LOCAL_DIR)/first_product_name.mk \

  1. Create a board-specific directory beneath your company directory that matches the PRODUCT_DEVICE variable 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//

  1. Create a BoardConfig.mk file in the directory created in the previous step (vendor//).

  2. # These definitions override the defaults in config/config.make for

  3. #

  4. # TARGET_NO_BOOTLOADER := false

  5. # TARGET_HARDWARE_3D := false

  6. #

TARGET_USE_GENERIC_AUDIO := true

  1. If you wish to modify system properties, create a system.prop file in your directory(vendor//).

  2. # system.prop for

  3. # This overrides settings in the products/generic/system.prop file

  4. #

  5. # rild.libpath=/system/lib/libreference-ril.so

# rild.libargs=-d /dev/ttyS0

  1. Add a pointer to .mk within products/AndroidProducts.mk.

  2. PRODUCT_MAKEFILES := \

  3. $(LOCAL_DIR)/first_product_name.mk \

$(LOCAL_DIR)/second_product_name.mk

  1. An Android.mk file must be included in vendor// with at least the following code:

  2. # make file for new hardware from

  3. #

  4. LOCAL_PATH := $(call my-dir)

  5. #

  6. # this is here to use the pre-built kernel

  7. ifeq ($(TARGET_PREBUILT_KERNEL),)

  8. TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel

  9. endif

  10. #

  11. file := $(INSTALLED_KERNEL_TARGET)

  12. ALL_PREBUILT += $(file)

  13. $(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)

  14. $(transform-prebuilt-to-target)

  15. #

  16. # no boot loader, so we don't need any of that stuff..

  17. #

  18. LOCAL_PATH := vendor//

  19. #

  20. include $(CLEAR_VARS)

  21. #

  22. # include more board specific stuff here? Such as Audio parameters.

#

  1. To create a second product for the same board, create a second product-specific make file called vendor/company_name/products/.mk that includes:

  2. $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)

  3. #

  4. # Overrides

  5. PRODUCT_NAME :=

PRODUCT_DEVICE :=

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

. build/envsetup.sh

make PRODUCT--user

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


Download 1.28 Mb.
1   ...   8   9   10   11   12   13   14   15   ...   95




Download 1.28 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Configuring a New Product In this document

Download 1.28 Mb.