Kconfig: Add a new DISTRO_DEFAULTS Kconfig option
PATCH v2 1/1 Kconfig: Add a new DISTRO_DEFAULTS Kconfig option
DISTRO_DEFAULTS is intended to mirror / replaceinclude/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.
---
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
--- Kconfig | 17 +++++++++++++++++ arch/arm/Kconfig | 9 --------- common/Kconfig | 1 + doc/README.distro | 6 ++++++ 4 files changed, 24 insertions(+), 9 deletions(-)
Kconfig +17 -0
@@ -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
arch/arm/Kconfig +0 -9
@@ -584,16 +584,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
@@ -601,7 +593,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
common/Kconfig +1 -0
@@ -99,6 +99,7 @@ endmenu config BOOTDELAY int "delay in seconds before automatically booting" + default 2 if DISTRO_DEFAULTS default 0 help Delay before automatically running bootcmd;
doc/README.distro +6 -0
@@ -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: ------------------------------------------------------------
Signature · 1 line
2.7.4
PATCH v2 1/1 Kconfig: Add a new DISTRO_DEFAULTS Kconfig option
Quoted 15 lines · Hans de Goede
DISTRO_DEFAULTSis intended to mirror / replaceinclude/config_distro_defaults.h.The intend is for boards which include this file to select this from their
Kconfigfiles and when moving setting toKconfigwhich are #define-ed inconfig_distro_defaults.hto select this fromDISTRO_DEFAULTSso that boards which have selectedDISTRO_DEFAULTSwill 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.hbecause they have been converted toKconfig, with the exception ofCMD_ELFandCMD_NET, which have a default of y, if the default of these ever changes they should be selected byDISTRO_DEFAULTStoo.
Quoted 4 lines
For testing and example purposes this commit also converts
ARCH_SUNXIto useDISTRO_DEFAULTinstead of selecting everything it needs itself.Signed-off-by Hans de Goede <[email protected]>
After dropping the BOOTDELAY change (default is now 2), applied to u-boot/master, thanks!
Signature · 8 lines
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/20160619/b6065977/attachment.sig>