summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2026-01-09 12:08:14 -0600
committerRyan Eatmon <reatmon@ti.com>2026-01-12 15:01:47 -0600
commit54ce94f577ce469941078b1ac272f6a4c60bebba (patch)
treef69ef025499cef9b97714319a3bd931ed54d8523 /meta-ti-bsp
parent270b7b64452679fdd3d83963ce468a89de86be21 (diff)
downloadmeta-ti-54ce94f577ce469941078b1ac272f6a4c60bebba.tar.gz
ti-core-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. Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp')
-rw-r--r--meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb12
-rw-r--r--meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb33
2 files changed, 22 insertions, 23 deletions
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 @@
1SUMMARY = "Minimal initramfs for boot requirements" 1SUMMARY = "Minimal initramfs for boot requirements"
2 2
3require recipes-core/packagegroups/packagegroup-core-boot.bb 3LICENSE = "MIT"
4
5PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7inherit packagegroup
4 8
5TI_INITRAMFS_KERNEL_MODULES ?= "" 9TI_INITRAMFS_KERNEL_MODULES ?= ""
6 10
7RDEPENDS:${PN} += "\ 11RDEPENDS:${PN} += "\
8 ${TI_INITRAMFS_KERNEL_MODULES} \ 12 ${TI_INITRAMFS_KERNEL_MODULES} \
13 ${VIRTUAL-RUNTIME_base-utils} \
14 base-passwd \
9 initramfs-framework-base \ 15 initramfs-framework-base \
10 initramfs-module-udev \ 16 initramfs-module-udev \
11 initramfs-module-nfsrootfs \ 17 initramfs-module-nfsrootfs \
12 nfs-utils \
13 nfs-utils-client \
14" 18"
15
16RDEPENDS:${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\
7 7
8LICENSE = "MIT" 8LICENSE = "MIT"
9 9
10inherit core-image 10INITRAMFS_FSTYPES = "cpio cpio.xz"
11
12IMAGE_NAME = "ti-core-initramfs"
13
14IMAGE_NAME_SUFFIX = ""
15 11
16IMAGE_FEATURES:remove = "package-management" 12INITRAMFS_MAXSIZE = "65536"
17 13
18INITRAMFS_FSTYPES = "cpio cpio.xz" 14IMAGE_NAME = "ti-core-initramfs"
19 15
20IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" 16export IMAGE_BASENAME = "${IMAGE_NAME}"
21 17
22PACKAGE_INSTALL = "packagegroup-ti-core-initramfs" 18PACKAGE_INSTALL = "packagegroup-ti-core-initramfs"
23 19
24export IMAGE_BASENAME = "${IMAGE_NAME}" 20# Ensure the initramfs only contains the bare minimum
21IMAGE_FEATURES = ""
22IMAGE_LINGUAS = ""
25 23
26IMAGE_OVERHEAD_FACTOR = "1.1" 24# on the kernel image.
25PACKAGE_EXCLUDE = "kernel-image-*"
26
27IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
28IMAGE_NAME_SUFFIX ?= ""
29IMAGE_ROOTFS_SIZE = "8192"
30IMAGE_ROOTFS_EXTRA_SPACE = "0"
27 31
28# To further reduce the size of the rootfs, remove the /boot directory from 32inherit image
29# the final image this is usually done by adding RDEPENDS_kernel-base = ""
30# in the configuration file. In our case we can't use this method. Instead we
31# just wipe out the content of "/boot" before creating the image.
32ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
33empty_boot_dir () {
34 rm -rf ${IMAGE_ROOTFS}/boot/*
35}