AI 148100: Testing out PDK updates by updating /device/partner/ references in the "building a new device" steps
Automated import of CL 148100
This commit is contained in:
committed by
The Android Open Source Project
parent
925f5d2ee9
commit
9844b7560d
@@ -13,15 +13,16 @@ pdk.version=1.0
|
|||||||
|
|
||||||
<p>The directions below describe how to configure make files for new mobile devices and products.</p>
|
<p>The directions below describe how to configure make files for new mobile devices and products.</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Create a company directory in <code>//device/partner</code>.<br/>
|
<li>Create a company directory in <code>//vendor/</code>.<br/>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
mkdir device/partner/<company_name></pre></li>
|
mkdir vendor/<company_name></pre></li>
|
||||||
<li>Create a <code>products</code> directory beneath the company directory you created in step 1.<BR>
|
<li>Create a <code>products</code> directory beneath the company directory you created in step 1.<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
mkdir device/partner/<company_name>/products/</pre></li>
|
mkdir vendor/<company_name>/products/</pre></li>
|
||||||
<li>Create a product-specific make file, called <code>device/partner/<company_name>/products/<first_product_name>.mk</code>, that includes the following code:<BR>
|
<li>Create a product-specific make file, called <code>vendor/<company_name>/products/<first_product_name>.mk</code>, that includes the
|
||||||
|
following code:<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
$(call inherit-product, target/product/generic.mk)
|
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
|
||||||
#
|
#
|
||||||
# Overrides
|
# Overrides
|
||||||
PRODUCT_NAME := <first_product_name>
|
PRODUCT_NAME := <first_product_name>
|
||||||
@@ -43,8 +44,8 @@ pdk.version=1.0
|
|||||||
$(LOCAL_DIR)/first_product_name.mk \</pre></li>
|
$(LOCAL_DIR)/first_product_name.mk \</pre></li>
|
||||||
<li>Create a board-specific directory beneath your company directory that matches the <code>PRODUCT_DEVICE</code> variable <code><board_name></code> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.<BR>
|
<li>Create a board-specific directory beneath your company directory that matches the <code>PRODUCT_DEVICE</code> variable <code><board_name></code> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
mkdir device/partner/<company_name>/<board_name></pre></li>
|
mkdir vendor/<company_name>/<board_name></pre></li>
|
||||||
<li>Create a <code>product_config.mk</code> file in the directory created in the previous step (<code>device/partner/<company_name>/<board_name></code>). If this directory does not include a <code>product_config.mk</code> file, the build will fail.<BR>
|
<li>Create a <code>product_config.mk</code> file in the directory created in the previous step (<code>vendor/<company_name>/<board_name></code>). If this directory does not include a <code>product_config.mk</code> file, the build will fail.<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
# These definitions override the defaults in config/config.make for <board_name>
|
# These definitions override the defaults in config/config.make for <board_name>
|
||||||
#
|
#
|
||||||
@@ -52,7 +53,7 @@ pdk.version=1.0
|
|||||||
# TARGET_HARDWARE_3D := false
|
# TARGET_HARDWARE_3D := false
|
||||||
#
|
#
|
||||||
TARGET_USE_GENERIC_AUDIO := true</pre></li>
|
TARGET_USE_GENERIC_AUDIO := true</pre></li>
|
||||||
<li>If you wish to modify system properties, create a <code>system.prop</code> file in your <code><board_name></code> directory(<code>device/partner/<company_name>/<board_name></code>).<BR>
|
<li>If you wish to modify system properties, create a <code>system.prop</code> file in your <code><board_name></code> directory(<code>vendor/<company_name>/<board_name></code>).<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
# system.prop for <board_name>
|
# system.prop for <board_name>
|
||||||
# This overrides settings in the products/generic/system.prop file
|
# This overrides settings in the products/generic/system.prop file
|
||||||
@@ -64,7 +65,8 @@ pdk.version=1.0
|
|||||||
PRODUCT_MAKEFILES := \
|
PRODUCT_MAKEFILES := \
|
||||||
$(LOCAL_DIR)/first_product_name.mk \
|
$(LOCAL_DIR)/first_product_name.mk \
|
||||||
$(LOCAL_DIR)/second_product_name.mk</pre></li>
|
$(LOCAL_DIR)/second_product_name.mk</pre></li>
|
||||||
<li><code>device/partner/<company_name>/<board_name></code> must include an <code>Android.mk</code> file with at least the following code:<BR><BR>
|
<li><code>vendor/<company_name>/<board_name></code> must include an <code>Android.mk</code>
|
||||||
|
file with at least the following code:<BR><BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
# make file for new hardware <board_name> from <company_name>
|
# make file for new hardware <board_name> from <company_name>
|
||||||
#
|
#
|
||||||
@@ -82,15 +84,16 @@ pdk.version=1.0
|
|||||||
#
|
#
|
||||||
# no boot loader, so we don't need any of that stuff..
|
# no boot loader, so we don't need any of that stuff..
|
||||||
#
|
#
|
||||||
LOCAL_PATH := partner/<company_name>/<board_name>
|
LOCAL_PATH := vendor/<company_name>/<board_name>
|
||||||
#
|
#
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
#
|
#
|
||||||
# include more board specific stuff here? Such as Audio parameters.
|
# include more board specific stuff here? Such as Audio parameters.
|
||||||
#</pre></li>
|
#</pre></li>
|
||||||
<li>To create a second product for the same board, create a second product-specific make file called <code>device/partner/company_name/products/<second_product_name>.mk</code> that includes:<BR>
|
<li>To create a second product for the same board, create a second product-specific make file called
|
||||||
|
<code>vendor/company_name/products/<second_product_name>.mk</code> that includes:<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
$(call inherit-product, partner/google/products/generic.mk)
|
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
|
||||||
#
|
#
|
||||||
# Overrides
|
# Overrides
|
||||||
PRODUCT_NAME := <second_product_name>
|
PRODUCT_NAME := <second_product_name>
|
||||||
@@ -98,12 +101,10 @@ pdk.version=1.0
|
|||||||
</ol>
|
</ol>
|
||||||
<p>By now, you should have two new products, called <code><first_product_name></code> and <code><second_product_name></code> associated with <code><company_name></code>. To verify that a product is properly configured (<code><first_product_name></code>, for example), execute the following:<BR>
|
<p>By now, you should have two new products, called <code><first_product_name></code> and <code><second_product_name></code> associated with <code><company_name></code>. To verify that a product is properly configured (<code><first_product_name></code>, for example), execute the following:<BR>
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
cd device
|
. build/envsetup.sh
|
||||||
. ./envsetup.sh
|
|
||||||
partner_setup <first_product_name>
|
|
||||||
make PRODUCT-<first_product_name>-user
|
make PRODUCT-<first_product_name>-user
|
||||||
</pre>
|
</pre>
|
||||||
<p>You should find new build binaries located in <code>device/out/target/product/<board_name></code>.
|
<p>You should find new build binaries located in <code>out/target/product/<board_name></code>.
|
||||||
|
|
||||||
|
|
||||||
<a name="androidBuildNewFileTree"></a><h2>New Product File Tree</h2>
|
<a name="androidBuildNewFileTree"></a><h2>New Product File Tree</h2>
|
||||||
@@ -127,4 +128,4 @@ pdk.version=1.0
|
|||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user