]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Kconfig: Add a new DISTRO_DEFAULTS Kconfig option
authorHans de Goede <hdegoede@redhat.com>
Mon, 20 Jun 2016 21:16:28 +0000 (23:16 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 21 Jun 2016 01:30:13 +0000 (21:30 -0400)
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@redhat.com>
Kconfig
arch/arm/Kconfig
doc/README.distro

diff --git a/Kconfig b/Kconfig
index 817f4f08a02f0806a0d1d63c04e0e1e6829abf07..3ceff250321e2d3c50575939f100317369247d49 100644 (file)
--- 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
+       default n
+       select CMD_BOOTZ
+       select CMD_DHCP
+       select CMD_EXT2
+       select CMD_EXT4
+       select CMD_FAT
+       select CMD_FS_GENERIC
+       select CMD_MII
+       select CMD_PING
+       select HUSH_PARSER
+       help
+         Select this to enable various options and commands which are suitable
+         for building u-boot for booting general purpose Linux distributions.
+
 config SYS_MALLOC_F
        bool "Enable malloc() pool before relocation"
        default y if DM
index f48be96928ea2df5daaf37ed2a641a3b10e4f762..e9d2fc9845c5300f0dbd56765c84390283ff943a 100644 (file)
@@ -610,16 +610,8 @@ config TARGET_CM_T43
 
 config ARCH_SUNXI
        bool "Support sunxi (Allwinner) SoCs"
-       select CMD_BOOTZ
-       select CMD_DHCP
-       select CMD_EXT2
-       select CMD_EXT4
-       select CMD_FAT
-       select CMD_FS_GENERIC
        select CMD_GPIO
-       select CMD_MII
        select CMD_MMC if MMC
-       select CMD_PING
        select CMD_USB
        select DM
        select DM_ETH
@@ -627,7 +619,6 @@ config ARCH_SUNXI
        select DM_KEYBOARD
        select DM_SERIAL
        select DM_USB
-       select HUSH_PARSER
        select OF_BOARD_SETUP
        select OF_CONTROL
        select OF_SEPARATE
index e1b72161521fa8728fde85955ef102b81e19ae22..77d5c6d4d56f90f6ba1ed237ca3927901f47d936 100644 (file)
@@ -162,6 +162,12 @@ U-Boot Implementation
 Enabling the distro options
 ---------------------------
 
+In your board's defconfig, enable the DISTRO_DEFAULTS option by adding
+a line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this
+from Kconfig itself, for e.g. all boards using a specific SoC then
+add a "default y if ARCH_FOO" to the DISTRO_DEFAULTS section of
+the Kconfig file in the root of the u-boot sources.
+
 In your board configuration file, include the following:
 
 ------------------------------------------------------------