diff mbox series

[master,v5,4/4] meta-ti-bsp: conf: machine: include: Build initramfs for all TI SoCs.

Message ID 20251015120032.288741-5-m-shah@ti.com
State New
Headers show
Series Add recipes to build initramfs image | expand

Commit Message

Moteen Shah Oct. 15, 2025, noon UTC
Trigger build for initramfs image and package it in the boot partition
of all TI SoC's whenever an image recipe is built with upstream
kernel(mainline or mainline-next).

Signed-off-by: Moteen Shah <m-shah@ti.com>
---
 meta-ti-bsp/conf/machine/include/ti-soc.inc | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/ti-soc.inc b/meta-ti-bsp/conf/machine/include/ti-soc.inc
index 1d18ceab..8d02cc79 100644
--- a/meta-ti-bsp/conf/machine/include/ti-soc.inc
+++ b/meta-ti-bsp/conf/machine/include/ti-soc.inc
@@ -28,4 +28,20 @@  CLASS_DEVICETREE_PREFIX = "${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICE
 KERNEL_CLASSES += "${CLASS_DEVICETREE_PREFIX}"
 IMAGE_CLASSES += "${CLASS_DEVICETREE_PREFIX}"
 
-TI_INITRAMFS_KERNEL_MODULES ?= ""
\ No newline at end of file
+TI_INITRAMFS_KERNEL_MODULES ?= ""
+
+BUILD_CORE_INITRAMFS_IMAGE = "ti-core-initramfs"
+BUILD_CORE_INITRAMFS_IMAGE_FILE = "${BUILD_CORE_INITRAMFS_IMAGE}.cpio.xz"
+
+BUILD_CORE_INITRAMFS_IMAGE_STEP ?= ""
+BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-mainline = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete"
+BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-next = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete"
+
+do_image_wic[depends] += "${BUILD_CORE_INITRAMFS_IMAGE_STEP}"
+
+TI_WKS_INITRAMFS ?= ""
+TI_WKS_INITRAMFS:bsp-mainline = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}"
+TI_WKS_INITRAMFS:bsp-next = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}"
+
+IMAGE_BOOT_FILES:append:bsp-mainline = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}"
+IMAGE_BOOT_FILES:append:bsp-next = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}"