diff options
author | Amey Deshpande <ameyd@google.com> | 2015-05-21 14:46:06 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-22 16:49:06 +0000 |
commit | 05371345b75454c20a12433384a0d5dc29064f07 (patch) | |
tree | ce59c865af7bc94865b4357748e7e597c63b74e4 | |
parent | 3d5cd88f90ca38e7b2736bb1569c50049e710453 (diff) | |
download | vboot-05371345b75454c20a12433384a0d5dc29064f07.tar.gz |
sign_official_build: preserve /boot for legacy BIOS
This patch checks for 'cros_legacy' in the kernel config, and skips
running strip_boot_from_image.sh if present. This is because
'cros_installer postinst' on legacy BIOS relies on presence of /boot in
rootfs.
BRANCH=signer
BUG=b:20947354
TEST=Ran the script with devkeys, and checked presence of /boot in the
signed .bin file by mounting locally
$ ./sign_official_build.sh ssd chromiumos_image.bin ../../tests/devkeys \
chromiumos_image_signed.bin ../../tests/devkeys/key.versions
Change-Id: Ieb919067b353839019bc1c561d7bb66bebac1040
Reviewed-on: https://chromium-review.googlesource.com/272742
Tested-by: Amey Deshpande <ameyd@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Amey Deshpande <ameyd@google.com>
-rwxr-xr-x | scripts/image_signing/sign_official_build.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index 53c9ef5a..52721063 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -663,7 +663,13 @@ sign_image_file() { resign_firmware_payload "${output}" # We do NOT strip /boot for factory installer, since some devices need it to # boot EFI. crbug.com/260512 would obsolete this requirement. - if [[ "${image_type}" != "factory_install" ]]; then + # + # We also do NOT strip /boot for legacy BIOS devices. This is because + # "cros_installer postinst" on legacy BIOS relies on presence of /boot in + # rootfs. We infer the BIOS type from the kernel config. + local kerna_config="$(grab_kernel_config "${input}" 2)" + if [[ "${image_type}" != "factory_install" && + " ${kerna_config} " != *" cros_legacy "* ]]; then "${SCRIPT_DIR}/strip_boot_from_image.sh" --image "${output}" fi update_rootfs_hash "${output}" "${dm_partno}" \ |