diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-02-03 12:26:05 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-02-03 12:26:05 +0100 |
commit | 7fcb81ad1892e123e3b2c67abea966f370112c83 (patch) | |
tree | af3a7eae2c62a82d2a6c7c2f329be343fc335952 | |
parent | d1b082df91cb842e314cfb66dda53dc698d4c78c (diff) | |
parent | 705e90f0903eed0fa2ea92e80b8a5f3f09630cb0 (diff) | |
download | build-7fcb81ad1892e123e3b2c67abea966f370112c83.zip build-7fcb81ad1892e123e3b2c67abea966f370112c83.tar.gz build-7fcb81ad1892e123e3b2c67abea966f370112c83.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_build into replicant-6.0
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r-- | core/Makefile | 4 | ||||
-rw-r--r-- | core/binary.mk | 16 | ||||
-rw-r--r-- | core/build_id.mk | 2 | ||||
-rw-r--r-- | core/clear_vars.mk | 2 | ||||
-rw-r--r-- | core/tasks/kernel.mk | 15 | ||||
-rw-r--r-- | core/version_defaults.mk | 2 | ||||
-rw-r--r-- | tools/releasetools/common.py | 18 | ||||
-rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 4 | ||||
-rwxr-xr-x | tools/roomservice.py | 23 | ||||
-rw-r--r-- | tools/signapk/SignApk.java | 21 |
10 files changed, 78 insertions, 29 deletions
diff --git a/core/Makefile b/core/Makefile index 18ce528..754bb4f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1707,7 +1707,7 @@ ifdef BOARD_RAMDISK_OFFSET $(hide) echo "$(BOARD_RAMDISK_OFFSET)" > $(zip_root)/RECOVERY/ramdisk_offset endif ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) - $(hide) echo "$(INSTALLED_DTIMAGE_TARGET)" > $(zip_root)/RECOVERY/dt_args + $(hide) $(ACP) $(INSTALLED_DTIMAGE_TARGET) $(zip_root)/RECOVERY/dt endif @# Components of the boot image $(hide) mkdir -p $(zip_root)/BOOT @@ -1740,7 +1740,7 @@ ifdef BOARD_RAMDISK_OFFSET $(hide) echo "$(BOARD_RAMDISK_OFFSET)" > $(zip_root)/BOOT/ramdisk_offset endif ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) - $(hide) echo "$(INSTALLED_DTIMAGE_TARGET)" > $(zip_root)/BOOT/dt_args + $(hide) $(ACP) $(INSTALLED_DTIMAGE_TARGET) $(zip_root)/BOOT/dt endif ifdef ZIP_SAVE_UBOOTIMG_ARGS $(hide) echo "$(ZIP_SAVE_UBOOTIMG_ARGS)" > $(zip_root)/BOOT/ubootargs diff --git a/core/binary.mk b/core/binary.mk index 4206597..88905d9 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -538,17 +538,33 @@ proto_generated_headers := $(patsubst %.pb$(my_proto_source_suffix),%.pb.h, $(pr proto_generated_objects := $(addprefix $(proto_generated_obj_dir)/, \ $(patsubst %.proto,%.pb.o,$(proto_sources_fullpath))) +define copy-proto-files +$(if $(PRIVATE_PROTOC_OUTPUT), \ + $(if $(call streq,$(PRIVATE_PROTOC_INPUT),$(PRIVATE_PROTOC_OUTPUT)),, \ + $(eval proto_generated_path := $(dir $(subst $(PRIVATE_PROTOC_INPUT),$(PRIVATE_PROTOC_OUTPUT),$@))) + @mkdir -p $(dir $(proto_generated_path)) + @echo "Protobuf relocation: $@ => $(proto_generated_path)" + @cp -f $@ $(proto_generated_path) ),) +endef + + # Ensure the transform-proto-to-cc rule is only defined once in multilib build. ifndef $(my_prefix)_$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_proto_defined $(proto_generated_sources): PRIVATE_PROTO_INCLUDES := $(TOP) $(proto_generated_sources): PRIVATE_PROTOC_FLAGS := $(LOCAL_PROTOC_FLAGS) $(my_protoc_flags) +$(proto_generated_sources): PRIVATE_PROTOC_OUTPUT := $(LOCAL_PROTOC_OUTPUT) +$(proto_generated_sources): PRIVATE_PROTOC_INPUT := $(LOCAL_PATH) $(proto_generated_sources): $(proto_generated_sources_dir)/%.pb$(my_proto_source_suffix): %.proto $(PROTOC) $(transform-proto-to-cc) + $(copy-proto-files) # This is just a dummy rule to make sure gmake doesn't skip updating the dependents. +$(proto_generated_headers): PRIVATE_PROTOC_OUTPUT := $(LOCAL_PROTOC_OUTPUT) +$(proto_generated_headers): PRIVATE_PROTOC_INPUT := $(LOCAL_PATH) $(proto_generated_headers): $(proto_generated_sources_dir)/%.pb.h: $(proto_generated_sources_dir)/%.pb$(my_proto_source_suffix) @echo "Updated header file $@." $(hide) touch $@ + $(copy-proto-files) $(my_prefix)_$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_proto_defined := true endif # transform-proto-to-cc rule included only once diff --git a/core/build_id.mk b/core/build_id.mk index 16709e3..f55b184 100644 --- a/core/build_id.mk +++ b/core/build_id.mk @@ -18,4 +18,4 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention. -export BUILD_ID=MMB29T +export BUILD_ID=MMB29U diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 794e1a9..5c53c9f 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -293,6 +293,8 @@ LOCAL_MODULE_STEM_64:= LOCAL_CLANG_32:= LOCAL_CLANG_64:= +LOCAL_PROTOC_OUTPUT:= + # Include any vendor specific clear_vars.mk file -include $(TOPDIR)vendor/*/build/core/clear_vars.mk diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk index b45a7d8..a3fa8a4 100644 --- a/core/tasks/kernel.mk +++ b/core/tasks/kernel.mk @@ -86,6 +86,13 @@ endif ifneq ($(TARGET_KERNEL_ADDITIONAL_CONFIG),) KERNEL_ADDITIONAL_CONFIG := $(TARGET_KERNEL_ADDITIONAL_CONFIG) +KERNEL_ADDITIONAL_CONFIG_SRC := $(KERNEL_SRC)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_ADDITIONAL_CONFIG) + ifeq ("$(wildcard $(KERNEL_ADDITIONAL_CONFIG_SRC))","") + $(warning TARGET_KERNEL_ADDITIONAL_CONFIG '$(TARGET_KERNEL_ADDITIONAL_CONFIG)' doesn't exist) + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null + endif +else + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null endif ## Do be discontinued in a future version. Notify builder about target @@ -228,7 +235,13 @@ $(KERNEL_OUT_STAMP): $(hide) mkdir -p $(KERNEL_MODULES_OUT) $(hide) touch $@ -$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) +KERNEL_ADDITIONAL_CONFIG_OUT := $(KERNEL_OUT)/.additional_config + +.PHONY: force_additional_config +$(KERNEL_ADDITIONAL_CONFIG_OUT): force_additional_config + $(hide) cmp -s $(KERNEL_ADDITIONAL_CONFIG_SRC) $@ || cp $(KERNEL_ADDITIONAL_CONFIG_SRC) $@; + +$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) $(KERNEL_ADDITIONAL_CONFIG_OUT) $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG) $(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \ echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \ diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 2939224..bf9b2e8 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -103,7 +103,7 @@ ifeq "" "$(PLATFORM_SECURITY_PATCH)" # Can be an arbitrary string, but must be a single word. # # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2016-01-01 + PLATFORM_SECURITY_PATCH := 2016-02-01 endif ifeq "" "$(PLATFORM_BASE_OS)" diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index de2660a..4f8db79 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -268,9 +268,10 @@ def LoadRecoveryFSTab(read_helper, fstab_version, type): else: print("%s: unknown option \"%s\"" % (mount_point, i)) - d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[1], - device=pieces[2], length=length, - device2=device2) + if not d.get(mount_point): + d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[1], + device=pieces[2], length=length, + device2=device2) elif fstab_version == 2: d = {} @@ -306,9 +307,10 @@ def LoadRecoveryFSTab(read_helper, fstab_version, type): context = i mount_point = pieces[1] - d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], - device=pieces[0], length=length, - device2=None, context=context) + if not d.get(mount_point): + d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], + device=pieces[0], length=length, + device2=None, context=context) else: raise ValueError("Unknown fstab_version: \"%d\"" % (fstab_version,)) @@ -395,10 +397,10 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None): cmd.append("--ramdisk_offset") cmd.append(open(fn).read().rstrip("\n")) - fn = os.path.join(sourcedir, "dt_args") + fn = os.path.join(sourcedir, "dt") if os.access(fn, os.F_OK): cmd.append("--dt") - cmd.append(open(fn).read().rstrip("\n")) + cmd.append(fn) fn = os.path.join(sourcedir, "pagesize") if os.access(fn, os.F_OK): diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index bd34dc9..ff0ccb9 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -824,7 +824,9 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip): source_zip=source_zip, source_version=source_version, target_zip=target_zip, + input_zip=target_zip, target_version=target_version, + input_version=target_version, output_zip=output_zip, script=script, metadata=metadata, @@ -1229,7 +1231,9 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip): source_zip=source_zip, source_version=source_version, target_zip=target_zip, + input_zip=target_zip, target_version=target_version, + input_version=target_version, output_zip=output_zip, script=script, metadata=metadata, diff --git a/tools/roomservice.py b/tools/roomservice.py index ee8e5d8..a1b69cd 100755 --- a/tools/roomservice.py +++ b/tools/roomservice.py @@ -87,9 +87,9 @@ if not depsonly: local_manifests = r'.repo/local_manifests' if not os.path.exists(local_manifests): os.makedirs(local_manifests) -def exists_in_tree(lm, repository): +def exists_in_tree(lm, path): for child in lm.getchildren(): - if child.attrib['name'].endswith(repository): + if child.attrib['path'] == path: return True return False @@ -139,7 +139,7 @@ def get_from_manifest(devicename): return None -def is_in_manifest(projectname): +def is_in_manifest(projectpath): try: lm = ElementTree.parse(".repo/local_manifests/roomservice.xml") lm = lm.getroot() @@ -147,8 +147,8 @@ def is_in_manifest(projectname): lm = ElementTree.Element("manifest") for localpath in lm.findall("project"): - if localpath.get("name") == projectname: - return 1 + if localpath.get("path") == projectpath: + return True ## Search in main manifest, too try: @@ -158,10 +158,10 @@ def is_in_manifest(projectname): lm = ElementTree.Element("manifest") for localpath in lm.findall("project"): - if localpath.get("name") == projectname: - return 1 + if localpath.get("path") == projectpath: + return True - return None + return False def add_to_manifest(repositories, fallback_branch = None): try: @@ -173,8 +173,9 @@ def add_to_manifest(repositories, fallback_branch = None): for repository in repositories: repo_name = repository['repository'] repo_target = repository['target_path'] - if exists_in_tree(lm, repo_name): - print('CyanogenMod/%s already exists' % (repo_name)) + print('Checking if %s is fetched from %s' % (repo_target, repo_name)) + if is_in_manifest(repo_target): + print('CyanogenMod/%s already fetched to %s' % (repo_name, repo_target)) continue print('Adding dependency: CyanogenMod/%s -> %s' % (repo_name, repo_target)) @@ -210,7 +211,7 @@ def fetch_dependencies(repo_path, fallback_branch = None): fetch_list = [] for dependency in dependencies: - if not is_in_manifest("CyanogenMod/%s" % dependency['repository']): + if not is_in_manifest(dependency['target_path']): fetch_list.append(dependency) syncable_repos.append(dependency['target_path']) diff --git a/tools/signapk/SignApk.java b/tools/signapk/SignApk.java index 88f486a..3ddab11 100644 --- a/tools/signapk/SignApk.java +++ b/tools/signapk/SignApk.java @@ -167,18 +167,29 @@ class SignApk { } /** - * Reads the password from console and returns it as a string. + * If a console doesn't exist, reads the password from stdin + * If a console exists, reads the password from console and returns it as a string. * * @param keyFile The file containing the private key. Used to prompt the user. */ private static String readPassword(File keyFile) { Console console; char[] pwd; - if((console = System.console()) != null && - (pwd = console.readPassword("[%s]", "Enter password for " + keyFile)) != null){ - return String.valueOf(pwd); + if ((console = System.console()) == null) { + System.out.print("Enter password for " + keyFile + " (password will not be hidden): "); + System.out.flush(); + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try { + return stdin.readLine(); + } catch (IOException ex) { + return null; + } } else { - return null; + if ((pwd = console.readPassword("[%s]", "Enter password for " + keyFile)) != null) { + return String.valueOf(pwd); + } else { + return null; + } } } |