Subject: Re: Allow config extract embedded configuration files
To: Julio Merino <>
From: Frederick Bruckman <>
List: tech-userlevel
Date: 04/14/2003 10:51:06
On Mon, 14 Apr 2003, Julio Merino wrote:

> On Mon, 14 Apr 2003 09:43:22 -0500 (CDT)
> Frederick Bruckman <> wrote:
> > Clearly, we need something like that. Otherwise, what's the point of
> > embedding the file? I'd find it more useful if it could recover the
> > original file, to update it for newer sources or to tweak it, than to
> I usually don't change the configuration of my kernel between builds,
> so I could feel happy by just running config on the binary to just
> update it. Although we may provide a flag, say -x (extract), that takes
> a kernel and writes the configuration file for further editing.

I'd like that.

> > configure with the live kernel directly, though. For what it's worth,
> > this is what I've used:
> >
> > 	strings /netbsd \
> >         |awk '/^_CFG_/ {sub(/_CFG_/,""); gsub(/\\011/,"	"); print}'
> >
> > (the character between the second pair of double-quotes should be an
> > actual tab-character.)
> Or, as said in options(4):
>      by the config file itself, e.g.  GENERIC.local or std.$MACHINE.  The em-
>      bedded config file can be extracted from the resulting kernel by the fol-
>      lowing command:
>            strings netbsd | sed -n 's/^_CFG_//p' | unvis

Huh. When I was looking for that, I never expected to find it *there*;
I was expecting it to be an option to "config".