Subject: Re: Allow config extract embedded configuration files
To: Julio Merino <jmmv@menta.net>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-userlevel
Date: 04/14/2003 09:43:22
On Mon, 14 Apr 2003, Julio Merino wrote:

> as kernel files can contain embedded configuration files (with options
> INCLUDE_CONFIG_FILE or INCLUDE_JUST_CONFIG), I think it could be good
> if config(8) could automatically extract them and configure a new
> kernel based on that information.
>
> I've got a patch that does it (see below).  I feel it's not very polished
> and several things can be improved, but I don't know which ones are they.
>
> Is it there any interest in this?  Comments?

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

Frederick