Allow to build the update.zip for emulator build.
img_from_target_files.py just skips the boot.img and recovery.img since there is no kernel or recovery.fstab for emulator. Bug: 15383279 Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
This commit is contained in:
@@ -1306,6 +1306,11 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
|||||||
.PHONY: otapackage
|
.PHONY: otapackage
|
||||||
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
|
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
|
||||||
|
|
||||||
|
endif # recovery_fstab is defined
|
||||||
|
endif # TARGET_NO_KERNEL != true
|
||||||
|
endif # TARGET_DEVICE != generic*
|
||||||
|
endif # TARGET_PRODUCT != sdk
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# The update package
|
# The update package
|
||||||
|
|
||||||
@@ -1334,10 +1339,6 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
|||||||
.PHONY: updatepackage
|
.PHONY: updatepackage
|
||||||
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
|
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
|
||||||
|
|
||||||
endif # recovery_fstab is defined
|
|
||||||
endif # TARGET_NO_KERNEL != true
|
|
||||||
endif # TARGET_DEVICE != generic*
|
|
||||||
endif # TARGET_PRODUCT != sdk
|
|
||||||
|
|
||||||
ifdef is_tests_build
|
ifdef is_tests_build
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
@@ -482,6 +482,8 @@ def CheckSize(data, target, info_dict):
|
|||||||
if target.endswith(".img"): target = target[:-4]
|
if target.endswith(".img"): target = target[:-4]
|
||||||
mount_point = "/" + target
|
mount_point = "/" + target
|
||||||
|
|
||||||
|
fs_type = None
|
||||||
|
limit = None
|
||||||
if info_dict["fstab"]:
|
if info_dict["fstab"]:
|
||||||
if mount_point == "/userdata": mount_point = "/data"
|
if mount_point == "/userdata": mount_point = "/data"
|
||||||
p = info_dict["fstab"][mount_point]
|
p = info_dict["fstab"][mount_point]
|
||||||
|
@@ -239,11 +239,14 @@ def main(argv):
|
|||||||
|
|
||||||
output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
|
output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
common.GetBootableImage(
|
boot_image = common.GetBootableImage(
|
||||||
"boot.img", "boot.img", OPTIONS.input_tmp, "BOOT").AddToZip(output_zip)
|
"boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
|
||||||
common.GetBootableImage(
|
if boot_image:
|
||||||
"recovery.img", "recovery.img", OPTIONS.input_tmp,
|
boot_image.AddToZip(output_zip)
|
||||||
"RECOVERY").AddToZip(output_zip)
|
recovery_image = common.GetBootableImage(
|
||||||
|
"recovery.img", "recovery.img", OPTIONS.input_tmp, "RECOVERY")
|
||||||
|
if recovery_image:
|
||||||
|
recovery_image.AddToZip(output_zip)
|
||||||
|
|
||||||
if not bootable_only:
|
if not bootable_only:
|
||||||
AddSystem(output_zip)
|
AddSystem(output_zip)
|
||||||
|
Reference in New Issue
Block a user