diff mbox series

[meta-ti,master] ti-core-initramfs: Shrink size of initramfs

Message ID 20260109181018.2453840-1-reatmon@ti.com
State New
Headers show
Series [meta-ti,master] ti-core-initramfs: Shrink size of initramfs | expand

Commit Message

Ryan Eatmon Jan. 9, 2026, 6:10 p.m. UTC
It looks like we were modelling this initramfs off of the wrong example
from poky.  This setup produces a much smaller initramfs.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../packagegroup-ti-core-initramfs.bb         | 12 ++++---
 .../recipes-ti/initramfs/ti-core-initramfs.bb | 33 +++++++++----------
 2 files changed, 22 insertions(+), 23 deletions(-)

Comments

PRC Automation Jan. 9, 2026, 6:15 p.m. UTC | #1
meta-ti / na / 20260109181018.2453840-1-reatmon

PRC Results: FAIL

=========================================================
  check-yocto-patches: FAIL
=========================================================
Patches
----------------------------------------
FAIL - [meta-ti][master][PATCH] ti-core-initramfs: Shrink size of initramfs
    ERROR: Missing License-Update for change in LICENSE. (LICENSE-UPDATE-2)
        patch
    
    For details on the above errors/warnings visit: https://lists.yoctoproject.org/g/meta-ti/wiki/40887
diff mbox series

Patch

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 86b69aff..c759808c 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
@@ -1,16 +1,18 @@ 
 SUMMARY = "Minimal initramfs for boot requirements"
 
-require recipes-core/packagegroups/packagegroup-core-boot.bb
+LICENSE = "MIT"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit packagegroup
 
 TI_INITRAMFS_KERNEL_MODULES ?= ""
 
 RDEPENDS:${PN} += "\
     ${TI_INITRAMFS_KERNEL_MODULES} \
+    ${VIRTUAL-RUNTIME_base-utils} \
+    base-passwd \
     initramfs-framework-base \
     initramfs-module-udev \
     initramfs-module-nfsrootfs \
-    nfs-utils \
-    nfs-utils-client \
 "
-
-RDEPENDS:${PN}:remove = "grub-efi kernel"
diff --git a/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
index 1a102d82..223fef7a 100644
--- a/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
+++ b/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
@@ -7,29 +7,26 @@  DESCRIPTION = "Image meant to probe boot essential modules\
 
 LICENSE = "MIT"
 
-inherit core-image
-
-IMAGE_NAME = "ti-core-initramfs"
-
-IMAGE_NAME_SUFFIX = ""
+INITRAMFS_FSTYPES = "cpio cpio.xz"
 
-IMAGE_FEATURES:remove = "package-management"
+INITRAMFS_MAXSIZE = "65536"
 
-INITRAMFS_FSTYPES = "cpio cpio.xz"
+IMAGE_NAME = "ti-core-initramfs"
 
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+export IMAGE_BASENAME = "${IMAGE_NAME}"
 
 PACKAGE_INSTALL = "packagegroup-ti-core-initramfs"
 
-export IMAGE_BASENAME = "${IMAGE_NAME}"
+# Ensure the initramfs only contains the bare minimum
+IMAGE_FEATURES = ""
+IMAGE_LINGUAS = ""
 
-IMAGE_OVERHEAD_FACTOR = "1.1"
+# on the kernel image.
+PACKAGE_EXCLUDE = "kernel-image-*"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+IMAGE_NAME_SUFFIX ?= ""
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
-# To further reduce the size of the rootfs, remove the /boot directory from
-# the final image this is usually done by adding RDEPENDS_kernel-base = ""
-# in the configuration file. In our case we can't use this method. Instead we
-# just wipe out the content of "/boot" before creating the image.
-ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
-empty_boot_dir () {
-	rm -rf ${IMAGE_ROOTFS}/boot/*
-}
+inherit image