All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: David Rientjes <rientjes@google.com>
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	"Luis R. Rodriguez" <mcgrof@suse.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel
Date: Wed, 6 Aug 2014 17:04:14 -0700	[thread overview]
Message-ID: <20140807000414.GA17455@jtriplet-mobl1> (raw)
In-Reply-To: <alpine.DEB.2.02.1408061637110.13545@chino.kir.corp.google.com>

On Wed, Aug 06, 2014 at 04:37:54PM -0700, David Rientjes wrote:
> On Wed, 6 Aug 2014, Josh Triplett wrote:
> > On Wed, Aug 06, 2014 at 03:38:56PM -0700, David Rientjes wrote:
> > > On Wed, 6 Aug 2014, Josh Triplett wrote:
> > > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> > > > index 1568678..2b5ca16 100644
> > > > --- a/arch/x86/Makefile
> > > > +++ b/arch/x86/Makefile
> > > > @@ -257,6 +257,10 @@ PHONY += kvmconfig
> > > >  kvmconfig:
> > > >  	$(call mergeconfig,kvm_guest)
> > > >  
> > > > +PHONY += tinyconfig
> > > > +tinyconfig: allnoconfig
> > > 
> > > Calling allnoconfig here makes "make tinyconfig" default to CONFIG_X86_32 
> > > even on 64 bit platforms and the caller would need to explicitly do
> > > "make ARCH=x86_64 tinyconfig" to avoid it.  It's not clear that this is 
> > > intended from the documentation of tinyconfig, that tiniest == 32 bit by 
> > > default.
> > 
> > Calling allnoconfig was quite intentional; this is intended to be the
> > smallest possible configuration, and unlike kvmconfig (which modifies an
> > existing configuration to make it suitable for a KVM guest), this
> > intentionally creates a specific new configuration from scratch.
> > 
> > 32-bit produces a far smaller kernel than 64-bit, so having that as the
> > default for tinyconfig seems quite appropriate.  As you showed, it's
> > easy enough to override it if needed.  I'd expect many potential users
> > of tinyconfig for embedded systems to start with tinyconfig and then
> > immediately use menuconfig to enable a pile of additional options.
> 
> In that case, any reason to make tinyconfig x86 only?

The set of configuration options may vary by architecture.  For
instance, NOHIGHMEM only exists on x86.  So, at a minimum, different
architectures will require different versions of tiny.config.

The target itself and the common options could theoretically be shared,
but that would require splitting the configuration, and it isn't obvious
where the non-arch-specific tiny.config would live.  There doesn't
appear to be any precedent for that kind of setup; only x86 has a
configuration other than defconfigs (specifically, kvm_guest.config).  I
don't think it's likely that new targets like this will pop up often in
the future, either.

Nonetheless, I could modify scripts/kconfig/Makefile to add this target
instead, if someone has a good suggestion for where the
non-arch-specific tiny.config should live.  (kernel/configs/ ?)

- Josh Triplett

  reply	other threads:[~2014-08-07  0:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:14 [PATCH] x86: Add "make tinyconfig" to configure the tiniest possible kernel Josh Triplett
2014-08-06 22:06 ` David Rientjes
2014-08-06 22:24   ` Josh Triplett
2014-08-06 22:30     ` [PATCH 1/2] x86, platform, kconfig: move kvmconfig functionality to a helper Josh Triplett
2014-08-06 22:33       ` David Rientjes
2014-08-06 22:39         ` Josh Triplett
2014-08-06 22:42           ` David Rientjes
2014-08-06 22:31     ` [PATCH 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel Josh Triplett
2014-08-06 22:38       ` David Rientjes
2014-08-06 22:49         ` Josh Triplett
2014-08-06 23:37           ` David Rientjes
2014-08-07  0:04             ` Josh Triplett [this message]
2014-08-07 16:03       ` Sam Ravnborg
2014-08-07 19:02         ` Josh Triplett
2014-08-07 19:38           ` Sam Ravnborg
2014-08-09  0:07           ` [PATCH v3 1/2] x86, platform, kconfig: move kvmconfig functionality to a helper Josh Triplett
2014-08-09  0:10           ` [PATCH v3 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel Josh Triplett
2014-08-09  1:22             ` Linus Torvalds
2014-08-11 18:15               ` josh
2014-08-11 19:36                 ` Sam Ravnborg
2014-08-15  0:55                   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140807000414.GA17455@jtriplet-mobl1 \
    --to=josh@joshtriplett.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=mingo@redhat.com \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.