From cba0e83d91b33c3ef9c71fc7dc24c1370e7f3e9a Mon Sep 17 00:00:00 2001 From: Gaurav Shah Date: Thu, 21 Jul 2011 11:19:49 -0700 Subject: [PATCH] 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 Tested-by: Gaurav Shah --- scripts/image_signing/sign_official_build.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index ba4f0e3e25..6d124ff1cd 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -118,12 +118,11 @@ calculate_rootfs_hash() { local verity_algorithm=$(echo ${dm_config} | cut -f8 -d' ') # Run the verity tool on the rootfs partition. - local table="vroot none ro,"$(sudo verity create \ - ${verity_depth} \ - ${verity_algorithm} \ - ${rootfs_image} \ - $((rootfs_sectors / 8)) \ - ${hash_image}) + local table="vroot none ro,"$(sudo verity mode=create \ + alg=${verity_algorithm} \ + payload="${rootfs_image}" \ + payload_blocks=$((rootfs_sectors / 8)) \ + hashtree="${hash_image}") # Reconstruct new kernel config command line and replace placeholders. table="$(echo "$table" | sed -s "s|ROOT_DEV|${root_dev}|g;s|HASH_DEV|${hash_dev}|")"