Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6a56a2d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't put BOARD_CUSTOMIMAGES_PARTITION_LIST partitions with...

Merge "Don't put BOARD_CUSTOMIMAGES_PARTITION_LIST partitions with IMAGE_NO_FLASHALL into $PRODUCT-img.zip" into main am: de6c2706

Original change: https://android-review.googlesource.com/c/platform/build/+/3554854



Change-Id: I545464e97b3f922b3ec9e7aee3f4f2a5347488a2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a4ebb5df de6c2706
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -7603,6 +7603,12 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(IMG_FROM_TARG
	PATH=$(INTERNAL_USERIMAGES_BINARY_PATHS):$(dir $(ZIP2ZIP)):$$PATH \
	    $(IMG_FROM_TARGET_FILES) \
	        --additional IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
			$(foreach partition,$(BOARD_CUSTOMIMAGES_PARTITION_LIST), \
					$(if $(BOARD_$(call to-upper,$(partition))_IMAGE_NO_FLASHALL), \
						--exclude IMAGES/$(partition).img \
						--exclude IMAGES/$(partition).map \
					) \
			) \
	        --build_super_image $(BUILD_SUPER_IMAGE) \
	        $(BUILT_TARGET_FILES_PACKAGE) $@

+11 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ Flags:
      `filespec` arg in zip2zip's help message). The option can be repeated to
      include multiple entries.

  --exclude <filespec>
      Don't include these files. If the file is in --additional and --exclude,
      the file will not be included.

"""

from __future__ import print_function
@@ -56,6 +60,7 @@ logger = logging.getLogger(__name__)
OPTIONS = common.OPTIONS

OPTIONS.additional_entries = []
OPTIONS.excluded_entries = []
OPTIONS.bootable_only = False
OPTIONS.put_super = None
OPTIONS.put_bootloader = None
@@ -245,6 +250,9 @@ def ImgFromTargetFiles(input_file, output_file):
  # Any additional entries provided by caller.
  entries += OPTIONS.additional_entries

  # Remove any excluded entries
  entries = [e for e in entries if e not in OPTIONS.excluded_entries]

  CopyZipEntries(input_file, output_file, entries)

  if rebuild_super:
@@ -258,6 +266,8 @@ def main(argv):
      OPTIONS.bootable_only = True
    elif o == '--additional':
      OPTIONS.additional_entries.append(a)
    elif o == '--exclude':
      OPTIONS.excluded_entries.append(a)
    elif o == '--build_super_image':
      OPTIONS.build_super_image = a
    else:
@@ -268,6 +278,7 @@ def main(argv):
                             extra_opts='z',
                             extra_long_opts=[
                                 'additional=',
                                 'exclude=',
                                 'bootable_zip',
                                 'build_super_image=',
                             ],