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.
This commit is contained in:
Michael Marineau 2013-12-28 13:18:28 -08:00
parent 8ca62121d9
commit 9bc36ee344
3 changed files with 3 additions and 20 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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