Hello Masami,

On Wed, Apr 29, 2026 at 05:27:21PM +0900, Masami Hiramatsu wrote:
> On Fri, 17 Apr 2026 08:38:16 -0700
> Breno Leitao <[email protected]> wrote:
> > On Fri, Apr 17, 2026 at 10:44:36AM +0900, Masami Hiramatsu wrote:
> > > On Wed, 15 Apr 2026 03:51:11 -0700
> > > Breno Leitao <[email protected]> wrote:
> > >
> > > But if we can do it, should we continue using bootconfig? I mean
> > > it is easy to make a tool (or add a feature in tools/bootconfig)
> > > which converts bootconfig file to command line string and embeds
> > > it in the kernel. Hmm.
> >
> > Sure, you are talking about a a tool that embeddeds it in the kernel binary,
> > something like:
> >
> >
> > 0) Get a kernel and define CONFIG_BOOT_CONFIG_EMBED_FILE=".bootconfig"
> >
> > 1) Add an option in tools/bootconfig to convert bootconfig (.bootconfig)
> >    to a cmdline string ($ bootconfig -C kernel .bootconfig).
> >    Something like:
> >    # tools/bootconfig/bootconfig -C kernel .bootconfig
> >      mem=2G loglevel=7 debug nokaslr %
> >
> > 2) At kernel build time, run that tool on .bootconfig and embed the
> >    resulting string into the kernel image as a .init.rodata symbol
> >    (embedded_kernel_cmdline[]).
> >
> >    # gdb -batch -ex 'x/s &embedded_kernel_cmdline' vmlinux
> >    0xffffffff87e108f8:    "mem=2G loglevel=7 debug nokaslr "

> Yeah, I think this looks good to me.

Thank you for the feedback. I've begun working on the bootconfig patches
following the approach outlined in Step 1 above. Note that I've
simplified the -C option by removing the "kernel" argument mentioned in
the earlier example.

The patch series is available here:

https://lore.kernel.org/all/[email protected]/

I appreciate your continued support.
--breno

Reply via email to