From 0082c521ea4c10a297bf8363624f4f91bd653695 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Wed, 25 May 2022 00:20:40 +0800 Subject: [PATCH] ANDROID: Adding Image.gz and boot-gz.img This adds <10 seconds for a LTO=thin build, while the original build time is about ~250 seconds on a build machine with 48 2.60 GHz processors and 64GB RAM. Within the 10 seconds, ~3 seconds spent on building Image.gz, ~5 seconds for packing Image.gz as boot-gz.img and <1 second for including the boot-gz.img into the boot-img.tar.gz. Bug: 233352819 Test: LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh Signed-off-by: Bowgo Tsai Change-Id: I283ef004d1233d2e175573b893379e0d68221353 (cherry picked from commit 2ad997b4d1d4343d7d79e900c6f60b0272f65a47) (cherry picked from commit 933eddd126d18b45f5a693d695bc69a7a6770167) --- build.config.gki.aarch64 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.config.gki.aarch64 b/build.config.gki.aarch64 index cacf01a10019..99a27af0ca08 100644 --- a/build.config.gki.aarch64 +++ b/build.config.gki.aarch64 @@ -4,6 +4,7 @@ MAKE_GOALS="${MAKE_GOALS} Image.lz4 +Image.gz " # uncomment ABI_DEFINITION when enabling KMI enforcement @@ -28,6 +29,7 @@ android/abi_gki_aarch64_unisoc FILES="${FILES} arch/arm64/boot/Image.lz4 +arch/arm64/boot/Image.gz " # Update BUILD.bazel, define_common_kernels() if the value is not 1. @@ -42,4 +44,5 @@ BUILD_GKI_CERTIFICATION_TOOLS=1 BUILD_GKI_ARTIFACTS=1 BUILD_GKI_BOOT_IMG_SIZE=67108864 +BUILD_GKI_BOOT_IMG_GZ_SIZE=47185920 BUILD_GKI_BOOT_IMG_LZ4_SIZE=53477376