diff --git a/core/Makefile b/core/Makefile index f7363a151e..1d5f661d14 100644 --- a/core/Makefile +++ b/core/Makefile @@ -6001,6 +6001,8 @@ $(BUILT_TARGET_FILES_DIR): \ $(INSTALLED_RAMDISK_TARGET) \ $(INSTALLED_DTBIMAGE_TARGET) \ $(INSTALLED_2NDBOOTLOADER_TARGET) \ + $(BUILT_RAMDISK_16K_TARGET) \ + $(BUILT_KERNEL_16K_TARGET) \ $(BOARD_PREBUILT_DTBOIMAGE) \ $(BOARD_PREBUILT_RECOVERY_DTBOIMAGE) \ $(BOARD_RECOVERY_ACPIO) \ @@ -6344,6 +6346,14 @@ ifdef BOARD_PREBUILT_DTBOIMAGE $(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES $(hide) cp $(INSTALLED_DTBOIMAGE_TARGET) $(zip_root)/PREBUILT_IMAGES/ endif # BOARD_PREBUILT_DTBOIMAGE +ifdef BUILT_KERNEL_16K_TARGET + $(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES + $(hide) cp $(BUILT_KERNEL_16K_TARGET) $(zip_root)/PREBUILT_IMAGES/ +endif # BUILT_KERNEL_16K_TARGET +ifdef BUILT_RAMDISK_16K_TARGET + $(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES + $(hide) cp $(BUILT_RAMDISK_16K_TARGET) $(zip_root)/PREBUILT_IMAGES/ +endif # BUILT_RAMDISK_16K_TARGET ifeq ($(BOARD_USES_PVMFWIMAGE),true) $(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES $(hide) cp $(INSTALLED_PVMFWIMAGE_TARGET) $(zip_root)/PREBUILT_IMAGES/ diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py index 7c27ef7f08..17f4cc5a50 100755 --- a/tools/releasetools/img_from_target_files.py +++ b/tools/releasetools/img_from_target_files.py @@ -122,10 +122,14 @@ def EntriesForUserImages(input_file): ] with zipfile.ZipFile(input_file) as input_zip: namelist = input_zip.namelist() + if 'PREBUILT_IMAGES/kernel_16k' in namelist: + entries.append('PREBUILT_IMAGES/kernel_16k:kernel_16k') + if 'PREBUILT_IMAGES/ramdisk_16k.img' in namelist: + entries.append('PREBUILT_IMAGES/ramdisk_16k.img:ramdisk_16k.img') for image_path in [name for name in namelist if name.startswith('IMAGES/')]: image = os.path.basename(image_path) - if OPTIONS.bootable_only and image not in('boot.img', 'recovery.img', 'bootloader', 'init_boot.img'): + if OPTIONS.bootable_only and image not in ('boot.img', 'recovery.img', 'bootloader', 'init_boot.img'): continue if not image.endswith('.img') and image != 'bootloader': continue @@ -173,8 +177,8 @@ def RebuildAndWriteSuperImages(input_file, output_file): logger.info('Writing super.img to archive...') with zipfile.ZipFile( - output_file, 'a', compression=zipfile.ZIP_DEFLATED, - allowZip64=True) as output_zip: + output_file, 'a', compression=zipfile.ZIP_DEFLATED, + allowZip64=True) as output_zip: common.ZipWrite(output_zip, super_file, 'super.img')