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

> > 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.

Ok, I've uploaded the patch to:
(to avoid posting it again).

After applying it, config can be used in these two new forms:

1 - As always, but giving a binary kernel to it:
$ config -s /usr/src/sys -b /tmp/obj /netbsd

2 - Or to extract the configuration file:
$ config -x > /tmp/MYKERNEL              (uses /netbsd)
$ config -x /onetbsd > /tmp/OLDKERNEL

(see manpage changes for more details).

Can anybody review it?  (I guess some things may be improved a bit)
I would like to commit this.

> >            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".

After patching config, we should remove that from options(4) maybe ;)


Julio M. Merino Vidal <>
The NetBSD Project -