diff options
-rw-r--r-- | classes/dm-verity-img.bbclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass index d809985..b279fa8 100644 --- a/classes/dm-verity-img.bbclass +++ b/classes/dm-verity-img.bbclass | |||
@@ -58,6 +58,7 @@ verity_setup() { | |||
58 | local INPUT=${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$TYPE | 58 | local INPUT=${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$TYPE |
59 | local SIZE=$(stat --printf="%s" $INPUT) | 59 | local SIZE=$(stat --printf="%s" $INPUT) |
60 | local OUTPUT=$INPUT.verity | 60 | local OUTPUT=$INPUT.verity |
61 | local SETUP_ARGS="" | ||
61 | 62 | ||
62 | if [ ${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} -ge ${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} ]; then | 63 | if [ ${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} -ge ${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} ]; then |
63 | align=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} | 64 | align=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} |
@@ -68,9 +69,15 @@ verity_setup() { | |||
68 | 69 | ||
69 | cp -a $INPUT $OUTPUT | 70 | cp -a $INPUT $OUTPUT |
70 | 71 | ||
72 | SETUP_ARGS=" \ | ||
73 | --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} \ | ||
74 | --hash-block-size=${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} \ | ||
75 | --hash-offset=$SIZE format $OUTPUT $OUTPUT \ | ||
76 | " | ||
77 | |||
71 | # Let's drop the first line of output (doesn't contain any useful info) | 78 | # Let's drop the first line of output (doesn't contain any useful info) |
72 | # and feed the rest to another function. | 79 | # and feed the rest to another function. |
73 | veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-block-size=${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity | 80 | veritysetup $SETUP_ARGS | tail -n +2 | process_verity |
74 | } | 81 | } |
75 | 82 | ||
76 | VERITY_TYPES = " \ | 83 | VERITY_TYPES = " \ |