[U-Boot] content in a defconfig file versus in a header file -- clarification?
Robert P. J. Day
rpjday at crashcourse.ca
Tue Apr 9 11:00:19 UTC 2019
i'm rewriting a bunch of u-boot tutorial pages (publicly available
if anyone wants to read them), and i want to clarify the proper
location to put configuration content -- a defconfig file versus a
header file -- knowing that the trend lately has been to move content
into defconfig files where appropriate, so some potentially trivial
questions.
first, each defconfig file represents the configuration for a
single, specific target board, so that, in an ideal world, any
"CONFIG_" Kbuild settings for that board should be placed there,
correct? the exception would be any content that is in some way common
across a family of closely-related boards but, other than that,
configuration "OPTIONS", as defined in the README file, belong in the
board's defconfig file.
i ask since, unsurprisingly, there are exceptions. for example,
CONFIG_ENV_SIZE is a popular config setting, defined in env/Kconfig
(and other Kconfig files), so one would think that that setting should
be set in the defconfig files. but for the most part, the majority of
settings are in the include/configs/*.h header files.
as a specific example, consider the bubblegum 96 board. its
defconfig file does not set that Kconfig variable; rather, it's set in
include/configs/bubblegum_96.h. it still works fine, of course, but
according to current U-Boot standards, would that properly be in the
defconfig file? (i have no intention of trying to clean any of that
up, just wanting to clarify best practices.)
thanks.
rday
p.s. of course settings like that would belong in any "common" header
file covering multiple boards, such as tegra-common.h, zynq-common.h
and so on.
More information about the U-Boot
mailing list