diff options
author | Isaac J. Manjarres <isaacmanjarres@google.com> | 2023-04-14 12:27:16 -0700 |
---|---|---|
committer | Isaac Manjarres <isaacmanjarres@google.com> | 2023-05-09 06:02:42 +0000 |
commit | ceaf8b1c33dfcd32aafb3da16af523ebee403e3e (patch) | |
tree | 1a5097077e79045cf0842225ecabddc14c3bbe92 | |
parent | edfc8cf708a091bfdf7d68907cd7807ccc2a9608 (diff) | |
download | msm-ceaf8b1c33dfcd32aafb3da16af523ebee403e3e.tar.gz |
download_gki.sh: Add support for specifying kernel compression format
Currently, it's assumed that the boot.img with the uncompressed kernel
should always be used. There may be cases where a compressed kernel
would be beneficial. While the script does download all versions of the
boot images (boot[-lz4|-gz].img), the ones that developers use and the
prebuilt scripts picks up is the boot.img file.
Thus, add support for specifying a kernel compression format by copying
the boot image with the kernel compressed in the desired format to
boot.img.
Bug: 278283079
Change-Id: I0a4dd38b0537a5f934605eca85c2af78af90f7e7
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
-rw-r--r-- | build.config.sw5100 | 1 | ||||
-rwxr-xr-x | scripts/download_gki.sh | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/build.config.sw5100 b/build.config.sw5100 index 7ea54d9..d784a05 100644 --- a/build.config.sw5100 +++ b/build.config.sw5100 @@ -19,6 +19,7 @@ ${GKI_FRAGMENT_DEFCONFIG}" POST_DEFCONFIG_CMDS="rm ${ROOT_DIR}/${KERNEL_DIR}/arch/arm64/configs/${DEFCONFIG}" MAKE_GOALS="" +# Keep in sync with KERNEL_BOOT_IMG in download_gki.sh KERNEL_BINARY=Image if [[ "${BUILD_KERNEL}" == "1" ]]; then diff --git a/scripts/download_gki.sh b/scripts/download_gki.sh index e4ac8c9..10053ed 100755 --- a/scripts/download_gki.sh +++ b/scripts/download_gki.sh @@ -29,6 +29,19 @@ CUR_DIR=$(pwd) GKI_PREBUILTS_DIR="${CUR_DIR}/prebuilts/boot-artifacts/kernel/" ALLOW_PREBUILTS_MISMATCH=0 USE_UNSIGNED_USER_IMG=0 + +# Must be one of: boot.img, boot-lz4.img or boot-gz.img +# Must be kept in sync with KERNEL_BINARY in build.config.sw5100 +# +# Mapping: +# +# KERNEL_BINARY | KERNEL_BOOT_IMG +# ------------------------------- +# Image | boot.img +# Image.gz | boot-gz.img +# Image.lz4 | boot-lz4.img +KERNEL_BOOT_IMG="boot.img" + while getopts "b:p:hmu" option; do case $option in b) # build number @@ -137,6 +150,11 @@ mv -v ${GKI_FILES[@]} ${GKI_PREBUILTS_DIR} exit_and_clean_if_error $? "Unable to copy all files" cd ${GKI_PREBUILTS_DIR} + +# Update boot.img to use the boot.img with the intended compression format +# for the kernel +cp -v ${KERNEL_BOOT_IMG} boot.img + echo "Update the GKI binaries to ab/${GKI_BUILD} Update the GKI binaries based on the given build. The prebuilts now have |