mbox series

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

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

Message

Moteen Shah Sept. 19, 2025, 9:38 a.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.

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 image in the bootflow.
If in case GRUB is not able to find this initrd image, it won't
result in a hard failure unless the modules packaged inside the
initrd were boot essential to begin with, in which case the boot
process will halt[0] or might run into kernel panic.

Furthermore, this series adds the initrd image for all K3 platforms
regardless of whether any platform chooses to add modules to
it or not, so as to keep the bootflow for all K3 devices uniform.
Hence, the build/packaging of initrd image is being triggered
in k3.inc.

Boot tests:
[0]Without initrd am62axx: http://serenity.dal.design.ti.com:7777/dejagozune.yaml
[1]With initrd including TPS6594_I2C module: http://serenity.dal.design.ti.com:7777/rarupuwalo.yaml
[2]J721e: http://serenity.dal.design.ti.com:7777/ovicodemud.yaml

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
    initrd
  recipes-ti: initrd: Make minimal initrd image
  meta-ti-bsp: wic: Add a new GRUB config for TI platforms
  meta-ti-bsp: conf: machine: include: Build initrd 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       |  8 ++-
 meta-ti-bsp/conf/machine/include/ti-soc.inc   |  2 +
 .../initrd/packagegroup-ti-initrd.bb          |  5 ++
 .../recipes-ti/initrd/ti-initrd-image.bb      | 50 +++++++++++++++++++
 meta-ti-bsp/wic/sdimage-2part-efi.wks.in      |  2 +-
 meta-ti-bsp/wic/ti-grub.cfg                   |  9 ++++
 9 files changed, 83 insertions(+), 2 deletions(-)
 create mode 100644 meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb
 create mode 100644 meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
 create mode 100644 meta-ti-bsp/wic/ti-grub.cfg