3
0
Fork 0

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
This commit is contained in:
Brint E. Kriebel 2014-08-07 12:45:15 -07:00
parent 30b0932968
commit 64bc8af31f
1 changed files with 4 additions and 3 deletions

View File

@ -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