summaryrefslogtreecommitdiffstats
path: root/core/envsetup.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-03-12 18:30:39 -0700
committerYing Wang <wangying@google.com>2015-03-14 00:06:54 +0000
commitae61f50a680d4a8e91274b35305dc2e24959abbe (patch)
treec2f223e15c28217ee897616ad9e0ff0c91416e79 /core/envsetup.mk
parentdaebaa6ed3fbf4e7943e6c8290ec6b9233b542e9 (diff)
downloadbuild-ae61f50a680d4a8e91274b35305dc2e24959abbe.zip
build-ae61f50a680d4a8e91274b35305dc2e24959abbe.tar.gz
build-ae61f50a680d4a8e91274b35305dc2e24959abbe.tar.bz2
Support to configure and build multiple custom images.
Build additional images requested by the product makefile. This script gives the ability to build multiple additional images and you can configure what modules/files to include in each image. 1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile. PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles. Each makefile configures an image. For image configuration makefile foo/bar/xyz.mk, the built image file name will be xyz.img. So make sure they won't conflict. 2. In each image's configuration makefile, you can define variables: - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm" etc. - CUSTOM_IMAGE_PARTITION_SIZE - CUSTOM_IMAGE_FILE_SYSTEM_TYPE - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary accepted by BuildImage() in tools/releasetools/build_image.py. - CUSTOM_IMAGE_MODULES, a list of module names you want to include in the image; Not only the module itself will be installed to proper path in the image, you can also piggyback additional files/directories with the module's LOCAL_PICKUP_FILES. - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to the image. <dest> is relativ to the root of the image. To build all those images, run "make custom_images". Bug: 19609718 Change-Id: Ic73587e08503a251be27797c7b00329716051927 (cherry picked from commit 5fcf1094f9cf4d57c2598237f99621f254130d71)
Diffstat (limited to 'core/envsetup.mk')
-rw-r--r--core/envsetup.mk17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 124a91b..ad78be3 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -120,6 +120,7 @@ endif
TARGET_COPY_OUT_SYSTEM := system
TARGET_COPY_OUT_DATA := data
TARGET_COPY_OUT_OEM := oem
+TARGET_COPY_OUT_ODM := odm
TARGET_COPY_OUT_ROOT := root
TARGET_COPY_OUT_RECOVERY := recovery
###########################################
@@ -343,7 +344,7 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS)
TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM)
TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin
-ifneq ($(filter %64,$(TARGET_ARCH)),)
+ifeq ($(TARGET_IS_64_BIT),true)
TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64
else
TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
@@ -357,6 +358,20 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXEC
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS)
+TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM)
+TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin
+ifeq ($(TARGET_IS_64_BIT),true)
+TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib64
+else
+TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
+endif
+TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM)/app
+TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc
+
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS)
+
TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib