build_image: Cleanup enable_rootfs_verification

To clean things up and prepare for arrm64 support move
all the enable_rootfs_verification processing into one
location and add some comments.

Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
Geoff Levand 2016-12-13 13:46:05 -08:00
parent 0ef44633ef
commit 4ca0c5bc19
2 changed files with 6 additions and 5 deletions

View File

@ -86,11 +86,6 @@ switch_to_strict_mode
check_gsutil_opts
# Inserting the verity hash into the kernel assumes x86_64
if [[ "${FLAGS_board}" != amd64-usr ]]; then
FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
fi
# If downloading packages is enabled ensure the board is configured properly.
if [[ ${FLAGS_getbinpkg} -eq ${FLAGS_TRUE} ]]; then
"${SRC_ROOT}/scripts/setup_board" --board="${FLAGS_board}" \

View File

@ -304,10 +304,16 @@ finish_image() {
local install_grub=0
local disk_img="${BUILD_DIR}/${image_name}"
# Only enable rootfs verification on prod builds.
if [[ "${IMAGE_BUILD_TYPE}" != "prod" ]]; then
FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
fi
# Only enable rootfs verification on supported boards.
if [[ "${FLAGS_board}" != amd64-usr ]]; then
FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
fi
# Copy kernel to support dm-verity boots
sudo mkdir -p "${root_fs_dir}/boot/coreos"
sudo cp "${root_fs_dir}/usr/boot/vmlinuz" \