From 64bc8af31f5faf7b8a81131ad3eeaae08e5bafff Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Thu, 7 Aug 2014 12:45:15 -0700 Subject: [PATCH] galaxys2: Handle boot.img properly in ota script The OTA script may be run during a signing process and will not have OUT variables defined. Use the common methods for getting the boot.img to match standards. Change-Id: I4eebf58ec828f18f62176a2862e5fdbb839cb658 --- releasetools/galaxys2_ota_from_target_files | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/releasetools/galaxys2_ota_from_target_files b/releasetools/galaxys2_ota_from_target_files index 268cb11..c581b32 100755 --- a/releasetools/galaxys2_ota_from_target_files +++ b/releasetools/galaxys2_ota_from_target_files @@ -20,8 +20,6 @@ import galaxys2_common as common LOCAL_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) RELEASETOOLS_DIR = os.path.abspath(os.path.join(LOCAL_DIR, '../../../build/tools/releasetools')) -TARGET_DIR = os.getenv('OUT') - # Add releasetools directory to python path sys.path.append(RELEASETOOLS_DIR) @@ -36,7 +34,10 @@ import galaxys2_edify_generator as edify_generator __doc__ = ota_from_target_files.__doc__ def CopyBootFiles(input_zip, output_zip): - output_zip.write(os.path.join(TARGET_DIR, "boot.img"),"boot.img") + boot_img = common.GetBootableImage("boot.img", "boot.img", + OPTIONS.input_tmp, "BOOT") + common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict) + common.ZipWriteStr(output_zip, "boot.img", boot_img.data) def WriteFullOTAPackage(input_zip, output_zip): # TODO: how to determine this? We don't know what version it will