Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1035)

Unified Diff: build_kernel_image.sh

Issue 3043011: build_image, build_kernel_image, update_bootloaders: fix up rootfs_verification (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: quick comment fix Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build_image ('k') | create_legacy_bootloader_templates.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_kernel_image.sh
diff --git a/build_kernel_image.sh b/build_kernel_image.sh
index d78b150b6568b01ed72b02a5e77d35cbc2106789..fe90297a5221724c9350c65a763ddd827a240f2e 100755
--- a/build_kernel_image.sh
+++ b/build_kernel_image.sh
@@ -58,17 +58,16 @@ set -e
verity_args=
# Even with a rootfs_image, root= is not changed unless specified.
if [[ -n "${FLAGS_rootfs_image}" && -n "${FLAGS_rootfs_hash}" ]]; then
- info "Determining root fs block count."
# Gets the number of blocks. 4096 byte blocks _are_ expected.
root_fs_blocks=$(sudo dumpe2fs "${FLAGS_rootfs_image}" 2> /dev/null |
grep "Block count" |
tr -d ' ' |
cut -f2 -d:)
- info "Checking root fs block size."
root_fs_block_sz=$(sudo dumpe2fs "${FLAGS_rootfs_image}" 2> /dev/null |
grep "Block size" |
tr -d ' ' |
cut -f2 -d:)
+ info "rootfs is ${root_fs_blocks} blocks of ${root_fs_block_sz} bytes"
if [[ ${root_fs_block_sz} -ne 4096 ]]; then
error "Root file system blocks are not 4k!"
fi
@@ -87,10 +86,10 @@ if [[ -n "${FLAGS_rootfs_image}" && -n "${FLAGS_rootfs_hash}" ]]; then
# the verified boot device. Doing so will claim /dev/sdDP out from
# under the system.
if [[ ${FLAGS_root} = "/dev/dm-0" ]]; then
- table=${table//HASH_DEV/\/dev\/sd%D%P}
- table=${table//ROOT_DEV/\/dev\/sd%D%P}
+ table=${table//HASH_DEV//dev/sd%D%P}
+ table=${table//ROOT_DEV//dev/sd%D%P}
fi
- verity_args="dm=\"${table}\""
+ verity_args="dm=\"vroot none ro,${table}\""
info "dm-verity configuration: ${verity_args}"
fi
« no previous file with comments | « build_image ('k') | create_legacy_bootloader_templates.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698