All of lore.kernel.org
 help / color / mirror / Atom feed
* Cloning arch-independant KConfig
@ 2010-08-12 23:38 Joel Becker
  2010-08-13  1:20 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Becker @ 2010-08-12 23:38 UTC (permalink / raw)
  To: Sam Ravnborg, linux-kernel

Sam,
	I guess this is either a feature request or just wondering
whether KConfig supports this idea.
	Often I have a wonderful minimal .config that builds a test
kernel.  It only compiles the things I want in my kernel and modules,
nothing more.  Usually I start from a distro kernel and then keep
turning things off until I reach some minimum.
	However, when I get a new machine of a different architecture, I
can't bring that work forward.  If I take this .config to that arch, the
oldconfig just breaks.  I don't get good defaults for the arch-specific
stuff.  Conversely, if I start from a distro .config for the new arch, I
have to repeat all the whittle-down work.
	Is there any way to "extract" the non-arch-specific config
values?  Essentially, all the "use USB, build ext3, give me these
network cards" fields should be kept, but I want to start from a default
architecture config.

Joel

-- 

"Friends may come and go, but enemies accumulate." 
        - Thomas Jones

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning arch-independant KConfig
  2010-08-12 23:38 Cloning arch-independant KConfig Joel Becker
@ 2010-08-13  1:20 ` Sam Ravnborg
  2010-08-13  1:30   ` Joel Becker
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2010-08-13  1:20 UTC (permalink / raw)
  To: linux-kernel

On Thu, Aug 12, 2010 at 04:38:37PM -0700, Joel Becker wrote:
> Sam,
> 	I guess this is either a feature request or just wondering
> whether KConfig supports this idea.
> 	Often I have a wonderful minimal .config that builds a test
> kernel.  It only compiles the things I want in my kernel and modules,
> nothing more.  Usually I start from a distro kernel and then keep
> turning things off until I reach some minimum.
> 	However, when I get a new machine of a different architecture, I
> can't bring that work forward.  If I take this .config to that arch, the
> oldconfig just breaks.  I don't get good defaults for the arch-specific
> stuff.  Conversely, if I start from a distro .config for the new arch, I
> have to repeat all the whittle-down work.
> 	Is there any way to "extract" the non-arch-specific config
> values?  Essentially, all the "use USB, build ext3, give me these
> network cards" fields should be kept, but I want to start from a default
> architecture config.

Today there are a few ways you can do so already.
Say that you have saved away the known good one as "good", which is
a direct copy of your .config.

Then you can do for example:
KCONFIG_ALLCONFIG=good make alldefconfig

This will produce a config wich is almost equal to what you had before,
and with defaults for all new stuff.
I tested it where I used a sparc defconfig as input to a i386
config and it just worked.

Another possibility:
If you already have configured your kernel, but want to use
"good" but keep the settings for all the new stuff.
Then you can do:

cat .config good > new
mv new .config
make menuconfig

This will trigger a lot of override warnings - which you just ignore.
Resulting config is then mostly from "good".

We do not have a way to say "copy only non-arch specific settings".
So I hope the above is OK.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning arch-independant KConfig
  2010-08-13  1:20 ` Sam Ravnborg
@ 2010-08-13  1:30   ` Joel Becker
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Becker @ 2010-08-13  1:30 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

On Fri, Aug 13, 2010 at 03:20:52AM +0200, Sam Ravnborg wrote:
> Today there are a few ways you can do so already.
> Say that you have saved away the known good one as "good", which is
> a direct copy of your .config.
> 
> Then you can do for example:
> KCONFIG_ALLCONFIG=good make alldefconfig
> 
> This will produce a config wich is almost equal to what you had before,
> and with defaults for all new stuff.
> I tested it where I used a sparc defconfig as input to a i386
> config and it just worked.

	That seems pretty reasonable.

> cat .config good > new
> mv new .config
> make menuconfig
> 
> This will trigger a lot of override warnings - which you just ignore.
> Resulting config is then mostly from "good".

	The problem with this, which I've definitely done before, is I
never know what paths in menuconfig to look down.  The alldefconfig
choice seems saner because it provides a dirt-simple CPU setup.

Joel

-- 

"Can any of you seriously say the Bill of Rights could get through
 Congress today?  It wouldn't even get out of committee."
	- F. Lee Bailey

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-13  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 23:38 Cloning arch-independant KConfig Joel Becker
2010-08-13  1:20 ` Sam Ravnborg
2010-08-13  1:30   ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.