summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Makefile16
-rw-r--r--core/clang/HOST_x86_common.mk47
-rw-r--r--core/clang/config.mk16
-rw-r--r--core/combo/HOST_linux-x86.mk6
-rw-r--r--core/combo/HOST_linux-x86_64.mk6
-rw-r--r--core/config.mk21
-rw-r--r--core/dumpvar.mk2
-rw-r--r--core/main.mk13
-rw-r--r--core/tasks/kernel.mk6
-rw-r--r--core/tasks/xloader.mk59
-rw-r--r--envsetup.sh63
-rw-r--r--libs/host/Android.mk30
l---------libs/host/asm-4.0.jar1
l---------libs/host/asm.jar1
l---------libs/host/ddmlib-prebuilt.jar1
l---------libs/host/guava.jar1
l---------libs/host/kxml2-2.3.0.jar1
l---------libs/host/org-netbeans-api-visual.jar1
l---------libs/host/org-openide-util-lookup.jar1
l---------libs/host/org-openide-util.jar1
l---------libs/host/tools-common-prebuilt.jar1
-rw-r--r--target/product/base.mk4
-rw-r--r--target/product/generic_no_telephony.mk12
-rw-r--r--target/product/security/cm-devkey.x509.pem23
-rw-r--r--target/product/security/cm.x509.pem21
-rw-r--r--tools/device/cm.mk.template2
26 files changed, 201 insertions, 155 deletions
diff --git a/core/Makefile b/core/Makefile
index 3ac9b0d..b9f7c2e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -481,6 +481,12 @@ else
INSTALLED_KERNEL_TARGET :=
endif
+ifeq ($(TARGET_XLOADER_MLO),true)
+INSTALLED_XLOADER_MODULE := $(PRODUCT_OUT)/MLO
+else
+INSTALLED_XLOADER_MODULE := $(PRODUCT_OUT)/x-load.bin
+endif
+
# -----------------------------------------------------------------
# the ramdisk
INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \
@@ -695,7 +701,7 @@ endif # TARGET_BUILD_APPS
# make the target NOTICE files depend on this particular file too, which will
# then be in the right directory for the find in combine-notice-files to work.
$(kernel_notice_file): \
- prebuilts/qemu-kernel/arm/LINUX_KERNEL_COPYING \
+ kernel/samsung/smdk4412/COPYING \
| $(ACP)
@echo -e ${CL_CYN}"Copying:"${CL_RST}" $@"
$(hide) mkdir -p $(dir $@)
@@ -948,10 +954,6 @@ OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
-else
- PRODUCT_EXTRA_RECOVERY_KEYS += \
- build/target/product/security/cm \
- build/target/product/security/cm-devkey
endif
# Generate a file containing the keys that will be read by the
@@ -1922,7 +1924,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
$(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \
$(BUILT_TARGET_FILES_PACKAGE) $@
-CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(CM_VERSION).zip
+CM_TARGET_PACKAGE := $(PRODUCT_OUT)/$(REPLICANT_VERSION).zip
.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
@@ -2112,7 +2114,7 @@ sdk_dir := $(HOST_OUT)/sdk/$(TARGET_PRODUCT)
# darwin-x86 --> android-sdk_12345_mac-x86
# windows-x86 --> android-sdk_12345_windows
#
-sdk_name := android-sdk_$(FILE_NAME_TAG)
+sdk_name := replicant-sdk
ifeq ($(HOST_OS),darwin)
INTERNAL_SDK_HOST_OS_NAME := mac
else
diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk
index 7b3d6b5..31415ef 100644
--- a/core/clang/HOST_x86_common.mk
+++ b/core/clang/HOST_x86_common.mk
@@ -10,43 +10,38 @@ endif
ifeq ($(HOST_OS),linux)
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
- --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
- -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -Btoolchain/gcc/host/install/x86_64-linux/bin
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -isystem toolchain/headers/clang
ifneq ($(strip $($(clang_2nd_arch_prefix)HOST_IS_64_BIT)),)
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
- --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8 \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8/x86_64-linux \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8/backward
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -isystem toolchain/headers/clang
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
- --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
- -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \
- -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.8 \
- -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.8 \
- -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib64/
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -Btoolchain/gcc/host/install/x86_64-linux/bin \
+ -Btoolchain/gcc/host/install/lib/gcc/x86_64-linux/4.9.x \
+ -Ltoolchain/gcc/host/install/lib/gcc/x86_64-linux/4.9.x \
+ -Ltoolchain/gcc/host/install/lib64
+
else
+
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
- --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8 \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8/x86_64-linux/32 \
- -isystem $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.8/backward
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -isystem toolchain/headers/clang
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \
- --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
- --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
- -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \
- -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.8/32 \
- -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.8/32 \
- -L$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib32/
+ --gcc-toolchain=toolchain/gcc/host/install \
+ -Btoolchain/gcc/host/install/x86_64-linux/bin \
+ -Btoolchain/gcc/host/install/lib/gcc/x86_64-linux/4.9.x/32 \
+ -Ltoolchain/gcc/host/install/lib/gcc/x86_64-linux/4.9.x/32 \
+ -Ltoolchain/gcc/host/install/lib32
+
endif
endif # Linux
diff --git a/core/clang/config.mk b/core/clang/config.mk
index b887c83..46707c0 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -7,13 +7,13 @@ WITHOUT_HOST_CLANG := true
endif
LLVM_PREBUILTS_VERSION := 3.6
-LLVM_PREBUILTS_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/$(LLVM_PREBUILTS_VERSION)/bin
-LLVM_RTLIB_PATH := $(LLVM_PREBUILTS_PATH)/../lib/clang/$(LLVM_PREBUILTS_VERSION)/lib/linux/
+#LLVM_PREBUILTS_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/$(LLVM_PREBUILTS_VERSION)/bin
+#LLVM_RTLIB_PATH := $(LLVM_PREBUILTS_PATH)/../lib/clang/$(LLVM_PREBUILTS_VERSION)/lib/linux/
-CLANG := $(LLVM_PREBUILTS_PATH)/clang$(BUILD_EXECUTABLE_SUFFIX)
-CLANG_CXX := $(LLVM_PREBUILTS_PATH)/clang++$(BUILD_EXECUTABLE_SUFFIX)
-LLVM_AS := $(LLVM_PREBUILTS_PATH)/llvm-as$(BUILD_EXECUTABLE_SUFFIX)
-LLVM_LINK := $(LLVM_PREBUILTS_PATH)/llvm-link$(BUILD_EXECUTABLE_SUFFIX)
+CLANG := toolchain/clang/bin/clang
+CLANG_CXX := toolchain/clang/bin/clang++
+LLVM_AS := toolchain/clang/bin/llvm-as
+LLVM_LINK := toolchain/clang/bin/llvm-link
CLANG_TBLGEN := $(BUILD_OUT_EXECUTABLES)/clang-tblgen$(BUILD_EXECUTABLE_SUFFIX)
LLVM_TBLGEN := $(BUILD_OUT_EXECUTABLES)/llvm-tblgen$(BUILD_EXECUTABLE_SUFFIX)
@@ -153,7 +153,5 @@ ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
# provides to Clang (for supporting features like -ftrapv).
COMPILER_RT_CONFIG_EXTRA_STATIC_LIBRARIES := libcompiler_rt-extras
-ifeq ($(HOST_PREFER_32_BIT),true)
-# We don't have 32-bit prebuilt libLLVM/libclang, so force to build them from source.
FORCE_BUILD_LLVM_COMPONENTS := true
-endif
+
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 8eda6c0..92219b6 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -20,9 +20,9 @@
ifeq ($(strip $($(combo_2nd_arch_prefix)HOST_TOOLCHAIN_PREFIX)),)
$(combo_2nd_arch_prefix)HOST_TOOLCHAIN_PREFIX := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/bin/x86_64-linux-
endif
-$(combo_2nd_arch_prefix)HOST_CC := $($(combo_2nd_arch_prefix)HOST_TOOLCHAIN_PREFIX)gcc
-$(combo_2nd_arch_prefix)HOST_CXX := $($(combo_2nd_arch_prefix)HOST_TOOLCHAIN_PREFIX)g++
-$(combo_2nd_arch_prefix)HOST_AR := $($(combo_2nd_arch_prefix)HOST_TOOLCHAIN_PREFIX)ar
+$(combo_2nd_arch_prefix)HOST_CC := toolchain/gcc/host/install/bin/x86_64-linux-gcc
+$(combo_2nd_arch_prefix)HOST_CXX := toolchain/gcc/host/install/bin/x86_64-linux-g++
+$(combo_2nd_arch_prefix)HOST_AR := toolchain/gcc/host/install/bin/x86_64-linux-ar
# gcc location for clang; to be updated when clang is updated
$(combo_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/
diff --git a/core/combo/HOST_linux-x86_64.mk b/core/combo/HOST_linux-x86_64.mk
index e268e41..0f9e37b 100644
--- a/core/combo/HOST_linux-x86_64.mk
+++ b/core/combo/HOST_linux-x86_64.mk
@@ -20,9 +20,9 @@
ifeq ($(strip $(HOST_TOOLCHAIN_PREFIX)),)
HOST_TOOLCHAIN_PREFIX := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/bin/x86_64-linux-
endif
-HOST_CC := $(HOST_TOOLCHAIN_PREFIX)gcc
-HOST_CXX := $(HOST_TOOLCHAIN_PREFIX)g++
-HOST_AR := $(HOST_TOOLCHAIN_PREFIX)ar
+HOST_CC := toolchain/gcc/host/install/bin/x86_64-linux-gcc
+HOST_CXX := toolchain/gcc/host/install/bin/x86_64-linux-g++
+HOST_AR := toolchain/gcc/host/install/bin/x86_64-linux-ar
# gcc location for clang; to be updated when clang is updated
HOST_TOOLCHAIN_FOR_CLANG := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/
diff --git a/core/config.mk b/core/config.mk
index ab60701..facf37c 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -356,8 +356,6 @@ ifeq ($(strip $(WITH_SYNTAX_CHECK)),0)
WITH_SYNTAX_CHECK :=
endif
-# Disable WITH_STATIC_ANALYZER and WITH_SYNTAX_CHECK if tool can't be found
-SYNTAX_TOOLS_PREFIX := prebuilts/misc/$(HOST_PREBUILT_TAG)/analyzer/bin
ifneq ($(strip $(WITH_STATIC_ANALYZER)),)
ifeq ($(wildcard $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer),)
$(warning *** Disable WITH_STATIC_ANALYZER because $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer does not exist)
@@ -412,16 +410,16 @@ JACK_LAUNCHER_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jack-launcher.jar
JILL_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jill.jar
JACK_MULTIDEX_DEFAULT_PREPROCESSOR := frameworks/multidex/library/resources/JACK-INF/legacyMultidexInstallation.jpp
-LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
+LEX := /usr/bin/flex
# The default PKGDATADIR built in the prebuilt bison is a relative path
# external/bison/data.
# To run bison from elsewhere you need to set up enviromental variable
# BISON_PKGDATADIR.
BISON_PKGDATADIR := $(PWD)/external/bison/data
-BISON := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/bison/bison
+BISON := /usr/bin/bison
YACC := $(BISON) -d
-YASM := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/yasm/yasm
+YASM := /usr/bin/yasm
DOXYGEN:= doxygen
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
@@ -493,7 +491,7 @@ endif
DEFAULT_JACK_EXTRA_ARGS += --verbose error
JILL := java -Xmx3500m -jar $(JILL_JAR)
-PROGUARD := external/proguard/bin/proguard.sh
+PROGUARD := /usr/bin/proguard
JAVATAGS := build/tools/java-event-log-tags.py
LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc$(HOST_EXECUTABLE_SUFFIX)
BCC_COMPAT := $(HOST_OUT_EXECUTABLES)/bcc_compat$(HOST_EXECUTABLE_SUFFIX)
@@ -514,14 +512,13 @@ DX := $(HOST_OUT_EXECUTABLES)/dx
ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign$(HOST_EXECUTABLE_SUFFIX)
# relocation packer
-RELOCATION_PACKER := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/relocation_packer/relocation_packer
+RELOCATION_PACKER := $(HOST_OUT_EXECUTABLES)/relocation_packer$(HOST_EXECUTABLE_SUFFIX)
-FINDBUGS_DIR := external/owasp/sanitizer/tools/findbugs/bin
-FINDBUGS := $(FINDBUGS_DIR)/findbugs
-EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
+FINDBUGS := /usr/bin/findbugs
+EMMA_JAR := /usr/share/java/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
# Tool to merge AndroidManifest.xmls
-ANDROID_MANIFEST_MERGER := java -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge
+ANDROID_MANIFEST_MERGER := java -classpath /usr/share/java/com.android.tools.build.manifest-merger.jar:/usr/share/java/com.android.tools.common.jar:/usr/share/java/androidsdk-sdklib.jar com.android.manifmerger.Main merge
YACC_HEADER_SUFFIX:= .hpp
@@ -736,7 +733,7 @@ endif
ifneq ($(CM_BUILD),)
## We need to be sure the global selinux policies are included
## last, to avoid accidental resetting by device configs
-$(eval include vendor/cm/sepolicy/sepolicy.mk)
+$(eval include vendor/replicant/sepolicy/sepolicy.mk)
# Include any vendor specific config.mk file
-include $(TOPDIR)vendor/*/build/core/config.mk
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 47ba476..fb30ed4 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -67,7 +67,7 @@ HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
$(info ============================================)
$(info PLATFORM_VERSION_CODENAME=$(PLATFORM_VERSION_CODENAME))
$(info PLATFORM_VERSION=$(PLATFORM_VERSION))
-$(info CM_VERSION=$(CM_VERSION))
+$(info REPLICANT_VERSION=$(REPLICANT_VERSION))
$(info TARGET_PRODUCT=$(TARGET_PRODUCT))
$(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
$(info TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE))
diff --git a/core/main.mk b/core/main.mk
index 6560375..139fa46 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -58,6 +58,8 @@ PWD := $(shell pwd)
TOP := .
TOPDIR :=
+TOOLCHAIN_DIR := $(TOPDIR)toolchain
+
BUILD_SYSTEM := $(TOPDIR)build/core
# This is the default target. It must be the first declared target.
@@ -1008,8 +1010,17 @@ clean:
@rm -rf $(OUT_DIR)/*
@echo -e ${CL_GRN}"Entire build directory removed."${CL_RST}
+.PHONY: tcclean
+tcclean:
+ @rm -rf $(TOOLCHAIN_DIR)/clang
+ @rm -rf $(TOOLCHAIN_DIR)/gcc
+ @rm -rf $(TOOLCHAIN_DIR)/headers
+ @rm -rf $(TOOLCHAIN_DIR)/jack_jill
+ @echo -e ${CL_GRN}"All toolchain build directories removed."${CL_RST}
+
+
.PHONY: clobber
-clobber: clean
+clobber: clean tcclean
# The rules for dataclean and installclean are defined in cleanbuild.mk.
diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk
index f5a27c0..0d8c888 100644
--- a/core/tasks/kernel.mk
+++ b/core/tasks/kernel.mk
@@ -217,16 +217,16 @@ KERNEL_TOOLCHAIN_PREFIX ?= $(TARGET_KERNEL_CROSS_COMPILE_PREFIX)
else ifeq ($(KERNEL_ARCH),arm64)
KERNEL_TOOLCHAIN_PREFIX ?= aarch64-linux-android-
else ifeq ($(KERNEL_ARCH),arm)
-KERNEL_TOOLCHAIN_PREFIX ?= arm-eabi-
+KERNEL_TOOLCHAIN_PREFIX ?= arm-none-eabi-
else ifeq ($(KERNEL_ARCH),x86)
KERNEL_TOOLCHAIN_PREFIX ?= x86_64-linux-android-
endif
ifeq ($(KERNEL_TOOLCHAIN),)
-KERNEL_TOOLCHAIN_PATH := $(KERNEL_TOOLCHAIN_PREFIX)
+KERNEL_TOOLCHAIN_PATH := arm-none-eabi-
else
ifneq ($(KERNEL_TOOLCHAIN_PREFIX),)
-KERNEL_TOOLCHAIN_PATH := $(KERNEL_TOOLCHAIN)/$(KERNEL_TOOLCHAIN_PREFIX)
+KERNEL_TOOLCHAIN_PATH := arm-none-eabi-
endif
endif
diff --git a/core/tasks/xloader.mk b/core/tasks/xloader.mk
new file mode 100644
index 0000000..296dbfe
--- /dev/null
+++ b/core/tasks/xloader.mk
@@ -0,0 +1,59 @@
+# Copyright (C) 2013-2014 Paul Kocialkowski <contact@paulk.fr>
+#
+# 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.
+
+XLOADER_SRC := $(TARGET_XLOADER_SOURCE)
+XLOADER_CONFIG := $(TARGET_XLOADER_CONFIG)
+XLOADER_OUT := $(TARGET_OUT_INTERMEDIATES)/XLOADER_OBJ
+
+ifeq ($(TARGET_XLOADER_MLO),true)
+XLOADER_BIN := $(XLOADER_OUT)/MLO
+else
+XLOADER_BIN := $(XLOADER_OUT)/x-load.bin
+endif
+
+ifeq ($(TARGET_ARCH),arm)
+ ifneq ($(USE_CCACHE),)
+ # search executable
+ ccache =
+ ifneq ($(strip $(wildcard $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_EXTRA_TAG)/ccache/ccache)),)
+ ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_EXTRA_TAG)/ccache/ccache
+ else
+ ifneq ($(strip $(wildcard $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache)),)
+ ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache
+ endif
+ endif
+ endif
+ ifneq ($(TARGET_KERNEL_CUSTOM_TOOLCHAIN),)
+ ifeq ($(HOST_OS),darwin)
+ ARM_CROSS_COMPILE:=CROSS_COMPILE="$(ccache) $(ANDROID_BUILD_TOP)/prebuilt/darwin-x86/toolchain/$(TARGET_KERNEL_CUSTOM_TOOLCHAIN)/bin/arm-eabi-"
+ else
+ ARM_CROSS_COMPILE:=CROSS_COMPILE="$(ccache) $(ANDROID_BUILD_TOP)/prebuilt/linux-x86/toolchain/$(TARGET_KERNEL_CUSTOM_TOOLCHAIN)/bin/arm-eabi-"
+ endif
+ else
+ ARM_CROSS_COMPILE:=CROSS_COMPILE="$(ccache) $(ARM_EABI_TOOLCHAIN)/arm-eabi-"
+ endif
+ ccache =
+endif
+
+$(XLOADER_OUT):
+ mkdir -p $(XLOADER_OUT)
+
+$(XLOADER_CONFIG):
+ $(MAKE) -C $(XLOADER_SRC) O=$(XLOADER_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) $(XLOADER_CONFIG)
+
+$(XLOADER_BIN): $(XLOADER_CONFIG)
+ $(MAKE) -C $(XLOADER_SRC) O=$(XLOADER_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) ift
+
+$(INSTALLED_XLOADER_MODULE): $(XLOADER_OUT) $(XLOADER_BIN)
+ mv $(XLOADER_BIN) $@
diff --git a/envsetup.sh b/envsetup.sh
index 6715419..f8ec4ed 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -88,7 +88,11 @@ function check_product()
CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
else
- CM_BUILD=
+ if (echo -n $1 | grep -q -e "^replicant_") ; then
+ CM_BUILD=$(echo -n $1 | sed -e 's/^replicant_//g')
+ else
+ CM_BUILD=
+ fi
fi
export CM_BUILD
@@ -166,7 +170,7 @@ function setpaths()
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
- arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
+ arm) export TARGET_TOOLS_PREFIX=toolchain/gcc/arm/arm-linux-androideabi/install/bin/arm-linux-androideabi-
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
@@ -189,19 +193,17 @@ function setpaths()
unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
- # Legacy toolchain configuration used for ARM kernel compilation
- toolchaindir=arm/arm-eabi-$targetlegacygccversion/bin
- if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
- export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
- ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
- fi
+ # use the toolchain that comes with the Linux Distribution
+ export ARM_EABI_TOOLCHAIN="arm-none-eabi-"
+ ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
+
;;
*)
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
;;
esac
- export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools:$T/external/selinux/prebuilts/bin
+ export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools
export ANDROID_BUILD_PATHS=$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_TOOLCHAIN:$ANDROID_TOOLCHAIN_2ND_ARCH:$ANDROID_KERNEL_TOOLCHAIN_PATH$ANDROID_DEV_SCRIPTS:
# If prebuilts/android-emulator/<system>/ exists, prepend it to our PATH
@@ -552,7 +554,7 @@ function breakfast()
CM_DEVICES_ONLY="true"
unset LUNCH_MENU_CHOICES
add_lunch_combo full-eng
- for f in `/bin/ls vendor/cm/vendorsetup.sh 2> /dev/null`
+ for f in `/bin/ls vendor/replicant/vendorsetup.sh 2> /dev/null`
do
echo "including $f"
. $f
@@ -622,17 +624,6 @@ function lunch()
check_product $product
if [ $? -ne 0 ]
then
- # if we can't find a product, try to grab it off the CM github
- T=$(gettop)
- pushd $T > /dev/null
- build/tools/roomservice.py $product
- popd > /dev/null
- check_product $product
- else
- build/tools/roomservice.py $product true
- fi
- if [ $? -ne 0 ]
- then
echo
echo "** Don't have a product spec for: '$product'"
echo "** Do you have the right repo manifest?"
@@ -2397,26 +2388,14 @@ function set_java_home() {
fi
if [ ! "$JAVA_HOME" ]; then
- if [ ! "$EXPERIMENTAL_USE_JAVA8" ]; then
- case `uname -s` in
- Darwin)
- export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
- ;;
- esac
- fi
- if [ ! "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ]; then
- case `uname -s` in
- Darwin)
- export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- ;;
- esac
- fi
+ case `uname -s` in
+ Darwin)
+ export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
+ ;;
+ *)
+ export JAVA_HOME=$(dirname $(dirname $(dirname $(readlink -f $(which java)))))
+ ;;
+ esac
# Keep track of the fact that we set JAVA_HOME ourselves, so that
# we can change it on the next envsetup.sh, if required.
@@ -2516,7 +2495,7 @@ unset f
# Add completions
check_bash_version && {
- dirs="sdk/bash_completion vendor/cm/bash_completion"
+ dirs="sdk/bash_completion vendor/replicant/bash_completion"
for dir in $dirs; do
if [ -d ${dir} ]; then
for f in `/bin/ls ${dir}/[a-z]*.bash 2> /dev/null`; do
diff --git a/libs/host/Android.mk b/libs/host/Android.mk
index cab878b..d32bdd5 100644
--- a/libs/host/Android.mk
+++ b/libs/host/Android.mk
@@ -27,3 +27,33 @@ include $(BUILD_HOST_STATIC_LIBRARY)
# Include toolchain prebuilt modules if they exist.
-include $(TARGET_TOOLCHAIN_ROOT)/toolchain.mk
+
+# prebuilt java libraries from host machines
+include $(CLEAR_VARS)
+
+LOCAL_PREBUILT_JAVA_LIBRARIES := \
+ asm-tools:asm$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ asm-4.0$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ guava-tools:guava$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ org-netbeans-api-visual$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ org-openide-util$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ org-openide-util-lookup$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ kxml2-2.3.0$(COMMON_JAVA_PACKAGE_SUFFIX) \
+ tools-common-prebuilt$(COMMON_JAVA_PACKAGE_SUFFIX)
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_PREBUILT)
+
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ddmlib-prebuilt
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := ddmlib-prebuilt.jar
+LOCAL_IS_HOST_MODULE := true
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_BUILT_MODULE_STEM := javalib.jar
+LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
+
+include $(BUILD_PREBUILT)
diff --git a/libs/host/asm-4.0.jar b/libs/host/asm-4.0.jar
new file mode 120000
index 0000000..fdaf0f5
--- /dev/null
+++ b/libs/host/asm-4.0.jar
@@ -0,0 +1 @@
+/usr/share/java/asm4.jar \ No newline at end of file
diff --git a/libs/host/asm.jar b/libs/host/asm.jar
new file mode 120000
index 0000000..fdaf0f5
--- /dev/null
+++ b/libs/host/asm.jar
@@ -0,0 +1 @@
+/usr/share/java/asm4.jar \ No newline at end of file
diff --git a/libs/host/ddmlib-prebuilt.jar b/libs/host/ddmlib-prebuilt.jar
new file mode 120000
index 0000000..5347180
--- /dev/null
+++ b/libs/host/ddmlib-prebuilt.jar
@@ -0,0 +1 @@
+/usr/share/java/androidsdk-ddmlib.jar \ No newline at end of file
diff --git a/libs/host/guava.jar b/libs/host/guava.jar
new file mode 120000
index 0000000..03632c4
--- /dev/null
+++ b/libs/host/guava.jar
@@ -0,0 +1 @@
+/usr/share/java/guava.jar \ No newline at end of file
diff --git a/libs/host/kxml2-2.3.0.jar b/libs/host/kxml2-2.3.0.jar
new file mode 120000
index 0000000..d7558d3
--- /dev/null
+++ b/libs/host/kxml2-2.3.0.jar
@@ -0,0 +1 @@
+/usr/share/java/kxml2-2.3.0.jar \ No newline at end of file
diff --git a/libs/host/org-netbeans-api-visual.jar b/libs/host/org-netbeans-api-visual.jar
new file mode 120000
index 0000000..42c71fd
--- /dev/null
+++ b/libs/host/org-netbeans-api-visual.jar
@@ -0,0 +1 @@
+/usr/share/netbeans/platform18/modules/org-netbeans-api-visual.jar \ No newline at end of file
diff --git a/libs/host/org-openide-util-lookup.jar b/libs/host/org-openide-util-lookup.jar
new file mode 120000
index 0000000..43f4766
--- /dev/null
+++ b/libs/host/org-openide-util-lookup.jar
@@ -0,0 +1 @@
+/usr/share/java/org-openide-util-lookup.jar \ No newline at end of file
diff --git a/libs/host/org-openide-util.jar b/libs/host/org-openide-util.jar
new file mode 120000
index 0000000..6bca032
--- /dev/null
+++ b/libs/host/org-openide-util.jar
@@ -0,0 +1 @@
+/usr/share/java/org-openide-util.jar \ No newline at end of file
diff --git a/libs/host/tools-common-prebuilt.jar b/libs/host/tools-common-prebuilt.jar
new file mode 120000
index 0000000..d073b5d
--- /dev/null
+++ b/libs/host/tools-common-prebuilt.jar
@@ -0,0 +1 @@
+/usr/share/java/androidsdk-common.jar \ No newline at end of file
diff --git a/target/product/base.mk b/target/product/base.mk
index a9610d1..7cc7900 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -122,7 +122,9 @@ PRODUCT_PACKAGES += \
tm \
vdc \
vold \
- wm
+ wm \
+ libGLES_android \
+ libGLES_mesa
PRODUCT_COPY_FILES := $(call add-to-product-copy-files-if-exists,\
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index 0f9935a..5cee873 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -20,8 +20,6 @@
PRODUCT_PACKAGES := \
Bluetooth \
BluetoothMidiService \
- Camera2 \
- Gallery2 \
Music \
MusicFX \
OneTimeInitializer \
@@ -29,6 +27,16 @@ PRODUCT_PACKAGES := \
SystemUI \
WallpaperCropper
+ifeq ($(USE_OPENGL_RENDERER),true)
+PRODUCT_PACKAGES += \
+ Gallery2 \
+ Camera2
+else
+PRODUCT_PACKAGES += \
+ Gallery \
+ LegacyCamera
+endif
+
PRODUCT_PACKAGES += \
clatd \
clatd.conf \
diff --git a/target/product/security/cm-devkey.x509.pem b/target/product/security/cm-devkey.x509.pem
deleted file mode 100644
index b7a6ae4..0000000
--- a/target/product/security/cm-devkey.x509.pem
+++ /dev/null
@@ -1,23 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID1TCCAr2gAwIBAgIJANO67t8hIti6MA0GCSqGSIb3DQEBBQUAMIGAMQswCQYD
-VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEX
-MBUGA1UECgwOQ3lhbm9nZW4sIEluYy4xGzAZBgNVBAsMElJlbGVhc2UgTWFuYWdl
-bWVudDEUMBIGA1UEAwwLRGV2ZWxvcG1lbnQwHhcNMTQwNDI4MjAyODM3WhcNNDEw
-OTEzMjAyODM3WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
-EDAOBgNVBAcMB1NlYXR0bGUxFzAVBgNVBAoMDkN5YW5vZ2VuLCBJbmMuMRswGQYD
-VQQLDBJSZWxlYXNlIE1hbmFnZW1lbnQxFDASBgNVBAMMC0RldmVsb3BtZW50MIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz/V9RvYnr18fraPWNeQEZNeg
-Kc0A3QskImQyGY22EGBZ63KUxa6zAfAug0OYSjofVJRaTtdvBXjO/C71XZRh4wun
-xhOUAJt8zIJ0lRx8GMC0GHzePEnEVvoiu3zSAPHCNf5lmdhyhccMOtC18J+evPf4
-EVBb3cis+F1m6ZoZKPgSFBR5A9CV5Tai8iiZluGGg15Wt12Rp2vmbmQxiOJZxBs4
-Ps40XR5gjO1q4R3HiGnFyql9qeecwaTUWXAd76lhNiLUr7K8IRs+96i+t5vSKajB
-M8O99BtYyBtf8ItMnHSZJxtsMw+TFXNLmMtaQarpsjp0LLGuHb/vsrjgBPvzsQID
-AQABo1AwTjAdBgNVHQ4EFgQUTpNgXBqV7j+33bi8B80YLQq6EL8wHwYDVR0jBBgw
-FoAUTpNgXBqV7j+33bi8B80YLQq6EL8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B
-AQUFAAOCAQEAVlVBNksK+1C3J8uQ9kVemYMozfbboV9c4PLbtVzNSO8vwZ3X5E4T
-2zfQPcFsfSMIa51a1tETBcDA6k+72xHZ+xEQJQNrX+o1F1RIIrXp0OKAz/k5cXyk
-OS0+nd0EXP/A1EW0m8N/X6E9wpRkIhfqtEsqeCf8GH7O9Ua2qHZ9zkTBpbAVH0oe
-ZWorHBdo3GdMJ5vcjFqnDdRs8F0BnZmjS+NrgXRLhLb6ZARS/bkUQyr5TX82dgG6
-vzvKsdKyX34gsKAsjxwLWo7XXgehFfjY+SGjjilJtardr+y/KlHNEw9s9aLe+Xny
-Qoa9j9Ut6/KwRaC6lSEQ7HZk6SdzFsdugA==
------END CERTIFICATE-----
diff --git a/target/product/security/cm.x509.pem b/target/product/security/cm.x509.pem
deleted file mode 100644
index 5ff19db..0000000
--- a/target/product/security/cm.x509.pem
+++ /dev/null
@@ -1,21 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDZDCCAkygAwIBAgIEUfbexjANBgkqhkiG9w0BAQUFADB0MQswCQYDVQQGEwJV
-UzELMAkGA1UECBMCV0ExEDAOBgNVBAcTB1NlYXR0bGUxFjAUBgNVBAoTDUN5YW5v
-Z2VuIEluYy4xFjAUBgNVBAsTDUN5YW5vZ2VuIEluYy4xFjAUBgNVBAMTDUN5YW5v
-Z2VuIEluYy4wHhcNMTMwNzI5MjEyOTQyWhcNNDAxMjE0MjEyOTQyWjB0MQswCQYD
-VQQGEwJVUzELMAkGA1UECBMCV0ExEDAOBgNVBAcTB1NlYXR0bGUxFjAUBgNVBAoT
-DUN5YW5vZ2VuIEluYy4xFjAUBgNVBAsTDUN5YW5vZ2VuIEluYy4xFjAUBgNVBAMT
-DUN5YW5vZ2VuIEluYy4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCP
-+K2NPqdZ6UmexXQ8tsc2TkLXYhiuEsifO66qlpwsTTw1522HcbKPVoPRr/JBXqOv
-E3K0HuZ/IsYYGsP/wJWWvpaWs+5xC+YkLkittK2uUzTqndpLFiDRAeICKpvDJI57
-Z0DkzVYXBPn+yw+x8ttjT/vWcJ3PEVYuew8MYPUOgKpdZlQtUBeoEBDSL8JPGViq
-e6jWOlSAWekhlgb+wb9RoXhu/v2HYzp89GG0sIrAgj7vZCior5XuFmm8eWhqUhTp
-TUBv/nNI/ORYt3G8IQyI2pJN1GNPAAv1uA5i4y/deX1x4GCWyN9feiD9fOj2oc3z
-Hwf5Frs9BjOb9XMXecbNAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAGudhFe9VnES
-fWynTYO4kWNlMC++yB6qD3pHW6HtBiaANj9wxrLCTFzf+boHNPeZ8HDkW01zAaQK
-fd9/fnGmHf4q/QvxrvGbnb3Fqhw+2hknbbMUoAa+Qp+2ouf9oJaNRquZ+rHEHX8g
-Rx8wGyvjaWYfQrwyZRgXj/Jrc/NXxQCmSJeexHVNXgQD6aOLHJYrJ+s+U/hwVNiM
-5L+psOh89itwt8DGGSLW16HjQKmPPbWbqxgnfRbOlxWrLDq3agcrskYpDP2aGGBA
-5STq/bvh9yZkrNYvMGzrXDhcJ44QRS8e1Jw/ZtfFvJD192e7KKVdy7CJWmOckCNK
-gl0KCQ3MBx4=
------END CERTIFICATE-----
diff --git a/tools/device/cm.mk.template b/tools/device/cm.mk.template
index e07898a..83f79dd 100644
--- a/tools/device/cm.mk.template
+++ b/tools/device/cm.mk.template
@@ -2,7 +2,7 @@
PRODUCT_RELEASE_NAME := __DEVICE__
# Inherit some common CM stuff.
-$(call inherit-product, vendor/cm/config/common_full_phone.mk)
+$(call inherit-product, vendor/replicant/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/__MANUFACTURER__/__DEVICE__/device___DEVICE__.mk)