[U-Boot] [PATCH v3] Kconfig: Add a new DISTRO_DEFAULTS Kconfig option

Tom Rini trini at konsulko.com
Tue Jun 21 15:23:41 CEST 2016


On Tue, Jun 21, 2016 at 11:22:38AM +0900, Masahiro Yamada wrote:
> 2016-06-21 6:16 GMT+09:00 Hans de Goede <hdegoede at redhat.com>:
> > DISTRO_DEFAULTS is intended to mirror / replace
> > include/config_distro_defaults.h.
> >
> > The intend is for boards which include this file to select this from
> > their Kconfig files and when moving setting to Kconfig which are #define-ed
> > in config_distro_defaults.h to select this from DISTRO_DEFAULTS so that
> > boards which have selected DISTRO_DEFAULTS will keep the same configuration
> > as before without needing any defconfig file changes.
> >
> > The initial list of selected things matches all settings recently removed
> > from config_distro_defaults.h because they have been converted to Kconfig,
> > with the exception of CMD_ELF and CMD_NET, which have a default of y, if
> > the default of these ever changes they should be selected by DISTRO_DEFAULTS
> > too.
> >
> > For testing and example purposes this commit also converts ARCH_SUNXI
> > to use DISTRO_DEFAULT instead of selecting everything it needs itself.
> >
> > Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> > ---
> > Changes in v2:
> > -Use "default y if ARCH_SUNXI" instead of selecting DISTRO_DEFAULT for sunxi
> > -Document how to enable DISTRO_DEFAULT in doc/README.distro
> > Changes in v3:
> > -Rebase on latest master
> > ---
> >  Kconfig           | 17 +++++++++++++++++
> >  arch/arm/Kconfig  |  9 ---------
> >  doc/README.distro |  6 ++++++
> >  3 files changed, 23 insertions(+), 9 deletions(-)
> >
> > diff --git a/Kconfig b/Kconfig
> > index 817f4f0..3ceff25 100644
> > --- a/Kconfig
> > +++ b/Kconfig
> > @@ -53,6 +53,23 @@ config CC_OPTIMIZE_FOR_SIZE
> >
> >           This option is enabled by default for U-Boot.
> >
> > +config DISTRO_DEFAULTS
> > +       bool "Select defaults suitable for booting general purpose Linux distributions"
> > +       default y if ARCH_SUNXI
> 
> 
> 
> If we want to allow users to disable distro,
> and do not want ARCH_SUNXI appear in a generic config entry,
> perhaps we can do like this.
> 
> 
> config ARCH_SUNXI
>        bool
>        select ARCH_SUPPORTS_DISTRO
> 
> 
> config DISTRO_DEFAULTS
>        bool "Select defaults suitable for booting general purpose
> Linux distributions"
>        default y if ARCH_SUPPORTS_DISTRO
> 
> 
> 
> Currently it is just fine,
> but we might want to do something in the future
> when we have more platforms to migrate to this way...
> 
> config DISTRO_DEFAULTS
>      bool "Select defaults suitable for booting general purpose Linux
> distributions"
>      default y if (ARCH_SUNXI || ARCH_TEGRA || ARCH_HISI || ARCH_ZYNQMP ... )

I suppose that in the long run we'll want to move towards adding in many
SUPPORTS_xxx type things to make there be less possible merge conflicts
in the main Kconfig files.  We may even want to introduce CONFIG_EXPERT
and make certain things default unless that's set as we have both the
use case of "bring up a new board, easily, that does what I mean" and "I
need my board to be as compact as possible" and even "I know exactly
what I do and don't want enabled".

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160621/040d88ce/attachment.sig>


More information about the U-Boot mailing list