From 9bc36ee3440d0c19eb4b3c6cac7d61ab7f1c5e34 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 28 Dec 2013 13:18:28 -0800 Subject: [PATCH] fix(base_image_util): Remove dead code, leave rootfs writable. The verification flag was being passed through to the bootloader template script but no longer had any effect. Force the base image to always remain writable, its only purpose is to be modified in a later build step anyway. --- build_image | 2 +- build_library/base_image_util.sh | 19 ++----------------- .../create_legacy_bootloader_templates.sh | 2 -- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/build_image b/build_image index 2c042688d7..728138eb2c 100755 --- a/build_image +++ b/build_image @@ -121,7 +121,7 @@ fi mkdir -p "${BUILD_DIR}" # Create the base image. -create_base_image ${PRISTINE_IMAGE_NAME} ${FLAGS_enable_rootfs_verification} +create_base_image ${PRISTINE_IMAGE_NAME} 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 9844c86032..7f2b49ab06 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -174,25 +174,10 @@ create_base_image() { # cros_make_image_bootable. create_boot_desc - # Populates the root filesystem with legacy bootloader templates - # appropriate for the platform. The autoupdater and installer will - # use those templates to update the legacy boot partition (12/ESP) - # on update. - local enable_rootfs_verification= - if [[ ${rootfs_verification_enabled} -eq ${FLAGS_TRUE} ]]; then - enable_rootfs_verification="--enable_rootfs_verification" - fi - ${BUILD_LIBRARY_DIR}/create_legacy_bootloader_templates.sh \ --arch=${ARCH} \ --to="${root_fs_dir}"/boot \ - --boot_args="${FLAGS_boot_args}" \ - ${enable_rootfs_verification} - - if [[ ${skip_test_image_content} -ne 1 ]]; then - # Check that the image has been correctly created. - test_image_content "$root_fs_dir" - fi + --boot_args="${FLAGS_boot_args}" # Zero all fs free space to make it more compressible so auto-update # payloads become smaller, not fatal since it won't work on linux < 3.2 @@ -215,7 +200,7 @@ create_base_image() { emit_gpt_scripts "${BUILD_DIR}/${image_name}" "${BUILD_DIR}" ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ - "${image_name}" + "${image_name}" --noenable_rootfs_verification trap - EXIT } diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh index f6b6467fa1..5fbd6bcb61 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_rootfs_verification ${FLAGS_FALSE} \ - "Controls if verity is used for root filesystem checking (Default: false)" # Parse flags FLAGS "$@" || exit 1