Add a simple named Linux ramdisk blob type to binman, activated by the
"LINUX_INITRD" make variable. No processing is done on the blob.

Signed-off-by: Alexey Charkov <[email protected]>
---
 Makefile                           |  1 +
 tools/binman/etype/linux_initrd.py | 23 +++++++++++++++++++++++
 tools/binman/missing-blob-help     |  5 +++++
 3 files changed, 29 insertions(+)

diff --git a/Makefile b/Makefile
index 246efa2c23be..81f49b791e6f 100644
--- a/Makefile
+++ b/Makefile
@@ -1693,6 +1693,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if 
$(BINMAN_DEBUG),-D) \
                -a atf-bl1-path=${BL1} \
                -a atf-bl31-path=${BL31} \
                -a linux-kernel-path=${LINUX_KERNEL} \
+               -a linux-initrd-path=${LINUX_INITRD} \
                -a tee-os-path=${TEE} \
                -a ti-dm-path=${TI_DM} \
                -a opensbi-path=${OPENSBI} \
diff --git a/tools/binman/etype/linux_initrd.py 
b/tools/binman/etype/linux_initrd.py
new file mode 100644
index 000000000000..9603bc279c26
--- /dev/null
+++ b/tools/binman/etype/linux_initrd.py
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2026 Flipper FZCO
+#
+# Entry-type module for a Linux initramfs/initrd binary blob
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+
+class Entry_linux_initrd(Entry_blob_named_by_arg):
+    """Linux initramfs (initrd) image blob
+
+    Properties / Entry arguments:
+        - linux-initrd-path: Filename of file to read into entry. This is
+            typically a compressed cpio archive (e.g. initramfs.cpio.gz).
+
+    This entry allows binman FIT templates to consume an initramfs provided via
+    a make variable, similar to how the kernel is passed to linux-kernel. It is
+    optional: when no path is supplied the entry is simply dropped.
+    """
+
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node, 'linux-initrd', required=False)
+        self.external = True
diff --git a/tools/binman/missing-blob-help b/tools/binman/missing-blob-help
index c8c56e3ad9b5..818060919399 100644
--- a/tools/binman/missing-blob-help
+++ b/tools/binman/missing-blob-help
@@ -32,6 +32,11 @@ If CONFIG_WDT_K3_RTI_LOAD_FW is enabled, a firmware image is 
needed for
 the R5F core(s) to trigger the system reset. One possible source is
 https://github.com/siemens/k3-rti-wdt.
 
+linux-initrd:
+An initramfs to embed in a Falcon mode FIT image, so that the OS can be
+started from SPL without a root filesystem being available yet. This is
+optional; build with LINUX_INITRD=/path/to/initramfs.cpio.gz to include one.
+
 linux-kernel:
 A Linux kernel image is required to build a Falcon mode FIT image, which
 lets SPL start the OS directly instead of U-Boot proper. Build with

-- 
2.54.0

Reply via email to