repart: Make verity example more useful

Add Minimize= so the size gets calculated correctly and add a verity
signature partition as well for completeness.
This commit is contained in:
Daan De Meyer
2023-08-23 21:53:40 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 9541addff0
commit 799cd3100b

View File

@@ -831,10 +831,10 @@ SizeMaxBytes=64M
</example>
<example>
<title>Create a data and verity partition from a OS tree</title>
<title>Create a data partition and corresponding verity partitions from a OS tree</title>
<para>Assuming we have an OS tree at /var/tmp/os-tree that we want to package in a root partition
together with a matching verity partition, we can do so as follows:</para>
together with matching verity partitions, we can do so as follows:</para>
<para><programlisting># 50-root.conf
[Partition]
@@ -842,6 +842,7 @@ Type=root
CopyFiles=/var/tmp/os-tree
Verity=data
VerityMatchKey=root
Minimize=guess
</programlisting></para>
<para><programlisting># 60-root-verity.conf
@@ -852,6 +853,14 @@ VerityMatchKey=root
# Explicitly set the hash and data block size to 4K
VerityDataBlockSizeBytes=4096
VerityHashBlockSizeBytes=4096
Minimize=best
</programlisting></para>
<para><programlisting># 70-root-verity-sig.conf
[Partition]
Type=root-verity-sig
Verity=signature
VerityMatchKey=root
</programlisting></para>
</example>