From f174f8d9b2c99b1f7c70f76dfdd9cde6222e45a8 Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Tue, 10 Mar 2015 18:58:23 -0700 Subject: [PATCH] build: Update install tools packaging for target-files support Modifies "build: ota: Support for install tools in /tmp/install" to support signing steps being split from build steps. Package install files into target-files INSTALL path Read from target-files for OTA package creation Change-Id: I64f919c2a757b5474f6cc5f82bd6c33c2a8b558a --- core/Makefile | 2 ++ tools/releasetools/ota_from_target_files.py | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/Makefile b/core/Makefile index 9da96951d..f2c716d7b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1773,6 +1773,8 @@ ifneq (,$(INSTALLED_RECOVERYIMAGE_TARGET)$(filter true,$(BOARD_USES_RECOVERY_AS_ $(hide) mkdir -p $(zip_root)/$(PRIVATE_RECOVERY_OUT) $(hide) $(call package_files-copy-root, \ $(TARGET_RECOVERY_ROOT_OUT),$(zip_root)/$(PRIVATE_RECOVERY_OUT)/RAMDISK) + @# OTA install helpers + $(hide) $(call package_files-copy-root, $(OUT)/install, $(zip_root)/INSTALL) ifdef INSTALLED_KERNEL_TARGET $(hide) $(ACP) $(INSTALLED_KERNEL_TARGET) $(zip_root)/$(PRIVATE_RECOVERY_OUT)/kernel endif diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index ca2a02fc1..e084755d0 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -540,13 +540,12 @@ def GetImage(which, tmpdir, info_dict): def CopyInstallTools(output_zip): - oldcwd = os.getcwd() - os.chdir(os.getenv('OUT')) - for root, subdirs, files in os.walk("install"): - for f in files: - p = os.path.join(root, f) - output_zip.write(p, p) - os.chdir(oldcwd) + install_path = os.path.join(OPTIONS.input_tmp, "INSTALL") + for root, subdirs, files in os.walk(install_path): + for f in files: + install_source = os.path.join(root, f) + install_target = os.path.join("install", os.path.relpath(root, install_path), f) + output_zip.write(install_source, install_target) def WriteFullOTAPackage(input_zip, output_zip): -- 2.11.0