Add DISTRO_FEATURES 'luks' check to automatically enable initramfs generation when LUKS encryption is requested. This follows the existing pattern for TI_CORE_INITRAMFS_KERNEL_MODULES.
Modify packagegroup-ti-core-initramfs to conditionally include the LUKS encryption module using dual gating - the module is included only when both 'luks' DISTRO_FEATURE and 'optee-ftpm' MACHINE_FEATURE are enabled. Signed-off-by: Shiva Tripathi <[email protected]> --- meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc | 2 +- .../recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc index 9d3cc612..15c05e04 100644 --- a/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc +++ b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc @@ -5,7 +5,7 @@ # TI_CORE_INITRAMFS_ENABLED = "0" # #------------------------------------------------------------------------------ -TI_CORE_INITRAMFS_ENABLED ?= "${@ '1' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') or d.getVar('TI_CORE_INITRAMFS_EXTRA_INSTALL') else '0'}" +TI_CORE_INITRAMFS_ENABLED ?= "${@ '1' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') or d.getVar('TI_CORE_INITRAMFS_EXTRA_INSTALL') or bb.utils.contains('DISTRO_FEATURES', 'luks', True, False, d) else '0'}" TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" TI_CORE_INITRAMFS_EXTRA_INSTALL ?= "" diff --git a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb index a9eff847..12713437 100644 --- a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb +++ b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb @@ -8,6 +8,8 @@ inherit packagegroup TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" +LUKS_ENCRYPTION ?= "${@bb.utils.contains('MACHINE_FEATURES', 'optee-ftpm', 'initramfs-module-luks-ftpm', '', d)}" + RDEPENDS:${PN} += "\ ${TI_CORE_INITRAMFS_KERNEL_MODULES} \ ${VIRTUAL-RUNTIME_base-utils} \ @@ -22,4 +24,5 @@ RDEPENDS:${PN} += "\ initramfs-module-udev \ initramfs-module-nfsrootfs \ nfs-utils-mount \ + ${@bb.utils.contains('DISTRO_FEATURES', 'luks', '${LUKS_ENCRYPTION}', '', d)} \ " -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19672): https://lists.yoctoproject.org/g/meta-ti/message/19672 Mute This Topic: https://lists.yoctoproject.org/mt/118173663/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
