diff options
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 8 |
1 files changed, 7 insertions, 1 deletions
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) |