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

Commit ac067264 authored by Jackeagle's avatar Jackeagle
Browse files

build: Add support to include boot.img in recovery-IMG.zip

parent 2389d8e6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -106,6 +106,9 @@ ENV RECOVERY_NEEDS_SUPPORT_IMG false
# Assume device does not use vendor_boot for recovery to boot by default.
ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false

# Assume device does not use boot.img for recovery to boot by default.
ENV RECOVERY_NEEDS_BOOT_IMG false

# Assume device does not use DTBO for recovery to boot by default.
ENV RECOVERY_NEEDS_DTBO_IMG false

+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ ENV RECOVERY_NEEDS_SUPPORT_IMG false
# Assume device does not use vendor_boot for recovery to boot by default.
ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false

# Assume device does not use boot.img for recovery to boot by default.
ENV RECOVERY_NEEDS_BOOT_IMG false

# Assume device does not use DTBO for recovery to boot by default.
ENV RECOVERY_NEEDS_DTBO_IMG false

+7 −0
Original line number Diff line number Diff line
@@ -317,6 +317,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
        fi

        if [ "$RECOVERY_IMG" = true ]; then
          BOOT_IMG_NAME="boot-${build%.*}.img"
          DTBO_IMG_NAME="dtbo-${build%.*}.img"
          SUPER_EMPTY_IMG_NAME="super_empty-${build%.*}.img"
          VBMETA_IMG_NAME="vbmeta-${build%.*}.img"
@@ -326,6 +327,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then

            if [ "$RECOVERY_NEEDS_SUPPORT_IMG" = true ]; then
                # Copy the files specified by the flags
                if [ "$RECOVERY_NEEDS_BOOT_IMG" = true ]; then
                    cp -a obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES/boot.img "$BOOT_IMG_NAME"
                fi
                if [ "$RECOVERY_NEEDS_DTBO_IMG" = true ]; then
                    cp -a obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES/dtbo.img "$DTBO_IMG_NAME"
                fi
@@ -349,6 +353,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then

                # Conditionally include files in zip command based on flags
                files_to_zip=("$RECOVERY_IMG_NAME")
                if [ "$RECOVERY_NEEDS_BOOT_IMG" = true ]; then
                    files_to_zip+=("$BOOT_IMG_NAME")
                fi
                if [ "$RECOVERY_NEEDS_DTBO_IMG" = true ]; then
                    files_to_zip+=("$DTBO_IMG_NAME")
                fi