Re: tracing : bootconfig : Early boot config for non intrd systems

From: Masami Hiramatsu
Date: Sat Mar 12 2022 - 01:54:08 EST


Hello Padmanabha,

On Wed, 9 Mar 2022 20:06:51 +0100
Padmanabha Srinivasaiah <treasure4paddy@xxxxxxxxx> wrote:

> On Wed, Mar 09, 2022 at 05:01:24PM +0900, Masami Hiramatsu wrote:
> > On Tue, 8 Mar 2022 18:48:29 +0100
> > Padmanabha Srinivasaiah <treasure4paddy@xxxxxxxxx> wrote:
> >
> > > Hello Masami Hiramatsu,
> > >
> > > On Tue, Mar 08, 2022 at 04:36:00PM +0900, Masami Hiramatsu wrote:
> > > > Hello Padmanabha,
> > > >
> > > > On Mon, 7 Mar 2022 19:40:11 +0100
> > > > Padmanabha Srinivasaiah <treasure4paddy@xxxxxxxxx> wrote:
> > > >
> > > > > Hello Masami Hiramatsu,
> > > > >
> > > > > Thanks for detailed explanation on boot time tracing using early boot configuration file.
> > > > > https://linuxfoundation.org/wp-content/uploads/boottrace-LF-live-2021-update.pdf
> > > > >
> > > > > Also for https://lwn.net/Articles/806002/.
> > > > >
> > > > > Latter link also states we can embed boot config into the kernel image for non intrd based system.
> > > >
> > > > Ah, that was an original plan, but since no one interested in, I didn't implement it.
> > > > So we still need the initrd for bootconfig.
> > > >
> > > Ok.
> > > > >
> > > > > I tried searching mailing lists not able to find pointer for same.
> > > > >
> > > > > A hint/pointer on how-to will be very helpful.
> > > >
> > > > BTW, what is your problem, could you share your use-case?
> > > >
> > >
> > > I have hetrogenous system which donot use intrd.
> > >
> > > The use-case is to capture __system wide__ event based tracing for
> > > boot-up sequence, which also covers early stage of default init programs
> > > used.
> > >
> > > As buffer size is limited, will have hand-picked events set configured.
> >
> > Hm, so I guess you will boot linux from your custom bootloader (or binary loader on sub processor?).
> >
> Yes, customised implemation which loads linux.
>
> > Can you even try to add a dummy initrd? or are you OK to rebuild kernel for embedding the bootconfig data?
> Yes, re-building the kernel image to appended bootconfig data is feasable option.
>

OK, please try below patch. You can embed your bootconfig in the kernel via
CONFIG_EMBED_BOOT_CONFIG_FILE.