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" \