Re: [PATCH 2/2] bootconfig: Apply early options from embedded config

From: Petr Malat
Date: Thu Nov 23 2023 - 04:51:32 EST


Hi!

On Wed, Nov 22, 2023 at 02:47:30PM -0800, Randy Dunlap wrote:
> > +Early options may be specified only in the embedded bootconfig, because
> > +they are processed before the initrd.
> > +
>
> I'm confused by which options are early options. Are they specified or
> described somewhere?
> How does a user know which options are "early" options?
This is not user friendly at all, I was thinking about emitting a warning
when early option is being configured from initrd, but that would require
one iteration over .init.setup section for every option present in initrd
just to show the warning.

Better idea would be to write a script, which extracts this info from
vmlinux.o and adds it to bootconfig userspace utility. Of course this makes
the utility tied to particular kernel version and configuration
combination, but for distributions it's reasonably safe with no overhead
during boot.

> > + size_t embeded_size;
> > + int ret, pos;
>
> It hurts my eyes to see "embeded" here.
Thanks, I will fix it in the next version.
Petr