Commit 9f823615af919c6b89f0b80197f009f78299dcde
Committed by
Tom Rini
1 parent
4257f5f8f6
Exists in
v2017.01-smarct4x
and in
25 other branches
Kconfig: Add a new DISTRO_DEFAULTS Kconfig option
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>
Showing 3 changed files with 23 additions and 9 deletions Side-by-side Diff
Kconfig
... | ... | @@ -53,6 +53,23 @@ |
53 | 53 | |
54 | 54 | This option is enabled by default for U-Boot. |
55 | 55 | |
56 | +config DISTRO_DEFAULTS | |
57 | + bool "Select defaults suitable for booting general purpose Linux distributions" | |
58 | + default y if ARCH_SUNXI | |
59 | + default n | |
60 | + select CMD_BOOTZ | |
61 | + select CMD_DHCP | |
62 | + select CMD_EXT2 | |
63 | + select CMD_EXT4 | |
64 | + select CMD_FAT | |
65 | + select CMD_FS_GENERIC | |
66 | + select CMD_MII | |
67 | + select CMD_PING | |
68 | + select HUSH_PARSER | |
69 | + help | |
70 | + Select this to enable various options and commands which are suitable | |
71 | + for building u-boot for booting general purpose Linux distributions. | |
72 | + | |
56 | 73 | config SYS_MALLOC_F |
57 | 74 | bool "Enable malloc() pool before relocation" |
58 | 75 | default y if DM |
arch/arm/Kconfig
... | ... | @@ -610,16 +610,8 @@ |
610 | 610 | |
611 | 611 | config ARCH_SUNXI |
612 | 612 | bool "Support sunxi (Allwinner) SoCs" |
613 | - select CMD_BOOTZ | |
614 | - select CMD_DHCP | |
615 | - select CMD_EXT2 | |
616 | - select CMD_EXT4 | |
617 | - select CMD_FAT | |
618 | - select CMD_FS_GENERIC | |
619 | 613 | select CMD_GPIO |
620 | - select CMD_MII | |
621 | 614 | select CMD_MMC if MMC |
622 | - select CMD_PING | |
623 | 615 | select CMD_USB |
624 | 616 | select DM |
625 | 617 | select DM_ETH |
... | ... | @@ -627,7 +619,6 @@ |
627 | 619 | select DM_KEYBOARD |
628 | 620 | select DM_SERIAL |
629 | 621 | select DM_USB |
630 | - select HUSH_PARSER | |
631 | 622 | select OF_BOARD_SETUP |
632 | 623 | select OF_CONTROL |
633 | 624 | select OF_SEPARATE |
doc/README.distro
... | ... | @@ -162,6 +162,12 @@ |
162 | 162 | Enabling the distro options |
163 | 163 | --------------------------- |
164 | 164 | |
165 | +In your board's defconfig, enable the DISTRO_DEFAULTS option by adding | |
166 | +a line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this | |
167 | +from Kconfig itself, for e.g. all boards using a specific SoC then | |
168 | +add a "default y if ARCH_FOO" to the DISTRO_DEFAULTS section of | |
169 | +the Kconfig file in the root of the u-boot sources. | |
170 | + | |
165 | 171 | In your board configuration file, include the following: |
166 | 172 | |
167 | 173 | ------------------------------------------------------------ |