From: Scott Wood <scottwood@freescale.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Lijun Pan <LIJUN.PAN@FREESCALE.COM>, linuxppc-dev@ozlabs.org
Subject: Re: powerpc/defconfig: new way of writing defconfig
Date: Tue, 21 Apr 2015 13:30:18 -0500 [thread overview]
Message-ID: <1429641018.4352.105.camel@freescale.com> (raw)
In-Reply-To: <20150421061539.78B071401F6@ozlabs.org>
On Tue, 2015-04-21 at 16:15 +1000, Michael Ellerman wrote:
> On Sat, 2015-18-04 at 04:47:21 UTC, Lijun Pan wrote:
> > It is always a headache dealing with different defconfigs
> > though they only differ in few places. Hence we are proposing a new
> > way of writing defconfig:
>
> So on the whole this is looking promising, some comments ...
>
> > 1. Define a basic defconfig say mpc85xx_basic_defconfig
>
> Why can't we just use mpc85xx_defconfig ?
It seems like it would be good not to redefine the meaning of existing
names.
> > 2. Spin off as much features as possible from mpc85xx_defconfig
> > and create a separate config file, say, kvm_guest.config
>
> > Every time we add a new feature, we don't need to change several
> > defconfigs, we just add a new *.config
We shouldn't do this for every new feature. That would end up with way
too many config fragments. There should only be a handful based on
logical groupings and/or things that are very commonly enabled/disabled.
If the user wants more fine-grained control that's what menuconfig is
for.
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index fc502e0..590b441 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -269,6 +269,23 @@ bootwrapper_install:
> > %.dtb: scripts
> > $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
> >
> > +define domerge
> > + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh $(srctree)/.config $(srctree)/arch/powerpc/configs/$(1).config
> > +endef
>
> Please look at mergeconfig in scripts/kconfig/Makefile. This needs to:
> - deal with objtree/srctree
> - run oldconfig
> - can you call it mergeconfig
oldconfig should be handled by the rules that call this depending on a
file-based defconfig.
I chose domerge to avoid conflicting with the later definition of
mergeconfig in scripts/kconfig/mergeconfig (might not be an actual
problem, but reusing names makes it harder to follow what's going on).
I do think we should be calling scripts/kconfig/mergeconfig, as I
previously suggested, instead of hardcoding this. E.g. that would allow
non-arch-specific fragments in kernel/configs/ rather than only looking
in arch/powerpc/configs.
>
> > +mpc85xx_defconfig: mpc85xx_basic_defconfig
> > + @:
> > +
> > +mpc85xx_smp_defconfig: mpc85xx_basic_defconfig
> > + $(call domerge,smp)
> > + $(call domerge,kvm_guest)
> > +
> > +corenet32_smp_defconfig: corenet32_basic_defconfig
> > + $(call domerge,smp)
> > +
> > +corenet64_smp_defconfig: corenet64_basic_defconfig
> > + $(call domerge,smp)
>
> Can these be further consolidated into a corenet_defconfig and then a 32-bit
> and 64-bit config?
A lot of things depend on 32 versus 64 bit so I was hesitant to set that
later (though in theory I guess it should be doable). I was thinking
the "basic" defconfig would be truly basic, with a common
corenet .config that turns on drivers and such.
> > diff --git a/arch/powerpc/configs/kvm_guest.config b/arch/powerpc/configs/kvm_guest.config
> > new file mode 100644
> > index 0000000..615b0a0
> > --- /dev/null
> > +++ b/arch/powerpc/configs/kvm_guest.config
> > @@ -0,0 +1,2 @@
> > +CONFIG_KVM_GUEST=y
> > +CONFIG_PPC_QEMU_E500=y
>
> This isn't a general "kvm_guest" config, ie. we don't want that enabled on
> 64-bit guest kernels. So can you call it kvm_e500.config or something.
s/64-bit/book3s/
I guess the issue here is that the symbol is defined inside an "if",
rather than with a depends, so kconfig will raise an error rather than
silently ignore it on book3s builds?
-Scott
next prev parent reply other threads:[~2015-04-21 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 4:47 [PATCH] powerpc/defconfig: new way of writing defconfig Lijun Pan
2015-04-21 6:15 ` Michael Ellerman
2015-04-21 18:30 ` Scott Wood [this message]
2015-04-21 20:07 ` [PATCH] " Scott Wood
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=1429641018.4352.105.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=LIJUN.PAN@FREESCALE.COM \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).