Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH next 1/3] fs/common.mk: add optional hook to build a verity hash tree
@ 2026-08-31 12:51 Fiona Klute via buildroot
  2026-08-31 12:51 ` [Buildroot] [PATCH next 2/3] fs/squashfs: add option to build verity tree Fiona Klute via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Fiona Klute via buildroot @ 2026-08-31 12:51 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute (othermo GmbH)

From: "Fiona Klute (othermo GmbH)" <fiona.klute@gmx.de>

Using dm-verity may be useful for any read-only filesystem read from a
block device, the new hook will build the required hash tree if
enabled by a per-filesystem config option.

Signed-off-by: Fiona Klute (othermo GmbH) <fiona.klute@gmx.de>
---
The change is small, but it's a new feature, so I assume it's for next.
;-)

 fs/common.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/common.mk b/fs/common.mk
index 2f3f8bcc7e..794423476d 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -215,6 +215,15 @@ TARGETS_ROOTFS += rootfs-$(1)
 PACKAGES += $$(filter-out rootfs-%,$$(ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES))
 endif
 
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_VERITY),y)
+ROOTFS_$(2)_DEPENDENCIES += host-cryptsetup
+define ROOTFS_$(2)_VERITY_FORMAT
+	@$$(call MESSAGE,"Generating verity hash tree $$(@F).verity")
+	$(HOST_DIR)/sbin/veritysetup format --root-hash-file $$@.verity.root-hash $$@ $$@.verity
+endef
+ROOTFS_$(2)_POST_GEN_HOOKS += ROOTFS_$(2)_VERITY_FORMAT
+endif
+
 # Check for legacy POST_TARGETS rules
 ifneq ($$(ROOTFS_$(2)_POST_TARGETS),)
 $$(error Filesystem $(1) uses post-target rules, which are no longer supported.\
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-01 12:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 12:51 [Buildroot] [PATCH next 1/3] fs/common.mk: add optional hook to build a verity hash tree Fiona Klute via buildroot
2026-08-31 12:51 ` [Buildroot] [PATCH next 2/3] fs/squashfs: add option to build verity tree Fiona Klute via buildroot
2026-08-31 12:51 ` [Buildroot] [PATCH next 3/3] support/testing/tests/fs/test_squashfs.py: add test with dm-verity Fiona Klute via buildroot
2026-08-31 19:16 ` [Buildroot] [PATCH next 1/3] fs/common.mk: add optional hook to build a verity hash tree Peter Korsgaard
2026-08-31 21:10   ` Fiona Klute via buildroot
2026-09-01  6:41     ` Peter Korsgaard
2026-09-01 10:26       ` Fiona Klute via buildroot
2026-09-01 11:38         ` Peter Korsgaard
2026-09-01 12:53           ` Fiona Klute via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox