mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-06 11:32:38 +00:00
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>
This commit is contained in:
@@ -1,16 +1,18 @@
|
|||||||
SUMMARY = "Minimal initramfs for boot requirements"
|
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 ?= ""
|
TI_INITRAMFS_KERNEL_MODULES ?= ""
|
||||||
|
|
||||||
RDEPENDS:${PN} += "\
|
RDEPENDS:${PN} += "\
|
||||||
${TI_INITRAMFS_KERNEL_MODULES} \
|
${TI_INITRAMFS_KERNEL_MODULES} \
|
||||||
|
${VIRTUAL-RUNTIME_base-utils} \
|
||||||
|
base-passwd \
|
||||||
initramfs-framework-base \
|
initramfs-framework-base \
|
||||||
initramfs-module-udev \
|
initramfs-module-udev \
|
||||||
initramfs-module-nfsrootfs \
|
initramfs-module-nfsrootfs \
|
||||||
nfs-utils \
|
|
||||||
nfs-utils-client \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
RDEPENDS:${PN}:remove = "grub-efi kernel"
|
|
||||||
|
|||||||
@@ -7,29 +7,26 @@ DESCRIPTION = "Image meant to probe boot essential modules\
|
|||||||
|
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
|
|
||||||
inherit core-image
|
INITRAMFS_FSTYPES = "cpio cpio.xz"
|
||||||
|
|
||||||
|
INITRAMFS_MAXSIZE = "65536"
|
||||||
|
|
||||||
IMAGE_NAME = "ti-core-initramfs"
|
IMAGE_NAME = "ti-core-initramfs"
|
||||||
|
|
||||||
IMAGE_NAME_SUFFIX = ""
|
export IMAGE_BASENAME = "${IMAGE_NAME}"
|
||||||
|
|
||||||
IMAGE_FEATURES:remove = "package-management"
|
|
||||||
|
|
||||||
INITRAMFS_FSTYPES = "cpio cpio.xz"
|
|
||||||
|
|
||||||
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
|
|
||||||
|
|
||||||
PACKAGE_INSTALL = "packagegroup-ti-core-initramfs"
|
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-*"
|
||||||
|
|
||||||
# To further reduce the size of the rootfs, remove the /boot directory from
|
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
|
||||||
# the final image this is usually done by adding RDEPENDS_kernel-base = ""
|
IMAGE_NAME_SUFFIX ?= ""
|
||||||
# in the configuration file. In our case we can't use this method. Instead we
|
IMAGE_ROOTFS_SIZE = "8192"
|
||||||
# just wipe out the content of "/boot" before creating the image.
|
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||||
ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
|
|
||||||
empty_boot_dir () {
|
inherit image
|
||||||
rm -rf ${IMAGE_ROOTFS}/boot/*
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user