Android source code uses a customizable compilation system to generate a specific Android system targeting its own hardware platform. For example, the default out/target/prodect/Generic Directory is not used,
This document briefly introduces this compilation system and provides an Android system for your own hardware platform,
This part of work is mainly implemented by the vendor folder in the android source code. If this folder is not true,
You can create this folder in the root directory of the android source code, which stores specific files, such as the 3G driver and WiFi driver on your board,
You can put your own applications here. When extracting the file system, you can put the stuff in this folder into the file system, so that users can clearly
See the features unique to your board.
I. details the following steps describe how to configure makefile to compile the system for devices running Android. 1. Create the company directory mkdir vendor/<company_name> 2. Create a products directory mkdir vendor/<company_name>/products/3 in the company directory, and create makefile related to the device: vendor/<company_name>/products/<first_product_name>. the make file MK must contain at least the following code: $ (call inherit-product, $ (src_target_dir)/product/generic. mk) ## overrides product_name: = <first_product_name> product_device: = <board_name> 4. Add device-related variables to the product definition file. 5. In the products directory, create an androidproducts. mk file pointing to the Make file of the device. # This file shocould 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 should des. # pro Duct_makefiles: =/$ (local_dir)/first_product_name.mk/6. Create a directory containing specific Board features under the company directory, which must match <board_name> In the product_device variable. This directory contains a make file, which can be accessed in the following ways, for example: mkdir vendor/<company_name>/<board_name> 7. Create a boardconfig under the directory (vendor/<company_name>/<board_name>) in the previous step. MK file # These definitions override the defaults in config/config. make for <board_name >## target_no_bootloader: = false # target_use_generic_audio: = true8. If you want to modify system attributes, create a system under the vendor/<company_name>/<board_name> directory. prop file. # System. prop For # This overrides settings in the products/generic/system. prop file # rild. libpath =/system/lib/libreference-ril.so # rild. libargs =-D/dev/ttys09, in products/androidproducts. add a <second_product_name>. MK reference. Product_makefiles: =/$ (local_dir)/first_product_name.mk/$ (local_dir)/second_product_name.mk10, the vendor/<company_name>/<board_name> directory must contain an android. MK file, which contains 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_targe T) all_prebuilt + = $ (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. When you want to create a second product for the same board, create a product named vendor/company_name/products/<second_product_name>. MK make file, which contains: $ (call inherit-product, $ (src_target_dir)/product/generic. mk) ## overrides product_name: = <second_product_name> product_device: = <board_name> so far, you have two new products, <first_product_name> and <second_product_name>, all belong to <company_name>. Verify that the next product is correctly configured and runs. build/envsetup. sh make product-<first_product_name>-user in the/out/target/product/<board_name> directory, you can see the generated binary file. 2. The product file tree is not translated. 3. Different products in the product definition file will assign different values to some variables in the product definition file, the product definition file can be inherited from other product definition files. The product definition file contains the following variables:
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 used if the locale has never been set before. Region ID |
en_GB de_DE es_ES fr_CA
|
Product_packages |
Lists the apks to install. List of APK to be installed in this product. |
Calendar Contacts
|
Product_device |
Name of the Industrial Design Producer name |
dream
|
Product_manufacturer |
Name of the manufacturer Manufacturer name |
acme
|
Product_brand |
The brand (e.g., carrier) The software is customized for, if any The branch ID after software customization. |
|
Product_property_overrides |
List of property assignments in the format "Key = value" Attribute list, which is in the form of "Key = value. |
|
Product_copy_files |
List of words likesource_path:destination_path . The file at the Source Path shocould be copied to the destination path when building this product. The rules for the copy steps are defined in config/makefile During compilation, files in the source path will be copied to the target path. Specific Replication rules are defined in config/makefile. |
|
Product_ota_public_keys |
List of Ota public keys for the product |
|
Product_policy |
Indicate which policy this product shoshould 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. The HTML file that contains the project contributor name list. |
|
Product_tags |
List of Space-separated words for a given product |
|
The following is a typical product definition file $ (call inherit-product, build/target/product/generic. mk) # overridesproduct_name: = mydeviceproduct_manufacturer: = acmeproduct_brand: = acme_usproduct_locales: = en_GB es_es fr_frproduct_package_overlays: = vendor/Acme/lay
Refer to csdn users for this blogHttp://blog.csdn.net/a345017062/archive/2010/12/24/6096807.aspxRecently, I need to create a vendor. I really need such materials. Thank you for your blog.