summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVictor Hsieh <victorhsieh@chromium.org>2020-07-21 13:44:46 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-23 05:40:01 +0000
commit4f1094911adb8a44d60de49135978ce04b8917cb (patch)
treec2ad660ae7d8104af1a82ac3030bf77d232f0f16 /scripts
parentcd78ae54a2f7ccec9ef0216b633d1b4626d14af0 (diff)
downloadvboot-4f1094911adb8a44d60de49135978ce04b8917cb.tar.gz
sign_official_build: accept arcvm/bertha image
BUG=b:161828692 TEST=sign_official_build.sh base recovery_image.bin mykey signed.bin TEST=sign_android_unittests.sh BRANCH=none Signed-off-by: Victor Hsieh <victorhsieh@chromium.org> Change-Id: I158cd0c23198ffe8773b5882ba214b3ca4d26cae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2310758 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/image_signing/lib/sign_android_lib.sh3
-rwxr-xr-xscripts/image_signing/sign_android_image.sh4
-rwxr-xr-xscripts/image_signing/sign_android_unittests.sh7
-rwxr-xr-xscripts/image_signing/sign_official_build.sh2
4 files changed, 13 insertions, 3 deletions
diff --git a/scripts/image_signing/lib/sign_android_lib.sh b/scripts/image_signing/lib/sign_android_lib.sh
index 7de328a4..985e709d 100644
--- a/scripts/image_signing/lib/sign_android_lib.sh
+++ b/scripts/image_signing/lib/sign_android_lib.sh
@@ -125,7 +125,8 @@ android_choose_signing_keyset() {
keyset="aosp"
elif [[ "${flavor_prop}" == cheets_* ||
"${flavor_prop}" == sdk_cheets_* ||
- "${flavor_prop}" == sdk_google_cheets_* ]]; then
+ "${flavor_prop}" == sdk_google_cheets_* ||
+ "${flavor_prop}" == bertha_* ]]; then
keyset="cheets"
else
return 1
diff --git a/scripts/image_signing/sign_android_image.sh b/scripts/image_signing/sign_android_image.sh
index f48a5f0a..2558a980 100755
--- a/scripts/image_signing/sign_android_image.sh
+++ b/scripts/image_signing/sign_android_image.sh
@@ -220,7 +220,9 @@ snapshot_file_properties() {
main() {
local root_fs_dir=$1
local key_dir=$2
- local android_dir="${root_fs_dir}/opt/google/containers/android"
+ local android_system_image="$(echo \
+ "${root_fs_dir}"/opt/google/*/android/system.raw.img)"
+ local android_dir=$(dirname "${android_system_image}")
local system_img="${android_dir}/system.raw.img"
# Use the versions in $PATH rather than the system ones.
local unsquashfs=$(which unsquashfs)
diff --git a/scripts/image_signing/sign_android_unittests.sh b/scripts/image_signing/sign_android_unittests.sh
index 9b0c034f..9bb99a89 100755
--- a/scripts/image_signing/sign_android_unittests.sh
+++ b/scripts/image_signing/sign_android_unittests.sh
@@ -175,9 +175,16 @@ test_android_choose_signing_keyset() {
choose_signing_keyset_test_helper "cheets_x86_64-user" "cheets"
echo "TEST: Keyset for userdebug build."
choose_signing_keyset_test_helper "cheets_x86-userdebug" "cheets"
+ echo "TEST: Keyset for bertha_x86 build."
+ choose_signing_keyset_test_helper "bertha_x86-user" "cheets"
+ echo "TEST: Keyset for bertha_arm build."
+ choose_signing_keyset_test_helper "bertha_arm-user" "cheets"
+ echo "TEST: Keyset for bertha_x86_64 build."
+ choose_signing_keyset_test_helper "bertha_x86_64-user" "cheets"
choose_signing_keyset_test_invalid_flavors "aosp"
choose_signing_keyset_test_invalid_flavors "cheets"
+ choose_signing_keyset_test_invalid_flavors "bertha"
choose_signing_keyset_test_invalid_flavors ""
choose_signing_keyset_test_invalid_flavors " "
}
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh
index e8dd9e61..3777032c 100755
--- a/scripts/image_signing/sign_official_build.sh
+++ b/scripts/image_signing/sign_official_build.sh
@@ -742,7 +742,7 @@ resign_android_image_if_exists() {
local rootfs_dir=$(make_temp_dir)
mount_loop_image_partition "${loopdev}" 3 "${rootfs_dir}"
- local system_img="${rootfs_dir}/opt/google/containers/android/system.raw.img"
+ local system_img="$(echo "${rootfs_dir}"/opt/google/*/android/system.raw.img)"
local arc_version=$(grep CHROMEOS_ARC_VERSION= \
"${rootfs_dir}/etc/lsb-release" | cut -d= -f2)
if [[ ! -e "${system_img}" || -z "${arc_version}" ]]; then