summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Makefile21
-rw-r--r--core/android_manifest.mk4
-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/combo/TARGET_linux-arm.mk2
-rw-r--r--core/config.mk21
-rw-r--r--core/dumpvar.mk2
-rw-r--r--core/dynamic_binary.mk1
-rw-r--r--core/main.mk13
-rw-r--r--core/tasks/kernel.mk52
-rw-r--r--core/tasks/xloader.mk59
-rw-r--r--envsetup.sh67
-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/embedded.mk1
-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
-rw-r--r--tools/releasetools/edify_generator.py2
-rwxr-xr-xtools/releasetools/ota_from_target_files.py2
32 files changed, 256 insertions, 167 deletions
diff --git a/core/Makefile b/core/Makefile
index 5ea1b2a..683013f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -477,8 +477,16 @@ else
endif # TARGET_NO_BOOTLOADER
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
+ INSTALLED_RECOVERY_KERNEL_TARGET := $(PRODUCT_OUT)/kernel-recovery
else
INSTALLED_KERNEL_TARGET :=
+ INSTALLED_RECOVERY_KERNEL_TARGET :=
+endif
+
+ifeq ($(TARGET_XLOADER_MLO),true)
+INSTALLED_XLOADER_MODULE := $(PRODUCT_OUT)/MLO
+else
+INSTALLED_XLOADER_MODULE := $(PRODUCT_OUT)/x-load.bin
endif
# -----------------------------------------------------------------
@@ -695,7 +703,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 +956,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
@@ -1029,7 +1033,8 @@ $(recovery_ramdisk): $(MINIGZIP) \
$(hide) $(MINIGZIP) < $(recovery_uncompressed_ramdisk) > $@
ifndef BOARD_CUSTOM_BOOTIMG_MK
-$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) \
+$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) \
+ $(recovery_ramdisk) $(recovery_kernel) \
$(RECOVERYIMAGE_EXTRA_DEPS)
@echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
$(call build-recoveryimage-target, $@)
@@ -1945,7 +1950,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)/lineage-$(LINEAGE_VERSION).zip
+CM_TARGET_PACKAGE := $(PRODUCT_OUT)/$(REPLICANT_VERSION).zip
.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
@@ -2135,7 +2140,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/android_manifest.mk b/core/android_manifest.mk
index 582bad4..9b2de03 100644
--- a/core/android_manifest.mk
+++ b/core/android_manifest.mk
@@ -21,6 +21,10 @@ my_full_libs_manifest_deps += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/classes.jar)
my_full_libs_manifest_files += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/AndroidManifest.xml)
+spaces :=
+spaces +=
+spaces +=
+my_full_libs_manifest_files := $(subst $(spaces),:,$(my_full_libs_manifest_files))
LOCAL_RESOURCE_DIR += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/res)
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/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 5020865..79aace8 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -100,7 +100,7 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
-ffunction-sections \
-fdata-sections \
-funwind-tables \
- -fstack-protector \
+ -fstack-protector-strong \
-Wa,--noexecstack \
-Werror=format-security \
-D_FORTIFY_SOURCE=2 \
diff --git a/core/config.mk b/core/config.mk
index ab60701..1b62e94 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 := $(BUILD_OUT_EXECUTABLES)/relocation_packer$(BUILD_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:/usr/share/java/com.android.tools.sdk-common.jar com.android.manifmerger.Merger
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 f60e455..d7056ef 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 LINEAGE_VERSION=$(LINEAGE_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/dynamic_binary.mk b/core/dynamic_binary.mk
index a4224cd..7fb587b 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -72,6 +72,7 @@ endif
ifeq (true,$(my_pack_module_relocations))
# Pack relocations
+$(relocation_packer_output): $(RELOCATION_PACKER)
$(relocation_packer_output): $(relocation_packer_input) | $(ACP)
$(pack-elf-relocations)
else
diff --git a/core/main.mk b/core/main.mk
index b82cd6a..3eb2d47 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.
@@ -1002,8 +1004,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 de51b74..4f98fe2 100644
--- a/core/tasks/kernel.mk
+++ b/core/tasks/kernel.mk
@@ -62,13 +62,17 @@ TARGET_KERNEL_SOURCE ?= $(TARGET_AUTO_KDIR)
KERNEL_SRC := $(TARGET_KERNEL_SOURCE)
# kernel configuration - mandatory
KERNEL_DEFCONFIG := $(TARGET_KERNEL_CONFIG)
+KERNEL_RECOVERY_DEFCONFIG := $(TARGET_KERNEL_RECOVERY_CONFIG)
VARIANT_DEFCONFIG := $(TARGET_KERNEL_VARIANT_CONFIG)
SELINUX_DEFCONFIG := $(TARGET_KERNEL_SELINUX_CONFIG)
## Internal variables
KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
KERNEL_CONFIG := $(KERNEL_OUT)/.config
+KERNEL_RECOVERY_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_RECOVERY_OBJ
+KERNEL_RECOVERY_CONFIG := $(KERNEL_RECOVERY_OUT)/.config
KERNEL_OUT_STAMP := $(KERNEL_OUT)/.mkdir_stamp
+KERNEL_RECOVERY_OUT_STAMP := $(KERNEL_RECOVERY_OUT)/.mkdir_stamp
TARGET_KERNEL_ARCH := $(strip $(TARGET_KERNEL_ARCH))
ifeq ($(TARGET_KERNEL_ARCH),)
@@ -83,6 +87,7 @@ else
KERNEL_DEFCONFIG_ARCH := $(KERNEL_ARCH)
endif
KERNEL_DEFCONFIG_SRC := $(KERNEL_SRC)/arch/$(KERNEL_DEFCONFIG_ARCH)/configs/$(KERNEL_DEFCONFIG)
+KERNEL_RECOVERY_DEFCONFIG_SRC := $(KERNEL_SRC)/arch/$(KERNEL_DEFCONFIG_ARCH)/configs/$(KERNEL_RECOVERY_DEFCONFIG)
TARGET_KERNEL_HEADER_ARCH := $(strip $(TARGET_KERNEL_HEADER_ARCH))
ifeq ($(TARGET_KERNEL_HEADER_ARCH),)
@@ -112,6 +117,7 @@ else
endif
TARGET_PREBUILT_INT_KERNEL := $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(TARGET_PREBUILT_INT_KERNEL_TYPE)
+TARGET_PREBUILT_INT_KERNEL_RECOVERY := $(KERNEL_RECOVERY_OUT)/arch/$(KERNEL_ARCH)/boot/$(TARGET_PREBUILT_INT_KERNEL_TYPE)
# Clear this first to prevent accidental poisoning from env
MAKE_FLAGS :=
@@ -158,6 +164,7 @@ ifeq "$(wildcard $(KERNEL_SRC) )" ""
$(warning ***************************************************************)
FULL_KERNEL_BUILD := false
KERNEL_BIN := $(TARGET_PREBUILT_KERNEL)
+ KERNEL_RECOVERY_BIN := $(TARGET_PREBUILT_KERNEL)
else
$(warning ***************************************************************)
$(warning * *)
@@ -187,6 +194,10 @@ else
FULL_KERNEL_BUILD := true
KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL)
endif
+ ifneq ($(TARGET_KERNEL_RECOVERY_CONFIG),)
+ FULL_KERNEL_BUILD := true
+ KERNEL_RECOVERY_BIN := $(TARGET_PREBUILT_INT_KERNEL_RECOVERY)
+ endif
endif
ifeq ($(FULL_KERNEL_BUILD),true)
@@ -208,16 +219,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
@@ -261,6 +272,13 @@ $(KERNEL_OUT_STAMP):
$(hide) mkdir -p $(KERNEL_MODULES_OUT)
$(hide) touch $@
+$(KERNEL_RECOVERY_OUT_STAMP):
+ $(hide) mkdir -p $(KERNEL_RECOVERY_OUT)
+ $(hide) touch $@
+
+$(KERNEL_RECOVERY_OUT):
+ mkdir -p $(KERNEL_RECOVERY_OUT)
+
KERNEL_ADDITIONAL_CONFIG_OUT := $(KERNEL_OUT)/.additional_config
.PHONY: force_additional_config
@@ -279,7 +297,11 @@ $(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) $(KERNEL_ADDITIONA
$(KERNEL_SRC)/scripts/kconfig/merge_config.sh -m -O $(KERNEL_OUT) $(KERNEL_OUT)/.config $(KERNEL_SRC)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_ADDITIONAL_CONFIG); \
$(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) KCONFIG_ALLCONFIG=$(KERNEL_OUT)/.config alldefconfig; fi
-TARGET_KERNEL_BINARIES: $(KERNEL_OUT_STAMP) $(KERNEL_CONFIG) $(KERNEL_HEADERS_INSTALL_STAMP)
+$(KERNEL_RECOVERY_CONFIG): $(KERNEL_RECOVERY_OUT_STAMP) $(KERNEL_RECOVERY_DEFCONFIG_SRC) $(KERNEL_ADDITIONAL_CONFIG_OUT)
+ @echo -e ${CL_GRN}"Building Recovery Kernel Config"${CL_RST}
+ $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_RECOVERY_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_RECOVERY_DEFCONFIG)
+
+TARGET_KERNEL_BINARIES: $(BUILT_RAMDISK_TARGET) $(KERNEL_OUT_STAMP) $(KERNEL_CONFIG) $(KERNEL_HEADERS_INSTALL_STAMP)
@echo -e ${CL_GRN}"Building Kernel"${CL_RST}
$(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(TARGET_PREBUILT_INT_KERNEL_TYPE)
$(hide) if grep -q 'CONFIG_OF=y' $(KERNEL_CONFIG) ; \
@@ -307,6 +329,9 @@ $(TARGET_PREBUILT_INT_KERNEL): $(TARGET_KERNEL_MODULES)
$(mv-modules)
$(clean-module-folder)
+$(TARGET_PREBUILT_INT_KERNEL_RECOVERY): $(recovery_ramdisk) $(KERNEL_RECOVERY_OUT) $(KERNEL_RECOVERY_CONFIG) $(KERNEL_DEPS)
+ $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_RECOVERY_OUT) ARCH=$(TARGET_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_LOADADDR) $(TARGET_PREBUILT_INT_KERNEL_TYPE)
+
$(KERNEL_HEADERS_INSTALL_STAMP): $(KERNEL_OUT_STAMP) $(KERNEL_CONFIG)
@echo -e ${CL_GRN}"Building Kernel Headers"${CL_RST}
$(hide) if [ ! -z "$(KERNEL_HEADER_DEFCONFIG)" ]; then \
@@ -352,13 +377,26 @@ endif # FULL_KERNEL_BUILD
## Install it
ifeq ($(NEEDS_KERNEL_COPY),true)
-file := $(INSTALLED_KERNEL_TARGET)
-ALL_PREBUILT += $(file)
-$(file) : $(KERNEL_BIN) | $(ACP)
+installed_kernel := $(INSTALLED_KERNEL_TARGET)
+ALL_PREBUILT += $(installed_kernel)
+$(installed_kernel) : $(KERNEL_BIN) | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
+
+installed_recovery_kernel := $(INSTALLED_RECOVERY_KERNEL_TARGET)
+ALL_PREBUILT += $(installed_recovery_kernel)
+$(installed_recovery_kernel) : $(KERNEL_RECOVERY_BIN) | $(ACP)
+ $(transform-prebuilt-to-target)
+
+ALL_PREBUILT += $(INSTALLED_RECOVERY_KERNEL_TARGET)
endif
+ifneq ($(TARGET_KERNEL_RECOVERY_CONFIG),)
+.PHONY: kernel recovery_kernel
+else
.PHONY: kernel
+endif
+
kernel: $(INSTALLED_KERNEL_TARGET)
+recovery_kernel: $(INSTALLED_RECOVERY_KERNEL_TARGET)
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 8030ce4..0a05f34 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -88,12 +88,10 @@ function check_product()
CM_BUILD=$(echo -n $1 | sed -e 's/^lineage_//g')
export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
else
- # Fall back to cm_<product>
- if (echo -n $1 | grep -q -e "^cm_") ; then
- 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)
+ if (echo -n $1 | grep -q -e "^replicant_") ; then
+ CM_BUILD=$(echo -n $1 | sed -e 's/^replicant_//g')
else
- CM_BUILD=
+ CM_BUILD=
fi
fi
export CM_BUILD
@@ -172,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
@@ -195,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
@@ -558,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
@@ -633,17 +629,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?"
@@ -2408,26 +2393,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.
@@ -2527,7 +2500,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
@@ -2539,3 +2512,5 @@ check_bash_version && {
}
export ANDROID_BUILD_TOP=$(gettop)
+
+export WITH_SU=true
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/embedded.mk b/target/product/embedded.mk
index 25a8975..002f46b 100644
--- a/target/product/embedded.mk
+++ b/target/product/embedded.mk
@@ -30,6 +30,7 @@ PRODUCT_PACKAGES += \
grep \
gzip \
healthd \
+ heimdall \
init \
init.environ.rc \
init.rc \
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)
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index ca06c8a..8ecc551 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -151,7 +151,7 @@ class EdifyGenerator(object):
self.script.append(('run_program("/tmp/install/bin/backuptool.sh", "%s");' % command))
def ValidateSignatures(self, command):
- self.script.append('package_extract_file("META-INF/org/lineageos/releasekey", "/tmp/releasekey");')
+ self.script.append('package_extract_file("META-INF/org/replicant/releasekey", "/tmp/releasekey");')
# Exit code 124 == abort. run_program returns raw, so left-shift 8bit
self.script.append('run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can\'t install this package on top of incompatible data. Please try another package or run a factory reset");')
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 682d1a9..21d5ed2 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -758,7 +758,7 @@ endif;
common.ZipWriteStr(output_zip, "system/build.prop",
""+input_zip.read("SYSTEM/build.prop"))
- common.ZipWriteStr(output_zip, "META-INF/org/lineageos/releasekey",
+ common.ZipWriteStr(output_zip, "META-INF/org/replicant/releasekey",
""+input_zip.read("META/releasekey.txt"))
def WritePolicyConfig(file_name, output_zip):