summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Makefile2
-rw-r--r--tools/releasetools/common.py8
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)