add a file AndroidProducts.mk 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.
Execution & Command Syntax
make filesmake file abovemake file that gets accessed by any product using this boardTechnical Implementation Details
# # 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 modify “first_product_name.mk” to “hawkboard.mk” Create a product-specific makefile, called vendor/<company_name>/products/<first_product_name>.mk, that includes at least the following code: $(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk) # # Overrides PRODUCT_NAME := <first_product_name> PRODUCT_DEVICE := <board_name> example: create hawkboard.mk in “vendor/ti/hawkboard” directory. 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> 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_HARDWARE_3D := false # TARGET_USE_GENERIC_AUDIO := true 4.
Gotchas and Common Issues
Permission Verification - confirm execution permissions and path variables before invoking system binaries.
Version Compatibility - check software version release notes for deprecated flags or syntax changes.
Log Monitoring - inspect system logs (
journalctlor/var/log) to troubleshoot execution failures.
Following these steps ensures clean configuration, proper security boundaries, and reliable execution for adding a new board or platform to android source and build.
Comments and corrections