The initramfs does not need grub-efi or the /boot directory since it does not have to boot the system itself. So create a version of the tiny-image that strips those out and follow the oe-core methodology for initramfs.
Signed-off-by: Ryan Eatmon <[email protected]> --- .../classes/remove-boot-dir.bbclass | 8 ++++++ .../images/tisdk-tiny-initramfs.bb | 26 +++++++++++++++++++ .../packagegroup-arago-initramfs.bb | 4 +++ 3 files changed, 38 insertions(+) create mode 100644 meta-arago-distro/classes/remove-boot-dir.bbclass create mode 100644 meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb create mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb diff --git a/meta-arago-distro/classes/remove-boot-dir.bbclass b/meta-arago-distro/classes/remove-boot-dir.bbclass new file mode 100644 index 00000000..bd0c09fc --- /dev/null +++ b/meta-arago-distro/classes/remove-boot-dir.bbclass @@ -0,0 +1,8 @@ +# Add a ROOTFS_POSTPROCESS_COMMAND that will remove some files from the +# rootfs for initramfs images. + +ROOTFS_POSTPROCESS_COMMAND += "remove_boot_dir;" + +remove_boot_dir () { + rm -rf ${IMAGE_ROOTFS}/boot +} diff --git a/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb b/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb new file mode 100644 index 00000000..0bea8276 --- /dev/null +++ b/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb @@ -0,0 +1,26 @@ +SUMMARY = "Arago TI SDK super minimal base image for initramfs" + +DESCRIPTION = "Image meant for basic boot of linux kernel. Intended as\ + bare system, this image does not package the kernel in the\ + standard /boot folder in rootfs. Instead, it provides a base\ + rootfs allowing kernel to be deployed elsewhere\ + (tftp/separate boot partition/jtag log etc..) and boot\ + the image.\ +" + +LICENSE = "MIT" + +inherit core-image +inherit remove-boot-dir + +IMAGE_FEATURES:remove = "package-management" + +INITRAMFS_FSTYPES = "cpio cpio.xz" +INITRAMFS_MAXSIZE = "65536" +IMAGE_OVERHEAD_FACTOR = "1" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" + +PACKAGE_INSTALL = "packagegroup-arago-initramfs" + +export IMAGE_BASENAME = "tisdk-tiny-initramfs" diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb new file mode 100644 index 00000000..380cc0e3 --- /dev/null +++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb @@ -0,0 +1,4 @@ + +require recipes-core/packagegroups/packagegroup-core-boot.bb + +RDEPENDS:${PN}:remove = "grub-efi kernel" -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14821): https://lists.yoctoproject.org/g/meta-arago/message/14821 Mute This Topic: https://lists.yoctoproject.org/mt/100547168/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/leave/10763299/21656/89520264/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
