mbox series

[master,0/4,v3] Add recipes to build initramfs image

Message ID 20250930134131.1149453-1-m-shah@ti.com
Headers show
Series Add recipes to build initramfs image | expand

Message

Moteen Shah Sept. 30, 2025, 1:41 p.m. UTC
The series aims to add a new recipe which will package boot
essential and some other modules in image which can later be
used in the boot process of all K3 platforms. This will result
in the addition of ~20MB initramfs image in the bootflow.

The motivation behind the work is to probe modules(in boot time)
which could not be built in the upstream Linux kernel
image, as using it as inbuilt drivers will increase the
kernel image size, which is undesirable by the upstream folks.

Hence, build those drivers as modules and package it inside
initramfs and later get it probed through initramfs-udev(device manager).

The series will introduce an additional 20MB initramfs image in the
bootflow of all K3 platforms regardless of whether any platform chooses
to add modules to it or not, so as to keep the bootflow for all devices
uniform. Hence, the build/packaging of initrd image is being triggered
in k3.inc.

Boot tests for am62axx, am64xx, j721e:
[0]https://gist.github.com/Jamm02/17fd621af1612f42fdaf69d2d9884e70

Changes since V2:
Link: https://lists.yoctoproject.org/g/meta-ti/message/19043

- Changed initrd -> initramfs.
- Remove blanket change for grub.cfg and instead add the initramfs path only.
- Move utils and other includes to RDEPENDS instead of PACKAGE_INSTALL.

Changes since V1:
Link: https://lists.yoctoproject.org/g/meta-ti/topic/115128108

- Switch to a platform defined module variable instead of having a central one.
- Package initrd.cpio.xz(20 MB) instead of initrd.cpio (90 MB).
- Build the inird image and package it in boot partition only if mainline or
mainline next of the Linux kernel is being built.

Moteen Shah (4):
  meta-ti-bsp: conf: machine: include: Add common module variable for TI
    Initramfs image
  recipes-ti: initramfs: Make minimal initramfs image
  meta-ti-bsp: wic: Add initramfs path to to grub config
  meta-ti-bsp: conf: machine: include: Build initramfs for all K3
    platforms

 meta-ti-bsp/conf/machine/include/am62axx.inc  |  3 ++
 meta-ti-bsp/conf/machine/include/j721e.inc    |  3 ++
 meta-ti-bsp/conf/machine/include/j784s4.inc   |  3 ++
 meta-ti-bsp/conf/machine/include/k3.inc       |  7 +++-
 meta-ti-bsp/conf/machine/include/ti-soc.inc   |  2 ++
 .../packagegroup-ti-core-initramfs.bb         | 15 +++++++++
 .../recipes-ti/initramfs/ti-core-initramfs.bb | 33 +++++++++++++++++++
 meta-ti-bsp/wic/sdimage-2part-efi.wks.in      |  2 +-
 8 files changed, 66 insertions(+), 2 deletions(-)
 create mode 100644 meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
 create mode 100644 meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb