mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
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>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
3d5cd88f90
commit
05371345b7
@@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user