summaryrefslogtreecommitdiffstats
path: root/scripts/multiconfig.sh
Commit message (Collapse)AuthorAgeFilesLines
* kconfig: switch to single .config configurationMasahiro Yamada2015-02-241-254/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 cbdd9a9737cc (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 b724bd7d6349 (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>
* sunxi: Fix CONFIG_UART0_PORT_F build and add it to menuconfigSiarhei Siamashka2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The CONFIG_UART0_PORT_F option has been supported since http://git.denx.de/?p=u-boot.git;a=commit;h=ff2b47f6a9cc1025 This option is primarily useful only for low level u-boot debugging on tablets, where normal UART0 is difficult to access and requires device disassembly and/or soldering. This patch now allows it to be selected from menuconfig. A dependency on SPL_FEL is added because u-boot does not support booting from NAND yet and also booting from SD card is impossible when a MicroSD breakout board is plugged into the SD slot. Additionally a compilation problem is fixed: common/spl/built-in.o: In function `spl_mmc_load_image': /tmp/u-boot-sunxi/common/spl/spl_mmc.c:94: undefined reference to `mmc_initialize' /tmp/u-boot-sunxi/common/spl/spl_mmc.c:96: undefined reference to `find_mmc_device' /tmp/u-boot-sunxi/common/spl/spl_mmc.c:104: undefined reference to `mmc_init' scripts/Makefile.spl:206: recipe for target 'spl/u-boot-spl' failed Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* kbuild: Make scripts executableMasahiro Yamada2014-11-121-0/+0
| | | | | | | | | | The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. (This commit follows commit 06ed5c2bfaca of Linux Kernel) Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.Ian Campbell2014-11-051-0/+12
| | | | | | | | | | | | $ make BOARD_felconfig is more convenient than $ make BOARD_defconfig $ echo CONFIG_SPL_FEL=y >> .config $ echo CONFIG_SPL_FEL=y >> spl/.config Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* kconfig: invoke silentoldconfig if spl, tpl/.config is updatedMasahiro Yamada2014-10-231-0/+15
| | | | | | | | | | | | When spl/.config is updated by "make spl/menuconfig" or friends, spl/include/config/auto.conf, spl/include/generated/autoconf.h and some other files must be updated by "make silentoldconfig". There is no hook for SPL in the top Makefile, so this commit touches .config when spl/.config is updated to invoke silentoldconfig. Likewise for TPL. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* scripts/multiconfig.sh: Fix a typoYork Sun2014-10-101-1/+1
| | | | | | | | Fix the spelling of "configs". Signed-off-by: York Sun <yorksun@freescale.com> CC: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* multiconfig.sh: replace GNU sed specific matchJeroen Hofstee2014-10-101-2/+2
| | | | | | | | | | A SPL/TPL enabled target would was not recognized as such by BSD sed, since it relies on a GNU extension. Instead of or-ing just spell out both matches. Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kconfig: fix another bug of "make savedefconfig"Masahiro Yamada2014-10-101-0/+2
| | | | | | | | In some cases, the last lines of SPL or TPL are not output to a file. The entries remaining in the "unmatched" variable must be flushed. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* kconfig: add sanity checks for SPL configurationMasahiro Yamada2014-09-161-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the SPL configuration, "make <dir>/<target>" is used. Here, <dir> is either "spl" or "tpl" <target> is one of "config", "menuconfig", "xconfig", etc. This commit adds two checks: [1] If <dir> is given an unsupported subimage, the configuration should error out like this: $ make qpl/menuconfig *** *** "make qpl/menuconfig" is not supported. *** [2] Make sure that "CONFIG_SPL" is enabled in the ".config" before running "make spl/menuconfig. Otherwise, the SPL image is not built at all. Having "spl/.config" makes no sense. In such a case, the configuration should exit with a message: $ make spl/menuconfig *** *** Create ".config" with "CONFIG_SPL" enabled *** before "make spl/menuconfig". *** Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Suggested-by: Simon Glass <sjg@chromium.org>
* kconfig: show an error message when defconfig is not foundMasahiro Yamada2014-09-161-0/+7
| | | | | | | | | | | | | | When a non-existing defconfig is specified, display an easy-to-understand message (fake the error message on Linux Kernel): $ make foo_defconfig *** *** Can't find default configuration "confis/foo_defconfig"! *** Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* kconfig: fix savedefconfig to handle TPL correctlyMasahiro Yamada2014-09-161-3/+3
| | | | | | | | | | Since 3ff291f371fa9858426774f3732924bacb61ed1c (kconfig: convert Kconfig helper script into a shell script), "make savedefconfig" of TPL boards has not been working. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.o.rg Acked-by: Simon Glass <sjg@chromium.org>
* kconfig: fix whitespace handling bug of savedefconfigMasahiro Yamada2014-09-161-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | Commit 3ff291f371fa9858426774f3732924bacb61ed1c (kconfig: convert Kconfig helper script into a shell script) introduced another regression. Shell usually handles whitespaces as separators, so "make saveconfig" outputs # CONFIG_FOO is not set into: # CONFIG_FOO is not set Whitespaces should not be treated as separators here. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* kconfig: fix savedefconfig to output empty defconfigMasahiro Yamada2014-09-161-0/+1
| | | | | | | | | | | | Commit 3ff291f371fa9858426774f3732924bacb61ed1c (kconfig: convert Kconfig helper script into a shell script) introduced a minor regression. make alldefconfig; make savedefconfig should create an empty 'defconfig'. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* README.kconfig: document backward compatibility "make *_config"Masahiro Yamada2014-08-281-0/+1
| | | | | | | | | | Commit 3ff291f371fa9858426774f3732924bacb61ed1c (kconfig: convert Kconfig helper script into a shell script) restored "<board>_config" target for backward compatibility. It should be documented. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* kconfig: convert Kconfig helper script into a shell scriptMasahiro Yamada2014-08-221-0/+260
Commit 51148790 added scripts/multiconfig.py written in Python 2 to adjust Kconfig for U-Boot. It has been hard for Python 3 users because Python 2 and Python 3 are not compatible with each other. We are not happy about adding a new host tool dependency (in this case, Python version dependency) for the core build process. After some discussion, we decided to use only basic tools. The script may get a bit more unreadable by shell scripting, but we believe it is worthwhile. In addition, this commit revives "<board>_config" target that is equivalent to "<board>_defconfig" for backwards compatibility. It is annoying to adjust various projects which use U-Boot. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Suggested-by: Igor Grinberg <grinberg@compulab.co.il> Tested-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@ti.com> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Stephen Warren <swarren@nvidia.com>
OpenPOWER on IntegriCloud