diff options
author | Chirayu Desai <cdesai@cyanogenmod.org> | 2013-05-03 14:54:48 +0530 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-07-23 17:35:40 +0000 |
commit | ff41d07cb201bea2ba2d29581ef2dd9fffbdc62f (patch) | |
tree | 86eef846c8b713e89e8de9a6842811591336ed7a | |
parent | d496200ad4fef365af317a212bf1cf759ae00ae3 (diff) | |
download | build-ff41d07cb201bea2ba2d29581ef2dd9fffbdc62f.zip build-ff41d07cb201bea2ba2d29581ef2dd9fffbdc62f.tar.gz build-ff41d07cb201bea2ba2d29581ef2dd9fffbdc62f.tar.bz2 |
releasetools: use prebuilt boot image if using a custom boot image makefile
Change-Id: Ic348d31e8df7933dc4f9f055b7a5a2beacc21d32
-rw-r--r-- | core/Makefile | 2 | ||||
-rw-r--r-- | tools/releasetools/common.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/Makefile b/core/Makefile index ae64e28..b65a857 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1330,6 +1330,7 @@ endif $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo -e ${CL_YLW}"Package OTA:"${CL_RST}" $@" + MKBOOTIMG=$(BOARD_CUSTOM_BOOTIMG_MK) \ $(OTA_FROM_TARGET_SCRIPT) -v \ -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ @@ -1375,6 +1376,7 @@ endif $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo -e ${CL_YLW}"Package:"${CL_RST}" $@" + MKBOOTIMG=$(BOARD_CUSTOM_BOOTIMG_MK) \ $(IMG_FROM_TARGET_SCRIPT) -v \ -s $(extensions) \ -p $(HOST_OUT) \ diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index b56a16e..ab874f1 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -297,7 +297,13 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir, 'prebuilt_name', otherwise construct it from the source files in 'unpack_dir'/'tree_subdir'.""" - prebuilt_path = os.path.join(unpack_dir, "BOOTABLE_IMAGES", prebuilt_name) + prebuilt_dir = os.path.join(unpack_dir, "BOOTABLE_IMAGES") + prebuilt_path = os.path.join(prebuilt_dir, prebuilt_name) + custom_bootimg_mk = os.getenv('MKBOOTIMG') + if custom_bootimg_mk: + bootimage_path = os.path.join(os.getenv('OUT'), "boot.img") + os.mkdir(prebuilt_dir) + shutil.copyfile(bootimage_path, prebuilt_path) if os.path.exists(prebuilt_path): print "using prebuilt %s..." % (prebuilt_name,) return File.FromLocalFile(name, prebuilt_path) |