Reconcile with jb-release nakasi-factoryrom-release
Change-Id: Ifb66dc982a827827f324018084f0c6f191cb3769
diff --git a/CleanSpec.mk b/CleanSpec.mk
index b1b139a..74ad978 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -122,10 +122,8 @@
# Changing where ro.carrier value is instantiated for system/build.prop
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/app/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+# Now we switched to build against Mac OS X SDK 10.6
+$(call add-clean-step, rm -rf $(OUT_DIR)/host/darwin-x86/obj)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/core/Makefile b/core/Makefile
index 5525b2e..78b9f1e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -815,23 +815,35 @@
.PHONY: stnod
stnod: systemtarball-nodeps
+# For platform-java goal, add platform as well
+ifneq (,$(filter platform-java, $(MAKECMDGOALS)))
+PLATFORM_ZIP_ADD_JAVA := true
+endif
+
#######
## platform.zip: system, plus other files to be used in PDK fusion build,
## in a zip file
-INSTALLED_PLATFROM_ZIP := $(PRODUCT_OUT)/platform.zip
-$(INSTALLED_PLATFROM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES)
- $(call pretty,"Platform zip package: $(INSTALLED_PLATFROM_ZIP)")
+INSTALLED_PLATFORM_ZIP := $(PRODUCT_OUT)/platform.zip
+$(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES)
+ $(call pretty,"Platform zip package: $(INSTALLED_PLATFORM_ZIP)")
$(hide) rm -f $@
$(hide) cd $(dir $@) && zip -qry $(notdir $@) \
$(TARGET_COPY_OUT_SYSTEM) \
$(patsubst $(PRODUCT_OUT)/%, %, $(TARGET_OUT_NOTICE_FILES))
+ifeq (true,$(PLATFORM_ZIP_ADD_JAVA))
+ $(hide) cd $(OUT_DIR) && zip -qry $(patsubst $(OUT_DIR)/%,%,$@) $(PDK_PLATFORM_JAVA_ZIP_CONTENTS)
+endif
+
.PHONY: platform
-platform: $(INSTALLED_PLATFROM_ZIP)
+platform: $(INSTALLED_PLATFORM_ZIP)
+
+.PHONY: platform-java
+platform-java: platform
# Dist the platform.zip
-ifneq (,$(filter platform, $(MAKECMDGOALS)))
-$(call dist-for-goals, platform, $(INSTALLED_PLATFROM_ZIP))
+ifneq (,$(filter platform platform-java, $(MAKECMDGOALS)))
+$(call dist-for-goals, platform platform-java, $(INSTALLED_PLATFORM_ZIP))
endif
#######
diff --git a/core/build_id.mk b/core/build_id.mk
index 4e273b1..e954794 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -1,4 +1,3 @@
-
#
# Copyright (C) 2008 The Android Open Source Project
#
@@ -14,10 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
+#
+# Defines branch-specific values.
+#
+
# BUILD_ID is usually used to specify the branch name
# (like "MAIN") or a branch name and a release candidate
-# (like "CRB01"). It must be a single word, and is
+# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
+#
+BUILD_ID := OPENMASTER
-export BUILD_ID=JFN53N
-
+# DISPLAY_BUILD_NUMBER should only be set for development branches,
+# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
+# a more descriptive BUILD_ID_DISPLAY, otherwise BUILD_ID_DISPLAY
+# is the same as BUILD_ID
+DISPLAY_BUILD_NUMBER := true
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 198c53f..00b532f 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -29,27 +29,33 @@
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
-# Use the Mac OSX SDK 10.5 if the build host is 10.6
-build_mac_version := $(shell sw_vers -productVersion)
-ifneq ($(filter 10.6.%, $(build_mac_version)),)
-sdk_105_root := /Developer/SDKs/MacOSX10.5.sdk
-ifeq ($(wildcard $(sdk_105_root)),)
+mac_sdk_version := 10.6
+mac_sdk_root := /Developer/SDKs/MacOSX$(mac_sdk_version).sdk
+ifeq ($(wildcard $(mac_sdk_root)),)
$(warning *****************************************************)
-$(warning * You are building on Mac OSX 10.6.)
-$(warning * Can not find SDK 10.5 at $(sdk_105_root))
+$(warning * Can not find SDK $(mac_sdk_version) at $(mac_sdk_root))
$(warning *****************************************************)
$(error Stop.)
endif
-HOST_GLOBAL_CFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
-HOST_GLOBAL_LDFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
-endif # build_mac_version is 10.6
+HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
+HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
-HOST_CC := $(CC)
-HOST_CXX := $(CXX)
+GCC_REALPATH = $(realpath $(shell which gcc))
+ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),)
+ # Using LLVM GCC results in a non functional emulator due to it
+ # not honouring global register variables
+ $(warning ****************************************)
+ $(warning * gcc is linked to llvm-gcc which will *)
+ $(warning * not create a useable emulator. *)
+ $(warning ****************************************)
+endif
+
+HOST_CC := gcc
+HOST_CXX := g++
HOST_AR := $(AR)
HOST_STRIP := $(STRIP)
HOST_STRIP_COMMAND = $(HOST_STRIP) --strip-debug $< -o $@
@@ -59,7 +65,7 @@
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-ifneq ($(filter 10.7.%, $(build_mac_version)),)
+ifneq ($(filter 10.7 10.7.% 10.8 10.8.%, $(build_mac_version)),)
HOST_RUN_RANLIB_AFTER_COPYING := false
else
HOST_RUN_RANLIB_AFTER_COPYING := true
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 4a461f8..14c3d28 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -181,7 +181,7 @@
TARGET_FDO_LIB:=
target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \
- --print-file-name=libgcov.a)
+ -print-file-name=libgcov.a)
ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
# Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
# The profile will be generated on /data/local/tmp/profile on the device.
@@ -280,6 +280,9 @@
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
@@ -299,6 +302,9 @@
$(TARGET_GLOBAL_LDFLAGS) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(call normalize-target-libraries,$(filter-out %libc_nomalloc.a,$(filter-out %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES)))) \
-Wl,--start-group \
$(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
index 88c6215..9ecd649 100644
--- a/core/combo/TARGET_linux-sh.mk
+++ b/core/combo/TARGET_linux-sh.mk
@@ -153,6 +153,9 @@
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
@@ -170,6 +173,9 @@
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
-Wl,--start-group \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
-Wl,--end-group \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index dc4afb8..0863e63 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -36,8 +36,8 @@
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3
-TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-android-linux-
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-linux-android-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -199,6 +199,9 @@
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
@@ -216,6 +219,9 @@
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
-Wl,--start-group \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(TARGET_LIBGCC) \
diff --git a/core/config.mk b/core/config.mk
index f02fbef..b0b5082 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -326,7 +326,7 @@
ifeq ($(HOST_OS),darwin)
dir := $(HOST_OS)-$(HOST_ARCH)
endif
-OLD_FLEX := prebuilt/$(HOST_PREBUILT_TAG)/flex/flex-2.5.4a$(HOST_EXECUTABLE_SUFFIX)
+OLD_FLEX := prebuilts/misc/$(HOST_PREBUILT_TAG)/flex/flex-2.5.4a$(HOST_EXECUTABLE_SUFFIX)
ifeq ($(HOST_OS),darwin)
# Mac OS' screwy version of java uses a non-standard directory layout
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 0f7dd8f..4a44f77 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -16,9 +16,9 @@
endif
# Add the x86 toolchain bin dir if it actually exists
-ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin),)
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin),)
# this should be copied to HOST_OUT_EXECUTABLES instead
- ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
endif
ANDROID_BUILD_PATHS := $(ABP)
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
diff --git a/core/java.mk b/core/java.mk
index 7e4af79..2b6851b 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -4,10 +4,12 @@
# all_res_assets
ifeq ($(TARGET_BUILD_PDK),true)
+ifeq ($(TARGET_BUILD_PDK_JAVA),)
# LOCAL_SDK not defined or set to current
ifeq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
LOCAL_SDK_VERSION := $(PDK_BUILD_SDK_VERSION)
endif
+endif # !PDK_JAVA
endif #PDK
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
index bc90b95..4145028 100644
--- a/core/llvm_config.mk
+++ b/core/llvm_config.mk
@@ -41,12 +41,12 @@
endif
ifeq ($(TARGET_ARCH),x86)
CLANG_CONFIG_EXTRA_CFLAGS += \
- -target i686-android-linux \
+ -target i686-linux-android \
-nostdlibinc \
- -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-linux-android/bin
CLANG_CONFIG_EXTRA_LDFLAGS += \
- -target i686-android-linux \
- -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ -target i686-linux-android \
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-linux-android/bin
CLANG_CONFIG_UNKNOWN_CFLAGS += \
-finline-limit=300 \
-fno-inline-functions-called-once \
diff --git a/core/main.mk b/core/main.mk
index fa56b83..8a5b407 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -52,6 +52,11 @@
endif
endif
+# Absolute path of the present working direcotry.
+# This overrides the shell variable $PWD, which does not necessarily points to
+# the top of the source tree, for example when "make -C" is used in m/mm/mmm.
+PWD := $(shell pwd)
+
TOP := .
TOPDIR :=
@@ -461,8 +466,12 @@
$(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(subdirs) Android.mk)
include $(subdir_makefiles)
+
endif # ONE_SHOT_MAKEFILE
+# Now with all Android.mks loaded we can do post cleaning steps.
+include $(BUILD_SYSTEM)/post_clean.mk
+
ifeq ($(stash_product_vars),true)
$(call assert-product-vars, __STASHED)
endif
diff --git a/core/node_fns.mk b/core/node_fns.mk
index 38ecea7..40abff7 100644
--- a/core/node_fns.mk
+++ b/core/node_fns.mk
@@ -98,7 +98,7 @@
space := $(empty) $(empty)
define uniq-word
$(strip \
- $(if $(filter $(2),$(1)), \
+ $(if $(filter-out 0 1,$(words $(filter $(2),$(1)))), \
$(eval h := |||$(subst $(space),|||,$(strip $(1)))|||) \
$(eval h := $(subst |||$(strip $(2))|||,|||$(space)|||,$(h))) \
$(eval h := $(word 1,$(h)) $(2) $(wordlist 2,9999,$(h))) \
diff --git a/core/package.mk b/core/package.mk
index 195b346..c689031 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -94,12 +94,14 @@
ifeq (,$(LOCAL_RESOURCE_DIR))
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
endif
-LOCAL_RESOURCE_DIR := \
- $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
- $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
- $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
- $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
- $(LOCAL_RESOURCE_DIR)
+
+package_resource_overlays := $(strip \
+ $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
+ $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
+ $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
+ $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))))
+
+LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR)
all_assets := $(call find-subdir-assets,$(LOCAL_ASSET_DIR))
all_assets := $(addprefix $(LOCAL_ASSET_DIR)/,$(patsubst assets/%,%,$(all_assets)))
@@ -399,6 +401,9 @@
# Save information about this package
PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources)
+ifdef package_resource_overlays
+PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_OVERLAYS := $(package_resource_overlays)
+endif
PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME)
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
index 0949c38..492a9c4 100644
--- a/core/pdk_config.mk
+++ b/core/pdk_config.mk
@@ -33,6 +33,25 @@
endif # fusion
endif # pdk or fusion
+
+# additional items to add to platform.zip for platform-java build
+# For these dirs, add classes.jar and javalib.jar from the dir to platform.zip
+# all paths under out dir
+PDK_PLATFORM_JAVA_ZIP_JAVA_LIB_DIR := \
+ target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates \
+ target/common/obj/JAVA_LIBRARIES/core_intermediates \
+ target/common/obj/JAVA_LIBRARIES/core-junit_intermediates \
+ target/common/obj/JAVA_LIBRARIES/ext_intermediates \
+ target/common/obj/JAVA_LIBRARIES/framework_intermediates \
+ target/common/obj/JAVA_LIBRARIES/android.test.runner_intermediates
+# not java libraries
+PDK_PLATFORM_JAVA_ZIP_CONTENTS := \
+ target/common/obj/APPS/framework-res_intermediates/package-export.apk \
+ target/common/obj/APPS/framework-res_intermediates/src/R.stamp
+PDK_PLATFORM_JAVA_ZIP_CONTENTS += $(foreach lib_dir,$(PDK_PLATFORM_JAVA_ZIP_JAVA_LIB_DIR),\
+ $(lib_dir)/classes.jar $(lib_dir)/javalib.jar)
+
+
ifdef PDK_FUSION_PLATFORM_ZIP
TARGET_BUILD_PDK := true
ifeq (,$(wildcard $(PDK_FUSION_PLATFORM_ZIP)))
@@ -42,17 +61,27 @@
_pdk_fusion_intermediates := $(call intermediates-dir-for, PACKAGING, pdk_fusion)
_pdk_fusion_stamp := $(_pdk_fusion_intermediates)/pdk_fusion.stamp
+_pdk_fusion_file_list := $(shell unzip -Z -1 $(PDK_FUSION_PLATFORM_ZIP) \
+ '*[^/]' -x 'target/common/*' 2>/dev/null)
+_pdk_fusion_java_file_list := \
+ $(shell unzip -Z -1 $(PDK_FUSION_PLATFORM_ZIP) 'target/common/*' 2>/dev/null)
+_pdk_fusion_files := $(addprefix $(_pdk_fusion_intermediates)/,\
+ $(_pdk_fusion_file_list) $(_pdk_fusion_java_file_list))
+ifneq ($(_pdk_fusion_java_file_list),)
+TARGET_BUILD_PDK_JAVA := true
+endif
+
$(_pdk_fusion_stamp) : $(PDK_FUSION_PLATFORM_ZIP)
@echo "Unzip $(dir $@) <- $<"
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
$(hide) unzip -qo $< -d $(dir $@)
+ $(call split-long-arguments,-touch,$(_pdk_fusion_files))
$(hide) touch $@
- $(call split-long-arguments,touch,$(_pdk_fusion_files))
-_pdk_fusion_file_list := $(shell unzip -Z -1 $(PDK_FUSION_PLATFORM_ZIP) '*[^/]' 2>/dev/null)
-_pdk_fusion_files := $(addprefix $(_pdk_fusion_intermediates)/, $(_pdk_fusion_file_list))
+
$(_pdk_fusion_files) : $(_pdk_fusion_stamp)
+
# Implicit pattern rules to copy the fusion files to the system image directory.
# Note that if there is already explicit rule in the build system to generate a file,
# the pattern rule will be just ignored by make.
@@ -62,14 +91,47 @@
@mkdir -p $(dir $@)
$(hide) cp -fpPR $< $@
-ALL_PDK_FUSION_FILES := $(addprefix $(PRODUCT_OUT)/, $(_pdk_fusion_file_list))
+ifeq (true,$(TARGET_BUILD_PDK_JAVA))
+define JAVA_dependency_template
+$(OUT_DIR)/$(strip $(1)): $(_pdk_fusion_intermediates)/$(strip $(1)) $(OUT_DIR)/$(strip $(2)) \
+ $(_pdk_fusion_stamp)
+ @mkdir -p $$(dir $$@)
+ $(hide) cp -fpPR $$< $$@
+endef
+
+# needs explicit dependency as package-export.apk is not explicitly pulled
+$(eval $(call JAVA_dependency_template,\
+target/common/obj/APPS/framework-res_intermediates/src/R.stamp,\
+target/common/obj/APPS/framework-res_intermediates/package-export.apk))
+
+# javalib.jar should pull classes.jar as classes.jar is not explicitly pulled.
+$(foreach lib_dir,$(PDK_PLATFORM_JAVA_ZIP_JAVA_LIB_DIR),\
+$(eval $(call JAVA_dependency_template,$(lib_dir)/javalib.jar,\
+$(lib_dir)/classes.jar)))
+
+# implicit rules for all others
+$(TARGET_COMMON_OUT_ROOT)/% : $(_pdk_fusion_intermediates)/target/common/% $(_pdk_fusion_stamp)
+ @mkdir -p $(dir $@)
+ $(hide) cp -fpPR $< $@
endif
+ALL_PDK_FUSION_FILES := $(addprefix $(PRODUCT_OUT)/, $(_pdk_fusion_file_list))
+
+endif # PDK_FUSION_PLATFORM_ZIP
+
ifeq ($(TARGET_BUILD_PDK),true)
+ifeq ($(TARGET_BUILD_PDK_JAVA),)
+
# SDK used for Java build under PDK
PDK_BUILD_SDK_VERSION := $(lastword $(TARGET_AVAILABLE_SDK_VERSIONS))
$(info PDK Build uses SDK $(PDK_BUILD_SDK_VERSION))
+else # PDK_JAVA
+
+$(info PDK Build uses the current platform API)
+
+endif # PDK_JAVA
+
endif # BUILD_PDK
diff --git a/core/post_clean.mk b/core/post_clean.mk
new file mode 100644
index 0000000..213c43c
--- /dev/null
+++ b/core/post_clean.mk
@@ -0,0 +1,53 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Clean steps that need global knowledge of individual modules.
+# This file must be included after all Android.mks have been loaded.
+
+# Checks the current build configurations against the previous build,
+# clean artifacts in TARGET_COMMON_OUT_ROOT if necessary.
+# If a package's resource overlay has been changed, its R class needs to be
+# regenerated.
+previous_package_overlay_config := $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/previous_overlays.txt
+current_package_overlay_config := $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/current_overlays.txt
+current_all_packages_config := $(dir $(current_package_overlay_config))current_packages.txt
+
+$(shell rm -rf $(current_package_overlay_config) \
+ && mkdir -p $(dir $(current_package_overlay_config)) \
+ && touch $(current_package_overlay_config))
+$(shell echo '$(PACKAGES)' > $(current_all_packages_config))
+$(foreach p, $(PACKAGES), $(if $(PACKAGES.$(p).RESOURCE_OVERLAYS), \
+ $(shell echo '$(p)' '$(PACKAGES.$(p).RESOURCE_OVERLAYS)' >> $(current_package_overlay_config))))
+
+ifneq (,$(wildcard $(previous_package_overlay_config)))
+packages_overlay_changed := $(shell build/tools/diff_package_overlays.py \
+ $(current_all_packages_config) $(current_package_overlay_config) \
+ $(previous_package_overlay_config))
+ifneq (,$(packages_overlay_changed))
+overlay_cleanup_cmd := $(strip rm -rf $(foreach p, $(packages_overlay_changed),\
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/$(p)_intermediates))
+$(info *** Overlay change detected, clean shared intermediate files...)
+$(info *** $(overlay_cleanup_cmd))
+$(shell $(overlay_cleanup_cmd))
+overlay_cleanup_cmd :=
+endif
+packages_overlay_changed :=
+endif
+
+# Now current becomes previous.
+$(shell mv -f $(current_package_overlay_config) $(previous_package_overlay_config))
+
+previous_package_overlay_config :=
+current_package_overlay_config :=
+current_all_packages_config :=
diff --git a/core/product.mk b/core/product.mk
index b001ca2..d9e4186 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -272,3 +272,7 @@
$(eval $(error The following variables have been changed: $(changed_variables))),)
)
endef
+
+define add-to-product-copy-files-if-exists
+$(if $(wildcard $(word 1,$(subst :, ,$(1)))),$(1))
+endef
diff --git a/core/tasks/vendor_module_check.mk b/core/tasks/vendor_module_check.mk
index d26a045..f492468 100644
--- a/core/tasks/vendor_module_check.mk
+++ b/core/tasks/vendor_module_check.mk
@@ -16,11 +16,14 @@
# Restrict the vendor module owners here.
_vendor_owner_whitelist := \
+ asus \
audience \
broadcom \
csr \
+ elan \
imgtec \
invensense \
+ nvidia \
nxp \
samsung \
samsung_arm \
diff --git a/core/user_tags.mk b/core/user_tags.mk
index 325c600..ca2594b 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -443,7 +443,6 @@
resize2fs \
resize2fs_host \
rgb2565 \
- rild \
rsg-generator \
run-as \
runtime \
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 021617d..02ac42c 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 4.1
+ PLATFORM_VERSION := 4.0.9.99.999.9999.99999
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -53,13 +53,13 @@
# intermediate builds). During development, this number remains at the
# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
# the code-name of the new development work.
- PLATFORM_SDK_VERSION := 16
+ PLATFORM_SDK_VERSION := 15
endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# This is the current development code-name, if the build is not a final
# release build. If this is a final release build, it is simply "REL".
- PLATFORM_VERSION_CODENAME := REL
+ PLATFORM_VERSION_CODENAME := AOSP
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
diff --git a/envsetup.sh b/envsetup.sh
index 8b7eea9..84ec3e5 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -118,7 +118,7 @@
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
- x86) toolchaindir=x86/i686-android-linux-4.4.3/bin
+ x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-4.6/bin
;;
@@ -737,7 +737,7 @@
local ARCH=$(get_build_var TARGET_ARCH)
local GDB
case "$ARCH" in
- x86) GDB=i686-android-linux-gdb;;
+ x86) GDB=i686-linux-android-gdb;;
arm) GDB=arm-linux-androideabi-gdb;;
*) echo "Unknown arch $ARCH"; return 1;;
esac
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index bc999fa..cee09ce 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -35,7 +35,9 @@
# Enable dex-preoptimization to speed up the first boot sequence
# of an SDK AVD. Note that this operation only works on Linux for now
ifeq ($(HOST_OS),linux)
-WITH_DEXPREOPT := true
+ ifeq ($(WITH_DEXPREOPT),)
+ WITH_DEXPREOPT := true
+ endif
endif
# Build OpenGLES emulation guest and host libraries
diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk
index f8e5162..737a607 100644
--- a/target/board/generic/device.mk
+++ b/target/board/generic/device.mk
@@ -23,10 +23,10 @@
ro.adb.qemud=1
PRODUCT_COPY_FILES := \
- development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
- development/data/etc/vold.conf:system/etc/vold.conf \
- development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
- development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
+ device/generic/goldfish/data/etc/vold.conf:system/etc/vold.conf \
+ $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml) \
+ $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml) \
hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf
PRODUCT_PACKAGES := \
diff --git a/target/board/generic_mips/Android.mk b/target/board/generic_mips/Android.mk
new file mode 100644
index 0000000..abf8d57
--- /dev/null
+++ b/target/board/generic_mips/Android.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
diff --git a/target/board/generic_mips/BoardConfig.mk b/target/board/generic_mips/BoardConfig.mk
new file mode 100644
index 0000000..722e112
--- /dev/null
+++ b/target/board/generic_mips/BoardConfig.mk
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# BoardConfig.mk
+#
+# Product-specific compile-time definitions.
+#
+
+# The generic product target doesn't have any hardware-specific pieces.
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_KERNEL := true
+
+TARGET_ARCH := mips
+ifeq (,$(TARGET_ARCH_VARIANT))
+TARGET_ARCH_VARIANT := mips32r2-fp
+endif
+GET_CPU_ABI := mips
+
+HAVE_HTC_AUDIO_DRIVER := true
+BOARD_USES_GENERIC_AUDIO := true
+
+# no hardware camera
+USE_CAMERA_STUB := true
+
+# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
+TARGET_SHELL := ash
+
+# Enable dex-preoptimization to speed up the first boot sequence
+# of an SDK AVD. Note that this operation only works on Linux for now
+ifeq ($(HOST_OS),linux)
+ ifeq ($(WITH_DEXPREOPT),)
+ WITH_DEXPREOPT := true
+ endif
+endif
+
+# Build OpenGLES emulation guest and host libraries
+BUILD_EMULATOR_OPENGL := true
+
+# Build and enable the OpenGL ES View renderer. When running on the emulator,
+# the GLES renderer disables itself if host GL acceleration isn't available.
+USE_OPENGL_RENDERER := true
diff --git a/target/board/generic_mips/README.txt b/target/board/generic_mips/README.txt
new file mode 100644
index 0000000..b31a857
--- /dev/null
+++ b/target/board/generic_mips/README.txt
@@ -0,0 +1,9 @@
+The "generic_mips" product defines a MIPS based non-hardware-specific
+target without a kernel or bootloader.
+
+It can be used to build the entire user-level system, and
+will work with the emulator, though sound will not work
+(see the "emulator" product for that).
+
+It is not a product "base class"; no other products inherit
+from it or use it in any way.
diff --git a/target/board/generic_mips/device.mk b/target/board/generic_mips/device.mk
new file mode 100644
index 0000000..bd08fde
--- /dev/null
+++ b/target/board/generic_mips/device.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This is a build configuration for the product aspects that
+# are specific to the emulator.
+
+PRODUCT_PROPERTY_OVERRIDES := \
+ ro.ril.hsxpa=1 \
+ ro.ril.gprsclass=10
+
+PRODUCT_COPY_FILES := \
+ development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
+ development/data/etc/vold.conf:system/etc/vold.conf \
+ development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml
+
+PRODUCT_PACKAGES := \
+ audio.primary.goldfish
diff --git a/target/board/generic_mips/system.prop b/target/board/generic_mips/system.prop
new file mode 100644
index 0000000..137a0f9
--- /dev/null
+++ b/target/board/generic_mips/system.prop
@@ -0,0 +1,6 @@
+#
+# system.prop for generic sdk
+#
+
+rild.libpath=/system/lib/libreference-ril.so
+rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index c62b0a4..c0d7a25 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -8,7 +8,7 @@
TARGET_NO_KERNEL := true
TARGET_CPU_ABI := x86
TARGET_ARCH := x86
-TARGET_ARCH_VARIANT := x86-atom
+TARGET_ARCH_VARIANT := x86
TARGET_PRELINK_MODULE := false
# The IA emulator (qemu) uses the Goldfish devices
@@ -18,6 +18,9 @@
# no hardware camera
USE_CAMERA_STUB := true
+# customize the malloced address to be 16-byte aligned
+BOARD_MALLOC_ALIGNMENT := 16
+
# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
TARGET_SHELL := ash
diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk
index 7533a61..d24f3ac 100644
--- a/target/board/generic_x86/device.mk
+++ b/target/board/generic_x86/device.mk
@@ -23,8 +23,8 @@
ro.adb.qemud=1
PRODUCT_COPY_FILES := \
- development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
- development/data/etc/vold.conf:system/etc/vold.conf \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
+ device/generic/goldfish/data/etc/vold.conf:system/etc/vold.conf \
development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
index dc0f19e..80a9077 100644
--- a/target/board/vbox_x86/BoardConfig.mk
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -37,3 +37,5 @@
# The eth0 device should be started with dhcp on boot.
# Useful for emulators that don't provide a wifi connection.
NET_ETH0_STARTONBOOT := true
+
+ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.heapsize=32m
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
index c7cc189..b03cbd3 100644
--- a/target/board/vbox_x86/device.mk
+++ b/target/board/vbox_x86/device.mk
@@ -27,8 +27,8 @@
LOCAL_KERNEL := prebuilts/qemu-kernel/x86/kernel-vbox
PRODUCT_COPY_FILES := \
- development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
- development/data/etc/vold.conf:system/etc/vold.conf \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
+ device/generic/goldfish/data/etc/vold.conf:system/etc/vold.conf \
development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \
system/core/rootdir/init.rc:root/init.rc \
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index 44b9000..9279633 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -36,10 +36,13 @@
$(LOCAL_DIR)/core.mk \
$(LOCAL_DIR)/generic.mk \
$(LOCAL_DIR)/generic_x86.mk \
+ $(LOCAL_DIR)/generic_mips.mk \
$(LOCAL_DIR)/full.mk \
$(LOCAL_DIR)/full_x86.mk \
+ $(LOCAL_DIR)/full_mips.mk \
$(LOCAL_DIR)/vbox_x86.mk \
$(LOCAL_DIR)/sdk.mk \
$(LOCAL_DIR)/sdk_x86.mk \
+ $(LOCAL_DIR)/sdk_mips.mk \
$(LOCAL_DIR)/large_emu_hw.mk
endif
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index d89af51..2c24b1a 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -20,9 +20,6 @@
# in inherited configurations.
PRODUCT_PACKAGES := \
- drmserver \
- libdrmframework \
- libdrmframework_jni \
libfwdlockengine \
OpenWnn \
PinyinIME \
@@ -32,6 +29,16 @@
VideoEditor \
WAPPushManager
+PRODUCT_PACKAGES += \
+ Galaxy4 \
+ HoloSpiralWallpaper \
+ LiveWallpapers \
+ LiveWallpapersPicker \
+ MagicSmokeWallpapers \
+ NoiseField \
+ PhaseBeam \
+ VisualizationWallpapers
+
# Additional settings used in all AOSP builds
PRODUCT_PROPERTY_OVERRIDES := \
ro.com.android.dateformat=MM-dd-yyyy \
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
index c376314..5899c8c 100644
--- a/target/product/full_base_telephony.mk
+++ b/target/product/full_base_telephony.mk
@@ -27,7 +27,7 @@
ro.com.android.dataroaming=true
PRODUCT_COPY_FILES := \
- development/data/etc/apns-conf.xml:system/etc/apns-conf.xml
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
diff --git a/target/product/full_mips.mk b/target/product/full_mips.mk
new file mode 100644
index 0000000..886cf31
--- /dev/null
+++ b/target/product/full_mips.mk
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This is a build configuration for a full-featured build of the
+# Open-Source part of the tree. It's geared toward a US-centric
+# mips build quite specifically for the emulator, and might not be
+# entirely appropriate to inherit from for on-device configurations.
+
+PRODUCT_PACKAGES := \
+ Camera
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_mips/device.mk)
+
+# Overrides
+PRODUCT_NAME := full_mips
+PRODUCT_DEVICE := generic_mips
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := Full MIPS Android on Emulator
diff --git a/target/product/generic_mips.mk b/target/product/generic_mips.mk
new file mode 100644
index 0000000..7b53d04
--- /dev/null
+++ b/target/product/generic_mips.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2007 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This is a generic phone product that isn't specialized for a specific device.
+# It includes the base Android platform.
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
+
+# Overrides
+PRODUCT_BRAND := generic_mips
+PRODUCT_DEVICE := generic_mips
+PRODUCT_NAME := generic_mips
diff --git a/target/product/locales_full.mk b/target/product/locales_full.mk
index 8b8ab05..3a90d2b 100644
--- a/target/product/locales_full.mk
+++ b/target/product/locales_full.mk
@@ -1,3 +1,3 @@
-PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN
+PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN
$(call inherit-product, build/target/product/languages_full.mk)
diff --git a/target/product/mini.mk b/target/product/mini.mk
new file mode 100644
index 0000000..8a74428
--- /dev/null
+++ b/target/product/mini.mk
@@ -0,0 +1,207 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Common configurations for mini_XXX lunch targets
+# This is mainly for creating small system image during early development stage.
+
+PRODUCT_BRAND := mini
+PRODUCT_DEVICE := mini
+PRODUCT_NAME := mini
+
+# add all configurations
+PRODUCT_AAPT_CONFIG := normal ldpi mdpi hdpi xhdpi xxhdpi
+PRODUCT_AAPT_PREF_CONFIG := hdpi
+
+# en_US only
+PRODUCT_LOCALES := en_US
+
+# dummy definitions to use += in later parts
+PRODUCT_PROPERTY_OVERRIDES :=
+PRODUCT_COPY_FILES :=
+
+
+# for CtsVerifier
+PRODUCT_PACKAGES += \
+ com.android.future.usb.accessory
+
+# It does not mean that all features are supproted, but only for meeting
+# configuration requirements for some CTS
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
+ frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
+ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
+
+#----------------- originally from core.mk ----------------
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.notification_sound=OnTheHunt.ogg \
+ ro.config.alarm_alert=Alarm_Classic.ogg
+
+PRODUCT_PACKAGES += \
+ ApplicationsProvider \
+ ContactsProvider \
+ DefaultContainerService \
+ DownloadProvider \
+ DownloadProviderUi \
+ MediaProvider \
+ PackageInstaller \
+ SettingsProvider \
+ TelephonyProvider \
+ UserDictionaryProvider \
+ apache-xml \
+ bouncycastle \
+ bu \
+ cacerts \
+ com.android.location.provider \
+ com.android.location.provider.xml \
+ core \
+ core-junit \
+ dalvikvm \
+ dexdeps \
+ dexdump \
+ dexlist \
+ dexopt \
+ dmtracedump \
+ drmserver \
+ dx \
+ ext \
+ framework-res \
+ hprof-conv \
+ icu.dat \
+ installd \
+ ip \
+ ip-up-vpn \
+ ip6tables \
+ iptables \
+ keystore \
+ keystore.default \
+ libandroidfw \
+ libOpenMAXAL \
+ libOpenSLES \
+ libaudiopreprocessing \
+ libaudioutils \
+ libcrypto \
+ libdownmix \
+ libdvm \
+ libdrmframework \
+ libdrmframework_jni \
+ libexpat \
+ libfilterfw \
+ libfilterpack_imageproc \
+ libgabi++ \
+ libicui18n \
+ libicuuc \
+ libjavacore \
+ libkeystore \
+ libmdnssd \
+ libnativehelper \
+ libnfc_ndef \
+ libpowermanager \
+ libspeexresampler \
+ libsqlite_jni \
+ libssl \
+ libstagefright_soft_aacdec \
+ libstagefright_soft_aacenc \
+ libstagefright_soft_amrdec \
+ libstagefright_soft_amrnbenc \
+ libstagefright_soft_amrwbenc \
+ libstagefright_soft_flacenc \
+ libstagefright_soft_g711dec \
+ libstagefright_soft_h264dec \
+ libstagefright_soft_h264enc \
+ libstagefright_soft_mp3dec \
+ libstagefright_soft_mpeg4dec \
+ libstagefright_soft_mpeg4enc \
+ libstagefright_soft_vorbisdec \
+ libstagefright_soft_vpxdec \
+ libstagefright_soft_rawdec \
+ libvariablespeed \
+ libwebrtc_audio_preprocessing \
+ libwilhelm \
+ libz \
+ mdnsd \
+ requestsync \
+ screencap \
+ sensorservice \
+ lint
+
+PRODUCT_COPY_FILES += \
+ system/core/rootdir/init.usb.rc:root/init.usb.rc \
+
+#----------------- originally from generic_no_telephony.mk ----------------
+
+PRODUCT_PACKAGES += \
+ Bluetooth \
+ InputDevices \
+ LatinIME \
+ Launcher2 \
+ Phone \
+ Provision \
+ Settings \
+ SystemUI \
+ hostapd \
+ wpa_supplicant.conf
+
+
+PRODUCT_PACKAGES += \
+ icu.dat
+
+PRODUCT_PACKAGES += \
+ librs_jni \
+ libvideoeditor_jni \
+ libvideoeditor_core \
+ libvideoeditor_osal \
+ libvideoeditor_videofilters \
+ libvideoeditorplayer \
+
+PRODUCT_PACKAGES += \
+ audio.primary.default \
+ audio_policy.default \
+ local_time.default \
+ power.default
+
+PRODUCT_PACKAGES += \
+ local_time.default
+
+PRODUCT_COPY_FILES += \
+ system/bluetooth/data/audio.conf:system/etc/bluetooth/audio.conf \
+ system/bluetooth/data/auto_pairing.conf:system/etc/bluetooth/auto_pairing.conf \
+ system/bluetooth/data/blacklist.conf:system/etc/bluetooth/blacklist.conf \
+ system/bluetooth/data/input.conf:system/etc/bluetooth/input.conf \
+ system/bluetooth/data/network.conf:system/etc/bluetooth/network.conf \
+ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.carrier=unknown
+
+#----------------- originally from full_base.mk ----------------
+
+PRODUCT_PACKAGES += \
+ drmserver \
+ libdrmframework \
+ libdrmframework_jni
+
+
+# Additional settings used in all AOSP builds
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.com.android.dateformat=MM-dd-yyyy \
+ ro.config.ringtone=Ring_Synth_04.ogg \
+ ro.config.notification_sound=pixiedust.ogg
+
+$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
+$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage5.mk)
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index a5d941e..fceb2e5 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -62,7 +62,8 @@
CalendarProvider \
Calendar \
SmokeTest \
- SmokeTestApp
+ SmokeTestApp \
+ rild
# Define the host tools and libs that are parts of the SDK.
@@ -78,7 +79,7 @@
PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay
PRODUCT_COPY_FILES := \
- development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
system/core/rootdir/etc/vold.fstab:system/etc/vold.fstab \
frameworks/base/data/sounds/effects/camera_click.ogg:system/media/audio/ui/camera_click.ogg \
frameworks/base/data/sounds/effects/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg \
@@ -87,6 +88,7 @@
development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
+ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \
hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf
$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
diff --git a/target/product/sdk_mips.mk b/target/product/sdk_mips.mk
new file mode 100644
index 0000000..2072400
--- /dev/null
+++ b/target/product/sdk_mips.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2012 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This is a build configuration for a full-featured build of the
+# Open-Source part of the tree. It's geared toward a US-centric
+# build quite specifically for the emulator, and might not be
+# entirely appropriate to inherit from for on-device configurations.
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk.mk)
+
+# Overrides
+PRODUCT_BRAND := generic_mips
+PRODUCT_NAME := sdk_mips
+PRODUCT_DEVICE := generic_mips
+PRODUCT_MODEL := Android SDK for Mips
diff --git a/target/product/telephony.mk b/target/product/telephony.mk
index a0220de..89ed20a 100644
--- a/target/product/telephony.mk
+++ b/target/product/telephony.mk
@@ -18,6 +18,7 @@
# to products that have telephony hardware.
PRODUCT_PACKAGES := \
- Mms
+ Mms \
+ rild
PRODUCT_COPY_FILES := \
diff --git a/tools/diff_package_overlays.py b/tools/diff_package_overlays.py
new file mode 100755
index 0000000..0e2c773
--- /dev/null
+++ b/tools/diff_package_overlays.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2012 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Prints to stdout the package names that have overlay changes between
+current_overlays.txt and previous_overlays.txt.
+
+Usage: diff_package_overlays.py <current_packages.txt> <current_overlays.txt> <previous_overlays.txt>
+current_packages.txt contains all package names separated by space in the current build.
+This script modfies current_packages.txt if necessary: if there is a package in
+previous_overlays.txt but absent from current_packages.txt, we copy that line
+from previous_overlays.txt over to current_packages.txt. Usually that means we
+just don't care that package in the current build (for example we are switching
+from a full build to a partial build with mm/mmm), and we should carry on the
+previous overlay config so current_overlays.txt always reflects the current
+status of the entire tree.
+
+Format of current_overlays.txt and previous_overlays.txt:
+ <package_name> <resource_overlay> [resource_overlay ...]
+ <package_name> <resource_overlay> [resource_overlay ...]
+ ...
+"""
+
+import sys
+
+def main(argv):
+ if len(argv) != 4:
+ print >> sys.stderr, __doc__
+ sys.exit(1)
+
+ f = open(argv[1])
+ all_packages = set(f.read().split())
+ f.close()
+
+ def load_overlay_config(filename):
+ f = open(filename)
+ result = {}
+ for line in f:
+ line = line.strip()
+ if not line or line.startswith("#"):
+ continue
+ words = line.split()
+ result[words[0]] = " ".join(words[1:])
+ f.close()
+ return result
+
+ current_overlays = load_overlay_config(argv[2])
+ previous_overlays = load_overlay_config(argv[3])
+
+ result = []
+ carryon = []
+ for p in current_overlays:
+ if p not in previous_overlays:
+ result.append(p)
+ elif current_overlays[p] != previous_overlays[p]:
+ result.append(p)
+ for p in previous_overlays:
+ if p not in current_overlays:
+ if p in all_packages:
+ # overlay changed
+ result.append(p)
+ else:
+ # we don't build p in the current build.
+ carryon.append(p)
+
+ # Add carryon to the current overlay config file.
+ if carryon:
+ f = open(argv[2], "a")
+ for p in carryon:
+ f.write(p + " " + previous_overlays[p] + "\n")
+ f.close()
+
+ # Print out the package names that have overlay change.
+ for r in result:
+ print r
+
+if __name__ == "__main__":
+ main(sys.argv)