OSDN Git Service

build: Update install tools packaging for target-files support
authorBrint E. Kriebel <bekit@cyngn.com>
Wed, 11 Mar 2015 01:58:23 +0000 (18:58 -0700)
committerSteve Kondik <steve@cyngn.com>
Sun, 4 Sep 2016 04:47:36 +0000 (21:47 -0700)
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
tools/releasetools/ota_from_target_files.py

index 9da9695..f2c716d 100644 (file)
@@ -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
index ca2a02f..e084755 100755 (executable)
@@ -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):