Skip to contentSkip to conversation

dmverity: Make use of DATA_BLOCK_SIZE variable in initrdscript.

PATCH In review Paulo Neves 2 participants 2 messages Sep 23, 2021 – Sep 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmverity: Make use of DATA_BLOCK_SIZE variable in initrdscript.

From: Christer Fletcher <[email protected]>

DATA_BLOCK_SIZE variable was set in dm-verity-img.bbclass at build time but the initrdscript was not updated to pass the DATA_BLOCK_SIZE to the veritysetup. Now the functionality is complete.

---
 recipes-core/initrdscripts/initramfs-framework-dm/dmverity | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-core/initrdscripts/initramfs-framework-dm/dmverity +2 -1
index 888052c..c815940 100644
@@ -6,6 +6,7 @@ dmverity_enabled() {
 
 dmverity_run() {
     DATA_SIZE="__not_set__"
+    DATA_BLOCK_SIZE="__not_set__"
     ROOT_HASH="__not_set__"
 
     . /usr/share/misc/dm-verity.env
@@ -49,7 +50,7 @@ dmverity_run() {
     done
 
     veritysetup \
-        --data-block-size=1024 \
+        --data-block-size=${DATA_BLOCK_SIZE} \
         --hash-offset=${DATA_SIZE} \
         create rootfs \
         ${RDEV} \
Signature · 1 line
2.25.1
#1 lore raw

merged.

Quoted 41 lines · Paulo Neves

From: Christer Fletcher <[email protected]>

DATA_BLOCK_SIZE variable was set in dm-verity-img.bbclass at build time but the initrdscript was not updated to pass the DATA_BLOCK_SIZE to the veritysetup. Now the functionality is complete.

---
 recipes-core/initrdscripts/initramfs-framework-dm/dmverity | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-core/initrdscripts/initramfs-framework-dm/dmverity +2 -2
index 888052c..c815940 100644
@@ -6,6 +6,7 @@ dmverity_enabled() {
 
 dmverity_run() {
     DATA_SIZE="__not_set__"
+    DATA_BLOCK_SIZE="__not_set__"
     ROOT_HASH="__not_set__"
 
     . /usr/share/misc/dm-verity.env
@@ -49,7 +50,7 @@ dmverity_run() {
     done
 
     veritysetup \
-        --data-block-size=1024 \
+        --data-block-size=${DATA_BLOCK_SIZE} \
         --hash-offset=${DATA_SIZE} \
         create rootfs \
         ${RDEV} \
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#54813): https://lists.yoctoproject.org/g/yocto/message/54813
Mute This Topic: https://lists.yoctoproject.org/mt/85817076/3616698
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-