dm-verity-upstream: Add dynamic layer for meta-security dm-verity

Add an optional dynamic layer enabling dm-verity block-level integrity
verification of the root filesystem for TI K3 platforms, using
meta-security's stock dm-verity mechanism as-is. Requires meta-security
to be present in bblayers.conf.

dm-verity hashes the rootfs at build time; at boot, a dedicated
initramfs loads the root hash and the kernel checks every block read
against it. Set DM_VERITY_IMAGE to enable all the verity-related
recipes for that image; other images build as usual.

Signed-off-by: Atharv Dubey <a-dubey@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
This commit is contained in:
Atharv Dubey authored and Ryan Eatmon committed 2026-10-14 10:50:48 -05:00
1 parent 711918d173
commit 5d316e87e0
2 files changed
+10

No files matched your search

+3
View File
@@ -21,6 +21,7 @@ LAYERRECOMMENDS_meta-ti-bsp = " \
multimedia-layer \
openembedded-layer \
tpm-layer \
security \
"
BBFILES_DYNAMIC += " \
@@ -28,6 +29,8 @@ BBFILES_DYNAMIC += " \
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/recipes*/*/*.bbappend \
tpm-layer:${LAYERDIR}/dynamic-layers/tpm-layer/recipes*/*/*.bb \
tpm-layer:${LAYERDIR}/dynamic-layers/tpm-layer/recipes*/*/*.bbappend \
security:${LAYERDIR}/dynamic-layers/security-layer/recipes*/*/*.bb \
security:${LAYERDIR}/dynamic-layers/security-layer/recipes*/*/*.bbappend \
"
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
+7
View File
@@ -64,3 +64,10 @@ TI_WKS_BOOTLOADER_APPEND ?= "console=${KERNEL_CONSOLE}"
do_image_wic[depends] += "virtual/bootloader:do_deploy"
SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS0"
# dm-verity protects the rootfs listed in DM_VERITY_IMAGE; see dynamic-layers/security-layer/conf/include/dm-verity-upstream.inc for what that turns on.
DM_VERITY_IMAGE ??= ""
DM_VERITY_UPSTREAM_INCLUDE = "${@'dynamic-layers/security-layer/conf/include/dm-verity-upstream.inc' if d.getVar('DM_VERITY_IMAGE') else ''}"
require ${DM_VERITY_UPSTREAM_INCLUDE}