diff --git a/Dockerfile b/Dockerfile index 46462767febb9f7b92e03c505fc5e878c8efde40..fde2d8caacdb06421bfb5e1217a5458f04389a5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,6 +118,9 @@ ENV RECOVERY_NEEDS_VBMETA_IMG false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false +# Assume device does not use vendor_kernel_boot for recovery to boot by default. +ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false + # Ship with Minimal Apps ENV MINIMAL_APPS false diff --git a/Dockerfile.community b/Dockerfile.community index d56d1ed888951905312e859ee2b47d0c168d925e..115097cd3ac3dabda6f84b72978f9c74e8896510 100644 --- a/Dockerfile.community +++ b/Dockerfile.community @@ -126,6 +126,9 @@ ENV RECOVERY_NEEDS_VBMETA_IMG false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false +# Assume device does not use vendor_kernel_boot for recovery to boot by default. +ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false + # Force an eng build even when device name doesn't contain -eng ENV ENG_BUILD false diff --git a/src/build.sh b/src/build.sh index a634d942bd2fa921442b0b2741cfa406cfaf09b1..6e3aba462c7b09114c94000f419cbfcf24239da2 100755 --- a/src/build.sh +++ b/src/build.sh @@ -322,6 +322,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then SUPER_EMPTY_IMG_NAME="super_empty-${build%.*}.img" VBMETA_IMG_NAME="vbmeta-${build%.*}.img" VENDOR_BOOT_IMG_NAME="vendor_boot-${build%.*}.img" + VENDOR_KERNEL_BOOT_IMG_NAME="vendor_kernel_boot-${build%.*}.img" RECOVERY_IMG_NAME="recovery-${build%.*}.img" RECOVERY_ZIP_NAME="recovery-IMG-${build%.*}.zip" @@ -347,6 +348,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then cp -a obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES/super_empty.img "$SUPER_EMPTY_IMG_NAME" sha256sum "$SUPER_EMPTY_IMG_NAME" > "$SUPER_EMPTY_IMG_NAME.sha256sum" fi + if [ "$RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG" = true ]; then + cp -a obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES/vendor_kernel_boot.img "$VENDOR_KERNEL_BOOT_IMG_NAME" + sha256sum "$VENDOR_KERNEL_BOOT_IMG_NAME" > "$VENDOR_KERNEL_BOOT_IMG_NAME.sha256sum" + fi if [ "$VBOOT_IS_RECOVERY" = true ]; then cp -a obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES/vendor_boot.img "$RECOVERY_IMG_NAME" @@ -382,7 +387,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then files_to_zip+=("$SUPER_EMPTY_IMG_NAME") files_to_zip+=("$SUPER_EMPTY_IMG_NAME.sha256sum") fi - + if [ "$RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG" = true ]; then + files_to_zip+=("$VENDOR_KERNEL_BOOT_IMG_NAME") + files_to_zip+=("$VENDOR_KERNEL_BOOT_IMG_NAME.sha256sum") + fi # Zip command zip "$RECOVERY_ZIP_NAME" "${files_to_zip[@]}" sha256sum "$RECOVERY_ZIP_NAME" > "$RECOVERY_ZIP_NAME.sha256sum"