mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
e02ee2548a
When Kconfig for U-boot was examined, one of the biggest issues was how to support multiple images (Normal, SPL, TPL). There were actually two options, "single .config" and "multiple .config". After some discussions and thought experiments, I chose the latter, i.e. to create ".config", "spl/.config", "tpl/.config" for Normal, SPL, TPL, respectively. It is true that the "multiple .config" strategy provided us the maximum flexibility and helped to avoid duplicating CONFIGs among Normal, SPL, TPL, but I have noticed some fatal problems: [1] It is impossible to share CONFIG options across the images. If you change the configuration of Main image, you often have to adjust some SPL configurations correspondingly. Currently, we cannot handle the dependencies between them. It means one of the biggest advantages of Kconfig is lost. [2] It is too painful to change both ".config" and "spl/.config". Sunxi guys started to work around this problem by creating a new configuration target. Commitcbdd9a9737
(sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.) added "make *_felconfig" to enable CONFIG_SPL_FEL on both images. Changing the configuration of multiple images in one command is a generic demand. The current implementation cannot propose any good solution about this. [3] Kconfig files are getting ugly and difficult to understand. Commitb724bd7d63
(dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files. [4] The build system got more complicated than it should be. To adjust Linux-originated Kconfig to U-Boot, the helper script "scripts/multiconfig.sh" was introduced. Writing a complicated text processor is a shell script sometimes caused problems. Now I believe the "single .config" will serve us better. With it, all the problems above would go away. Instead, we will have to add some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM, but we will not have much. Anyway, this is what we do now in scripts/Makefile.spl. I admit my mistake with my apology and this commit switches to the single .config configuration. It is not so difficult to do that: - Remove unnecessary processings from scripts/multiconfig.sh This file will remain for a while to support the current defconfig format. It will be removed after more cleanups are done. - Adjust some makefiles and Kconfigs - Add some entries to include/config_uncmd_spl.h and the new file scripts/Makefile.uncmd_spl. Some CONFIG options that are not supported on SPL must be disabled because one .config is shared between SPL and U-Boot proper going forward. I know this is not a beautiful solution and I think we can do better, but let's see how much we will have to describe them. - update doc/README.kconfig More cleaning up patches will follow this. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
177 lines
4.9 KiB
Plaintext
177 lines
4.9 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see Documentation/kbuild/kconfig-language.txt.
|
|
#
|
|
mainmenu "U-Boot $UBOOTVERSION Configuration"
|
|
|
|
config UBOOTVERSION
|
|
string
|
|
option env="UBOOTVERSION"
|
|
|
|
# Allow defaults in arch-specific code to override any given here
|
|
source "arch/Kconfig"
|
|
|
|
menu "General setup"
|
|
|
|
config LOCALVERSION
|
|
string "Local version - append to U-Boot release"
|
|
depends on !SPL_BUILD
|
|
help
|
|
Append an extra string to the end of your U-Boot version.
|
|
This will show up on your boot log, for example.
|
|
The string you set here will be appended after the contents of
|
|
any files with a filename matching localversion* in your
|
|
object and source tree, in that order. Your total string can
|
|
be a maximum of 64 characters.
|
|
|
|
config LOCALVERSION_AUTO
|
|
bool "Automatically append version information to the version string"
|
|
depends on !SPL_BUILD
|
|
default y
|
|
help
|
|
This will try to automatically determine if the current tree is a
|
|
release tree by looking for git tags that belong to the current
|
|
top of tree revision.
|
|
|
|
A string of the format -gxxxxxxxx will be added to the localversion
|
|
if a git-based tree is found. The string generated by this will be
|
|
appended after any matching localversion* files, and after the value
|
|
set in CONFIG_LOCALVERSION.
|
|
|
|
(The actual string used here is the first eight characters produced
|
|
by running the command:
|
|
|
|
$ git rev-parse --verify HEAD
|
|
|
|
which is done within the script "scripts/setlocalversion".)
|
|
|
|
config CC_OPTIMIZE_FOR_SIZE
|
|
bool "Optimize for size"
|
|
depends on !SPL_BUILD
|
|
default y
|
|
help
|
|
Enabling this option will pass "-Os" instead of "-O2" to gcc
|
|
resulting in a smaller U-Boot image.
|
|
|
|
This option is enabled by default for U-Boot.
|
|
|
|
config SYS_MALLOC_F
|
|
bool "Enable malloc() pool before relocation"
|
|
default 0x400
|
|
help
|
|
Before relocation memory is very limited on many platforms. Still,
|
|
we can provide a small malloc() pool if needed. Driver model in
|
|
particular needs this to operate, so that it can allocate the
|
|
initial serial device and any others that are needed.
|
|
|
|
config SYS_MALLOC_F_LEN
|
|
hex "Size of malloc() pool before relocation"
|
|
depends on SYS_MALLOC_F
|
|
default 0x400
|
|
help
|
|
Before relocation memory is very limited on many platforms. Still,
|
|
we can provide a small malloc() pool if needed. Driver model in
|
|
particular needs this to operate, so that it can allocate the
|
|
initial serial device and any others that are needed.
|
|
|
|
menuconfig EXPERT
|
|
bool "Configure standard U-Boot features (expert users)"
|
|
help
|
|
This option allows certain base U-Boot options and settings
|
|
to be disabled or tweaked. This is for specialized
|
|
environments which can tolerate a "non-standard" U-Boot.
|
|
Only use this if you really know what you are doing.
|
|
|
|
endmenu # General setup
|
|
|
|
menu "Boot images"
|
|
|
|
config SUPPORT_SPL
|
|
bool
|
|
|
|
config SUPPORT_TPL
|
|
bool
|
|
|
|
config SPL
|
|
bool
|
|
depends on SUPPORT_SPL
|
|
prompt "Enable SPL" if !SPL_BUILD
|
|
default y if SPL_BUILD
|
|
help
|
|
If you want to build SPL as well as the normal image, say Y.
|
|
|
|
config TPL
|
|
bool
|
|
depends on SPL && SUPPORT_TPL
|
|
prompt "Enable TPL" if !SPL_BUILD
|
|
default y if TPL_BUILD
|
|
default n
|
|
help
|
|
If you want to build TPL as well as the normal image and SPL, say Y.
|
|
|
|
config FIT
|
|
bool "Support Flattened Image Tree"
|
|
depends on !SPL_BUILD
|
|
help
|
|
This option allows to boot the new uImage structrure,
|
|
Flattened Image Tree. FIT is formally a FDT, which can include
|
|
images of various types (kernel, FDT blob, ramdisk, etc.)
|
|
in a single blob. To boot this new uImage structure,
|
|
pass the the address of the blob to the "bootm" command.
|
|
|
|
config FIT_VERBOSE
|
|
bool "Display verbose messages on FIT boot"
|
|
depends on FIT
|
|
|
|
config FIT_SIGNATURE
|
|
bool "Enable signature verification of FIT uImages"
|
|
depends on FIT
|
|
depends on DM
|
|
select RSA
|
|
help
|
|
This option enables signature verification of FIT uImages,
|
|
using a hash signed and verified using RSA.
|
|
See doc/uImage.FIT/signature.txt for more details.
|
|
|
|
config SYS_EXTRA_OPTIONS
|
|
string "Extra Options (DEPRECATED)"
|
|
depends on !SPL_BUILD
|
|
help
|
|
The old configuration infrastructure (= mkconfig + boards.cfg)
|
|
provided the extra options field. If you have something like
|
|
"HAS_BAR,BAZ=64", the optional options
|
|
#define CONFIG_HAS
|
|
#define CONFIG_BAZ 64
|
|
will be defined in include/config.h.
|
|
This option was prepared for the smooth migration from the old
|
|
configuration to Kconfig. Since this option will be removed sometime,
|
|
new boards should not use this option.
|
|
|
|
config SYS_TEXT_BASE
|
|
depends on SPARC || ARC
|
|
hex "Text Base"
|
|
help
|
|
TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
|
|
|
|
config SYS_CLK_FREQ
|
|
depends on ARC
|
|
int "CPU clock frequency"
|
|
help
|
|
TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
|
|
|
|
endmenu # Boot images
|
|
|
|
source "common/Kconfig"
|
|
|
|
source "dts/Kconfig"
|
|
|
|
source "net/Kconfig"
|
|
|
|
source "drivers/Kconfig"
|
|
|
|
source "fs/Kconfig"
|
|
|
|
source "lib/Kconfig"
|
|
|
|
source "test/Kconfig"
|