From 56bfe956a4ffbc4897af8c08925c9a5c1ea46ed0 Mon Sep 17 00:00:00 2001 From: Howard Chen Date: Tue, 4 Jan 2022 17:33:53 +0800 Subject: [PATCH] Pack all boot images in a zip for certification The certification script accepts one single zip file as its input. Bug: 198363484 Test: \ make bootimage dist && \ ./development/gsi/build_with_kernel/pack_boot_for_signing.sh Change-Id: Ia0289979400ea23196449c34865540309bf1e19b --- .../pack_boot_for_certification.sh | 21 +++++++++++++++++++ .../repack_kernels_common.sh | 10 +++++++++ 2 files changed, 31 insertions(+) create mode 100755 gsi/build_with_kernel/pack_boot_for_certification.sh diff --git a/gsi/build_with_kernel/pack_boot_for_certification.sh b/gsi/build_with_kernel/pack_boot_for_certification.sh new file mode 100755 index 000000000..68acac172 --- /dev/null +++ b/gsi/build_with_kernel/pack_boot_for_certification.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Copyright (C) 2022 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source development/gsi/build_with_kernel/repack_kernels_common.sh + +set -e + +pack_boot_for_certification ${DIST_DIR} diff --git a/gsi/build_with_kernel/repack_kernels_common.sh b/gsi/build_with_kernel/repack_kernels_common.sh index 2d9bed32c..9bbee2fb8 100755 --- a/gsi/build_with_kernel/repack_kernels_common.sh +++ b/gsi/build_with_kernel/repack_kernels_common.sh @@ -151,3 +151,13 @@ function update_kernel_module_prebuilts_with_artifact cp -f ${x} ${prebuilts_dir} done } + +function pack_boot_for_certification +{ + local file=boot.zip + local dist=$1 + pushd ${dist} + rm -f ${file} + zip ${file} boot*.img + popd +}