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

Commit 5bf74771 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6598320 from 875be1b2 to mainline-release

Change-Id: Ic1edf021662bff6b492ecf4a5d97bad44a38c95a
parents 79c422a0 875be1b2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3534,6 +3534,9 @@ endef
# configured as a chained partition, if BOARD_AVB_<partition>_KEY_PATH is defined. Otherwise the
# image descriptor will be included into vbmeta.img, unless it has been already added to any chained
# VBMeta image.
# Multiple boot images can be generated based on BOARD_KERNEL_BINARIES
# but vbmeta would capture the image descriptor of only the first boot
# image specified in BUILT_BOOTIMAGE_TARGET.
# $(1): Partition name, e.g. boot or system.
define check-and-set-avb-args
$(eval _in_chained_vbmeta := $(filter $(1),$(INTERNAL_AVB_PARTITIONS_IN_CHAINED_VBMETA_IMAGES)))
@@ -3542,8 +3545,11 @@ $(if $(BOARD_AVB_$(call to-upper,$(1))_KEY_PATH),\
        $(error Chaining partition "$(1)" in chained VBMeta image is not supported)) \
    $(call _check-and-set-avb-chain-args,$(1)),\
    $(if $(_in_chained_vbmeta),,\
        $(if $(filter boot,$(1)),\
            $(eval INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += \
            --include_descriptors_from_image $(call images-for-partitions,$(1)))))
                --include_descriptors_from_image $(firstword $(call images-for-partitions,$(1)))),\
            $(eval INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += \
                --include_descriptors_from_image $(call images-for-partitions,$(1))))))
endef

# Checks and sets build variables for a custom chained partition to include it into vbmeta.img.
+2 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ TARGET_NO_KERNEL := false
TARGET_NO_VENDOR_BOOT := true
BOARD_USES_RECOVERY_AS_BOOT := true

BOARD_KERNEL-4.19-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920
BOARD_KERNEL-5.4_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_KERNEL-5.4-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920
BOARD_KERNEL-5.4-LZ4_BOOTIMAGE_PARTITION_SIZE := 53477376
@@ -66,7 +67,7 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
BOARD_BOOT_HEADER_VERSION := 3
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)

BOARD_KERNEL_BINARIES := kernel-5.4 kernel-5.4-gz kernel-5.4-lz4
BOARD_KERNEL_BINARIES := kernel-4.19-gz kernel-5.4 kernel-5.4-gz kernel-5.4-lz4

# Some vendors still haven't cleaned up all device specific directories under
# root!
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#

PRODUCT_COPY_FILES += \
    kernel/prebuilts/4.19/arm64/Image.gz:kernel-4.19-gz \
    device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4:kernel-5.4 \
    device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4-gz:kernel-5.4-gz \
    device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4-lz4:kernel-5.4-lz4
+4 −4
Original line number Diff line number Diff line
@@ -788,16 +788,16 @@ def AddImagesToTargetFiles(filename):
    boot_images = OPTIONS.info_dict.get("boot_images")
    if boot_images is None:
      boot_images = "boot.img"
    for b in boot_images.split():
    for index,b in enumerate(boot_images.split()):
      # common.GetBootableImage() returns the image directly if present.
      boot_image = common.GetBootableImage(
          "IMAGES/" + b, b, OPTIONS.input_tmp, "BOOT")
      # boot.img may be unavailable in some targets (e.g. aosp_arm64).
      if boot_image:
        boot_image_path = os.path.join(OPTIONS.input_tmp, "IMAGES", b)
        # vbmeta does not need to include boot.img with multiple boot.img files,
        # which is only used for aosp_arm64 for GKI
        if len(boot_images.split()) == 1:
        # Although multiple boot images can be generated, include the image
        # descriptor of only the first boot image in vbmeta
        if index == 0:
          partitions['boot'] = boot_image_path
        if not os.path.exists(boot_image_path):
          boot_image.WriteToDir(OPTIONS.input_tmp)
+10 −3
Original line number Diff line number Diff line
@@ -2012,9 +2012,16 @@ def CalculateRuntimeDevicesAndFingerprints(build_info, boot_variable_values):
    info_dict = copy.deepcopy(build_info.info_dict)
    for partition in common.PARTITIONS_WITH_CARE_MAP:
      partition_prop_key = "{}.build.prop".format(partition)
      old_props = info_dict[partition_prop_key]
      info_dict[partition_prop_key] = common.PartitionBuildProps.FromInputFile(
          old_props.input_file, partition, placeholder_values)
      input_file = info_dict[partition_prop_key].input_file
      if isinstance(input_file, zipfile.ZipFile):
        with zipfile.ZipFile(input_file.filename) as input_zip:
          info_dict[partition_prop_key] = \
              common.PartitionBuildProps.FromInputFile(input_zip, partition,
                                                       placeholder_values)
      else:
        info_dict[partition_prop_key] = \
            common.PartitionBuildProps.FromInputFile(input_file, partition,
                                                     placeholder_values)
    info_dict["build.prop"] = info_dict["system.build.prop"]

    new_build_info = common.BuildInfo(info_dict, build_info.oem_dicts)