1
0
Fork 0
remarkable-uboot/scripts
Masahiro Yamada e02ee2548a kconfig: switch to single .config configuration
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.  Commit cbdd9a9737 (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.
  Commit b724bd7d63 (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>
2015-02-24 17:06:23 -05:00
..
basic kconfig: switch to Kconfig 2014-07-30 08:48:03 -04:00
kconfig kconfig: Fix warning "‘jump’ may be used uninitialized" 2014-12-08 09:35:48 -05:00
.gitignore kernel-doc: move kernel-doc tools to scripts/ 2014-02-19 11:10:04 -05:00
Kbuild.include kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
Lindent scripts/Lindent: import from Linux 3.16 2014-08-21 12:01:29 -04:00
Makefile kconfig: switch to Kconfig 2014-07-30 08:48:03 -04:00
Makefile.autoconf kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
Makefile.build kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
Makefile.clean kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
Makefile.extrawarn kbuild: do not hide clang warnings during build with W=1 2014-11-04 15:01:56 -05:00
Makefile.host kbuild: improve multi-objs dependency and cleanups 2014-11-07 16:27:06 -05:00
Makefile.lib Align embedded device tree correctly 2014-11-25 06:33:58 -07:00
Makefile.spl kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
Makefile.uncmd_spl kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
binutils-version.sh scripts: fix binutils-version.sh for 'as' without a package. 2015-01-08 11:00:45 -05:00
checkpatch.pl checkpatch: remove unnecessary + after {8,8} 2014-09-25 09:31:24 -04:00
checkstack.pl Makefile: Move some scripts imported from Linux 2013-12-13 09:18:45 -05:00
cleanpatch Makefile: Move some scripts imported from Linux 2013-12-13 09:18:45 -05:00
docproc.c cosmetic: kbuild: clean-up coding style (sync with Linux 3.16-rc1) 2014-06-20 11:56:26 -04:00
dtc-version.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
fill_scrapyard.py scripts: add a utility to fill blank fields of doc/README.scrapyard 2015-01-14 10:58:49 -05:00
gcc-stack-usage.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
gcc-version.sh kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
get_maintainer.pl get_maintainer.pl: fix source tree detection 2014-12-08 09:35:41 -05:00
kernel-doc kbuild: sync misc scripts with Linux 3.18-rc1 2014-11-07 16:27:07 -05:00
ld-version.sh kbuild: sync with Linux Kernel v3.15-rc1 2014-04-18 11:43:36 -04:00
mailmapper tools, scripts: refactor error-out statements of Python scripts 2014-08-21 12:01:11 -04:00
mkmakefile kbuild: Make scripts executable 2014-11-12 13:25:42 -05:00
multiconfig.sh kconfig: switch to single .config configuration 2015-02-24 17:06:23 -05:00
objdiff scripts: objdiff: sync with Linux 3.16 2014-08-21 12:01:11 -04:00
setlocalversion scripts: refetch scripts/setlocalversion from Linux 3.16 2014-08-28 17:18:48 -04:00
show-gnu-make scripts: add scripts/show-gnu-make to get GNU Make command name 2014-07-29 11:48:36 -04:00