From c86eb16098cc4e69d6602741503f5455d95f8cd4 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 19 Sep 2013 18:21:32 -0400 Subject: [PATCH] fix(build_image): Remove defunct bootcache option. From ChromeOS, not applicable to our systems. --- bin/cros_make_image_bootable | 8 -------- build_image | 17 +---------------- build_library/base_image_util.sh | 8 +------- build_library/build_image_util.sh | 5 ----- .../create_legacy_bootloader_templates.sh | 2 -- 5 files changed, 2 insertions(+), 38 deletions(-) diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable index 462f54a7f9..63d0661a45 100755 --- a/bin/cros_make_image_bootable +++ b/bin/cros_make_image_bootable @@ -89,12 +89,8 @@ DEFINE_boolean cleanup_dirs ${FLAGS_TRUE} \ DEFINE_string boot_args "noinitrd" \ "Additional boot arguments to pass to the commandline" -# TODO(taysom): when we turn on boot cache, both verification and -# bootcache should have their default be FLAGS_TRUE. DEFINE_boolean enable_rootfs_verification ${FLAGS_FALSE} \ "Default all bootloaders to NOT use kernel-based root fs integrity checking." -DEFINE_boolean enable_bootcache ${FLAGS_FALSE} \ - "Default all bootloaders to NOT use bootcache." DEFINE_string keys_dir "/usr/share/vboot/devkeys" \ "Directory containing the signing keys." @@ -164,10 +160,6 @@ make_image_bootable() { if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then enable_rootfs_verification_flag=--enable_rootfs_verification fi - local enable_bootcache_flag=--noenable_bootcache - if [[ ${FLAGS_enable_bootcache} -eq ${FLAGS_TRUE} ]]; then - enable_bootcache_flag=--enable_bootcache - fi trap "mount_gpt_cleanup" EXIT "${SCRIPTS_DIR}/mount_gpt_image.sh" --from "$(dirname "${image}")" \ diff --git a/build_image b/build_image index ad1f87d255..9f84891bcb 100755 --- a/build_image +++ b/build_image @@ -19,8 +19,6 @@ DEFINE_string board "${DEFAULT_BOARD}" \ "The board to build an image for." DEFINE_string boot_args "" \ "Additional boot arguments to pass to the commandline" -DEFINE_boolean enable_bootcache ${FLAGS_FALSE} \ - "Default all bootloaders to NOT use boot cache." DEFINE_boolean enable_rootfs_verification ${FLAGS_TRUE} \ "Default all bootloaders to use kernel-based root fs integrity checking." DEFINE_string output_root "${DEFAULT_BUILD_ROOT}/images" \ @@ -67,18 +65,6 @@ DEFINE_string version "" \ # Parse command line. FLAGS "$@" || exit 1 -# See if we want to default the bootcache flag before we clobber -# the user's command line. We want to default to false if the -# user explicitly disabled rootfs verification otherwise they -# have to manually specify both. -FLAGS_bootcache_use_board_default=${FLAGS_enable_rootfs_verification} -case " $* " in - *" --enable_bootcache "*|\ - *" --noenable_bootcache "*) - FLAGS_bootcache_use_board_default=${FLAGS_FALSE} - ;; -esac - eval set -- "${FLAGS_ARGV}" # Only now can we die on error. shflags functions leak non-zero error codes, @@ -145,8 +131,7 @@ fi mkdir -p "${BUILD_DIR}" # Create the base image. -create_base_image ${PRISTINE_IMAGE_NAME} ${FLAGS_enable_rootfs_verification} \ - ${FLAGS_enable_bootcache} +create_base_image ${PRISTINE_IMAGE_NAME} ${FLAGS_enable_rootfs_verification} if should_build_image ${PRISTINE_IMAGE_NAME}; then upload_image "${BUILD_DIR}/${PRISTINE_IMAGE_NAME}" fi diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index b1a6be6358..01c1ee7df9 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -39,7 +39,6 @@ cleanup_mounts() { create_base_image() { local image_name=$1 local rootfs_verification_enabled=$2 - local bootcache_enabled=$3 local image_type="base" if [[ "${FLAGS_disk_layout}" != "default" ]]; then @@ -236,17 +235,12 @@ create_base_image() { if [[ ${rootfs_verification_enabled} -eq ${FLAGS_TRUE} ]]; then enable_rootfs_verification="--enable_rootfs_verification" fi - local enable_bootcache= - if [[ ${bootcache_enabled} -eq ${FLAGS_TRUE} ]]; then - enable_bootcache="--enable_bootcache" - fi ${BUILD_LIBRARY_DIR}/create_legacy_bootloader_templates.sh \ --arch=${ARCH} \ --to="${root_fs_dir}"/boot \ --boot_args="${FLAGS_boot_args}" \ - ${enable_rootfs_verification} \ - ${enable_bootcache} + ${enable_rootfs_verification} # Don't test the factory install shim if ! should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 978f68c531..9dd9b3186b 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -99,10 +99,6 @@ create_boot_desc() { if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then enable_rootfs_verification_flag="--enable_rootfs_verification" fi - local enable_bootcache_flag="" - if [[ ${FLAGS_enable_bootcache} -eq ${FLAGS_TRUE} ]]; then - enable_bootcache_flag=--enable_bootcache - fi cat < ${BUILD_DIR}/boot.desc --board=${BOARD} @@ -112,7 +108,6 @@ create_boot_desc() { --boot_args="${FLAGS_boot_args}" --nocleanup_dirs ${enable_rootfs_verification_flag} - ${enable_bootcache_flag} EOF } diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh index e9ece557a0..ed05c5f5b1 100755 --- a/build_library/create_legacy_bootloader_templates.sh +++ b/build_library/create_legacy_bootloader_templates.sh @@ -20,8 +20,6 @@ DEFINE_string to "/tmp/boot" \ "Path to populate with bootloader templates (Default: /tmp/boot)" DEFINE_string boot_args "" \ "Additional boot arguments to pass to the commandline (Default: '')" -DEFINE_boolean enable_bootcache ${FLAGS_FALSE} \ - "Default all bootloaders to NOT use boot cache." DEFINE_boolean enable_rootfs_verification ${FLAGS_FALSE} \ "Controls if verity is used for root filesystem checking (Default: false)"