From 4ca0c5bc19219e5cad79d66413f461cb4c792c25 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Tue, 13 Dec 2016 13:46:05 -0800 Subject: [PATCH] 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 --- build_image | 5 ----- build_library/build_image_util.sh | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build_image b/build_image index 0bc7deb33a..155a0dae24 100755 --- a/build_image +++ b/build_image @@ -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}" \ diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 6bdf03267e..904020411f 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -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" \