All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randolph Sapp <rs@ti.com>
To: Bryan Brattlof <bb@ti.com>
Cc: Moteen Shah <m-shah@ti.com>, <meta-arago@lists.yoctoproject.org>,
	<vigneshr@ti.com>, <u-kumar1@ti.com>,
	<linux-patch-review@list.ti.com>, <reatmon@ti.com>,
	<a-limaye@ti.com>, <n-francis@ti.com>, <praneeth@ti.com>,
	<jm@ti.com>
Subject: Re: [meta-arago] [meta-ti][PATCH 1/1 v2] recipes-ti: initramfs: Make minimal initrd image
Date: Wed, 10 Sep 2025 12:27:25 -0500	[thread overview]
Message-ID: <DCPAPBQCNVXL.1R2WJFQB6JA24@ti.com> (raw)
In-Reply-To: <20250910114838.62ar3wxtkmtcjfqm@bryanbrattlof.com>

On Wed Sep 10, 2025 at 6:48 AM CDT, Bryan Brattlof wrote:
> On September  9, 2025 thus sayeth Randolph Sapp:
>> On Tue Sep 9, 2025 at 9:56 AM CDT, Bryan Brattlof via lists.yoctoproject.org wrote:
>> > On September  4, 2025 thus sayeth Moteen Shah:
>> >> Add recipes to make initramfs image based on systemd.
>> >> The image will package boot essential and other modules
>> >> which will be modprobed by initramfs udev once the inbuilt
>> >> drivers gets probed.
>> >> 
>> >> Signed-off-by: Moteen Shah <m-shah@ti.com>
>> >> ---
>> >>  .../initramfs/packagegroup-ti-initramfs.bb    |  5 ++
>> >>  .../recipes-ti/initramfs/ti-tiny-initramfs.bb | 49 +++++++++++++++++++
>> >>  2 files changed, 54 insertions(+)
>> >>  create mode 100644 meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-initramfs.bb
>> >>  create mode 100644 meta-ti-bsp/recipes-ti/initramfs/ti-tiny-initramfs.bb
>> >> 
>> >> diff --git a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-initramfs.bb
>> >> new file mode 100644
>> >> index 00000000..5d2ff390
>> >> --- /dev/null
>> >> +++ b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-initramfs.bb
>> >> @@ -0,0 +1,5 @@
>> >> +SUMMARY = "Minimal initramfs for boot requirements"
>> >> +
>> >> +require recipes-core/packagegroups/packagegroup-core-boot.bb
>> >> +
>> >> +RDEPENDS:${PN}:remove = "grub-efi kernel"
>> >> diff --git a/meta-ti-bsp/recipes-ti/initramfs/ti-tiny-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/ti-tiny-initramfs.bb
>> >> new file mode 100644
>> >> index 00000000..4cebf595
>> >> --- /dev/null
>> >> +++ b/meta-ti-bsp/recipes-ti/initramfs/ti-tiny-initramfs.bb
>> >> @@ -0,0 +1,49 @@
>> >> +SUMMARY = "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
>> >> +
>> >> +IMAGE_FEATURES:remove = "package-management"
>> >> +
>> >> +INITRAMFS_FSTYPES = "cpio cpio.xz"
>> >> +
>> >> +#INITRAMFS_MAXSIZE = "65536"
>> >> +#IMAGE_OVERHEAD_FACTOR = "1"
>> >> +
>> >> +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
>> >> +
>> >> +INITRAMFS_SCRIPTS ?= "initramfs-framework-base initramfs-module-udev initramfs-module-nfsrootfs"
>> >> +
>> >> +MODULES = "\
>> >> +    kernel-module-cdns-pltfrm \
>> >> +    kernel-module-ti-j721e-ufs \
>> >> +    kernel-module-tps6594-i2c \
>> >> +"
>> >
>> > Are these all the modules we'll need? Is everything else build-in the 
>> > default defconfig? or are we expecting this list to expand as more 
>> > platforms start migrating to this?
>> >
>> > ~Bryan
>> 
>> Should this instead be defined per machine with
>> MACHINE_ESSENTIAL_EXTRA_RDEPENDS?
>> 
>> https://docs.yoctoproject.org/ref-manual/variables.html#term-MACHINE_ESSENTIAL_EXTRA_RDEPENDS
>
> Yeah, I guess what I'm slowly realizing is we're adding roughly a 140MB 
> binary to the critical path for the bootloaders (so long any boot KPI) 
> all so we can have a PMIC driver as a builtin.
>
> All the distributions I can think of all modify the ARM64 defconfig in 
> some way to better suit their distribution. Yocto even has the advantage 
> of knowing what target they are building for. Should we instead carry a 
> fragment, or use some other mechanism, to change the kernel's config so 
> the PMIC driver is a builtin if needed by the target?
>
> ~Bryan

Use of conditional configs is simply reverting back to the schemes we were using
3+ years ago. Initramfs is big and slow, but it's standard and can be leveraged
across other distros easily as it's already been a production solution for them
for quite some time.

That being said, Yocto is *unique*, and what it doesn't do weird itself, it
leaves for the implementer to make weird in their own way. I guess it doesn't
really matter if we don't care about having a uniform bootflow across distros,
but that sounds like hell.

- Randolph


  reply	other threads:[~2025-09-10 17:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 12:43 [meta-ti][PATCH 0/1 v2] Add recipes to build initramfs image Moteen Shah
2025-09-04 12:43 ` [meta-ti][PATCH 1/1 v2] recipes-ti: initramfs: Make minimal initrd image Moteen Shah
2025-09-05  5:52   ` Anshul Dalal
2025-09-09 14:56   ` Bryan Brattlof
2025-09-09 20:30     ` [meta-arago] " Randolph Sapp
2025-09-10 11:48       ` Bryan Brattlof
2025-09-10 17:27         ` Randolph Sapp [this message]
2025-09-10 19:32           ` Bryan Brattlof
2025-09-12  9:42             ` Moteen Shah
2025-09-17 18:16               ` Randolph Sapp
2025-09-04 12:45 ` [meta-ti][PATCH 0/1 v2] Add recipes to build initramfs image PRC Automation

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCPAPBQCNVXL.1R2WJFQB6JA24@ti.com \
    --to=rs@ti.com \
    --cc=a-limaye@ti.com \
    --cc=bb@ti.com \
    --cc=jm@ti.com \
    --cc=linux-patch-review@list.ti.com \
    --cc=m-shah@ti.com \
    --cc=meta-arago@lists.yoctoproject.org \
    --cc=n-francis@ti.com \
    --cc=praneeth@ti.com \
    --cc=reatmon@ti.com \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.