Subject: Re: Allow config extract embedded configuration files
To: Frederick Bruckman <>
From: Julio Merino <>
List: tech-userlevel
Date: 04/14/2003 17:34:13
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.

> 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


Julio M. Merino Vidal <>
The NetBSD Project -