Fix emulator builds
which don't have boot.img. Change-Id: Id97a53c5356d435d9c70107ef047bed003769e22
This commit is contained in:
parent
9cee77b370
commit
d89ffa8623
|
@ -354,9 +354,12 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir,
|
|||
else:
|
||||
print "building image from target_files %s..." % (tree_subdir,)
|
||||
fs_config = "META/" + tree_subdir.lower() + "_filesystem_config.txt"
|
||||
return File(name, BuildBootableImage(os.path.join(unpack_dir, tree_subdir),
|
||||
os.path.join(unpack_dir, fs_config),
|
||||
info_dict))
|
||||
data = BuildBootableImage(os.path.join(unpack_dir, tree_subdir),
|
||||
os.path.join(unpack_dir, fs_config),
|
||||
info_dict))
|
||||
if data:
|
||||
return File(name, data)
|
||||
return None
|
||||
|
||||
|
||||
def UnzipTemp(filename, pattern=None):
|
||||
|
|
|
@ -39,6 +39,9 @@ def main(argv):
|
|||
boot_img = common.GetBootableImage("boot.img", "boot.img",
|
||||
input_dir, "BOOT")
|
||||
|
||||
if not recovery_img or not boot_img:
|
||||
sys.exit(0)
|
||||
|
||||
def output_sink(fn, data):
|
||||
with open(os.path.join(output_dir, "SYSTEM", *fn.split("/")), "wb") as f:
|
||||
f.write(data)
|
||||
|
|
Loading…
Reference in New Issue