Skip to contentSkip to conversation

tisdk-tiny-initramfs: Shrink size of initramfs

PATCH In review Ryan Eatmon 2 participants 2 messages Jan 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tisdk-tiny-initramfs: Shrink size of initramfs

It looks like we were modelling this initramfs off of the wrong example from poky. This setup produces a much smaller initramfs.

---
 .../images/tisdk-tiny-initramfs.bb            | 33 ++++++++++---------
 1 file changed, 17 insertions(+), 16 deletions(-)
meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb +17 -16
index 157248e1..c1c1f358 100644
@@ -10,26 +10,27 @@ DESCRIPTION = "Image meant for basic boot of linux kernel. Intended as\
 
 LICENSE = "MIT"
 
-inherit core-image
+INITRAMFS_FSTYPES = "cpio cpio.xz"
 
-IMAGE_FEATURES:remove = "package-management"
+INITRAMFS_MAXSIZE = "65536"
 
-INITRAMFS_FSTYPES = "cpio cpio.xz"
+export IMAGE_BASENAME = "tisdk-tiny-initramfs${ARAGO_IMAGE_SUFFIX}"
 
-INITRAMFS_MAXSIZE = "200000"
-IMAGE_OVERHEAD_FACTOR = "1.3"
+INITRAMFS_SCRIPTS ?= "initramfs-framework-base initramfs-module-udev"
 
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd"
 
-PACKAGE_INSTALL = "packagegroup-arago-initramfs"
+# Ensure the initramfs only contains the bare minimum
+IMAGE_FEATURES = ""
+IMAGE_LINGUAS = ""
 
-export IMAGE_BASENAME = "tisdk-tiny-initramfs${ARAGO_IMAGE_SUFFIX}"
+# Don't allow the initramfs to contain a kernel, as kernel modules will depend
+# 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
Signature · 1 line
2.43.0
#1 lore raw

meta-arago / na / 20260109181111.2501386-1-reatmon

PRC Results: PASS

=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed

=========================================================
apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-arago][master][PATCH] tisdk-tiny-initramfs: Shrink size of initramfs
- Submitter: From: Ryan Eatmon <[email protected]>
- Date: Date: Fri, 9 Jan 2026 12:11:11 -0600
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 55d496da7cb536b3338e0bd171e9da8b3b07114e

Applied to:
- Repository: lcpd-prc-meta-arago
- Base Branch: master-next
- Commit Author: Ryan Eatmon <[email protected]>
- Commit Subject: libdrm: Remove upstreamed patch
- Commit SHA: 8c190b1e4f6a53ea641ba9d6150ef873f561c706

Patches
----------------------------------------
All patches applied

=========================================================
check-yocto-repo: PASS
=========================================================
master
=====================
PASS

=========================================================
yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed