dm-verity-img.bbclass: Expose --data-block-size for configuration
PATCH 1/1 dm-verity-img.bbclass: Expose --data-block-size for configuration
From: Christer Fletcher <[email protected]>
Add DM_VERITY_IMAGE_DATA_BLOCK_SIZE to be able to set the --data-block-size used in veritysetup. Tuning this value effects the performance and size of the resulting image.
Signed-off-by Christer Fletcher <[email protected]>
Signed-off-by Paulo Neves <[email protected]>
--- classes/dm-verity-img.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
classes/dm-verity-img.bbclass +4 -1
@@ -22,6 +22,9 @@ # is stored where it can be installed into associated initramfs rootfs. STAGING_VERITY_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/dm-verity" +# Define the data block size to use in veritysetup. +DM_VERITY_IMAGE_DATA_BLOCK_SIZE ?= "1024" + # Process the output from veritysetup and generate the corresponding .env # file. The output from veritysetup is not very machine-friendly so we need to # convert it to some better format. Let's drop the first line (doesn't contain
@@ -57,7 +60,7 @@ verity_setup() { # Let's drop the first line of output (doesn't contain any useful info) # and feed the rest to another function. - veritysetup --data-block-size=1024 --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity + veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity } VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity"
Signature · 1 line
2.25.1
merged.
thanks
Armin
Quoted 38 lines · Paulo Neves
From: Christer Fletcher <[email protected]>
Add
DM_VERITY_IMAGE_DATA_BLOCK_SIZEto be able to set the --data-block-size used in veritysetup. Tuning this value effects the performance and size of the resulting image.Signed-off-by Christer Fletcher <[email protected]>Signed-off-by Paulo Neves <[email protected]>--- classes/dm-verity-img.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)classes/dm-verity-img.bbclass +4
-1@@ -22,6 +22,9 @@ # is stored where it can be installed into associated initramfs rootfs. STAGING_VERITY_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/dm-verity" +# Define the data block size to use in veritysetup. +DM_VERITY_IMAGE_DATA_BLOCK_SIZE ?= "1024" + # Process the output from veritysetup and generate the corresponding .env # file. The output from veritysetup is not very machine-friendly so we need to # convert it to some better format. Let's drop the first line (doesn't contain@@ -57,7 +60,7 @@ verity_setup() { # Let's drop the first line of output (doesn't contain any useful info) # and feed the rest to another function. - veritysetup --data-block-size=1024 --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity + veritysetup --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} --hash-offset=$SIZE format $OUTPUT $OUTPUT | tail -n +2 | process_verity } VERITY_TYPES = "ext2.verity ext3.verity ext4.verity btrfs.verity"