mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
fix(build_image): Remove defunct bootcache option.
From ChromeOS, not applicable to our systems.
This commit is contained in:
parent
9f98ce2aad
commit
c86eb16098
@ -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}")" \
|
||||
|
17
build_image
17
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
|
||||
|
@ -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
|
||||
|
@ -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 <<EOF > ${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
|
||||
}
|
||||
|
||||
|
@ -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)"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user