Fix script to use new key=value style /bin/verity arguments

BUG=chromium-os:17953
TEST=Run sign_official_build.sh verify from the chroot on an image, now
     it succeeds.

Change-Id: Idd923716c95f4f12bd0a1236e2894af276e26d71
Reviewed-on: http://gerrit.chromium.org/gerrit/4499
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
This commit is contained in:
Gaurav Shah
2011-07-21 11:19:49 -07:00
parent ac6d56033f
commit cba0e83d91

View File

@@ -118,12 +118,11 @@ calculate_rootfs_hash() {
local verity_algorithm=$(echo ${dm_config} | cut -f8 -d' ') local verity_algorithm=$(echo ${dm_config} | cut -f8 -d' ')
# Run the verity tool on the rootfs partition. # Run the verity tool on the rootfs partition.
local table="vroot none ro,"$(sudo verity create \ local table="vroot none ro,"$(sudo verity mode=create \
${verity_depth} \ alg=${verity_algorithm} \
${verity_algorithm} \ payload="${rootfs_image}" \
${rootfs_image} \ payload_blocks=$((rootfs_sectors / 8)) \
$((rootfs_sectors / 8)) \ hashtree="${hash_image}")
${hash_image})
# Reconstruct new kernel config command line and replace placeholders. # Reconstruct new kernel config command line and replace placeholders.
table="$(echo "$table" | table="$(echo "$table" |
sed -s "s|ROOT_DEV|${root_dev}|g;s|HASH_DEV|${hash_dev}|")" sed -s "s|ROOT_DEV|${root_dev}|g;s|HASH_DEV|${hash_dev}|")"