mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
build_image: auto-disable bootcache when --noenable_rootfs_verification is used
If devs run `./build_image --noenable_rootfs_verification`, they also have to manually specify --noenable_bootcache otherwise the default kicks in. We can make the default logic slightly smarter and only enable bootcache by default if rootfs verification is also enabled. BUG=chromium-os:25441 TEST=`./build_image --board=parrot --enable_rootfs_verification` -> bootcache enabled TEST=`./build_image --board=parrot --noenable_rootfs_verification` -> bootcache disabled TEST=`./build_image --board=parrot` -> bootcache enabled TEST=`./build_image --board=parrot --noenable_bootcache` -> bootcache disabled Change-Id: I97f40c70c045bca294a903ff73e5eff7554617d4 Reviewed-on: https://gerrit.chromium.org/gerrit/39043 Reviewed-by: Paul Taysom <taysom@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
33776c1cae
commit
454c526fda
21
build_image
21
build_image
@ -32,14 +32,6 @@ DEFINE_boolean standard_backdoor ${FLAGS_TRUE} \
|
|||||||
DEFINE_string usb_disk /dev/sdb3 \
|
DEFINE_string usb_disk /dev/sdb3 \
|
||||||
"Path syslinux should use to do a usb boot. Default: /dev/sdb3"
|
"Path syslinux should use to do a usb boot. Default: /dev/sdb3"
|
||||||
|
|
||||||
FLAGS_bootcache_use_board_default=${FLAGS_TRUE}
|
|
||||||
case " $* " in
|
|
||||||
*" --enable_bootcache "*|\
|
|
||||||
*" --noenable_bootcache "*)
|
|
||||||
FLAGS_bootcache_use_board_default=${FLAGS_FALSE}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
FLAGS_HELP="USAGE: build_image [flags] [list of images to build].
|
FLAGS_HELP="USAGE: build_image [flags] [list of images to build].
|
||||||
This script is used to build a Chromium OS image. Chromium OS comes in many
|
This script is used to build a Chromium OS image. Chromium OS comes in many
|
||||||
different forms. This scripts can be used to build the following:
|
different forms. This scripts can be used to build the following:
|
||||||
@ -77,6 +69,19 @@ DEFINE_string version "" \
|
|||||||
|
|
||||||
# Parse command line.
|
# Parse command line.
|
||||||
FLAGS "$@" || exit 1
|
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}"
|
eval set -- "${FLAGS_ARGV}"
|
||||||
|
|
||||||
# Only now can we die on error. shflags functions leak non-zero error codes,
|
# Only now can we die on error. shflags functions leak non-zero error codes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user