summaryrefslogtreecommitdiffstats
path: root/scripts/multiconfig.py
Commit message (Collapse)AuthorAgeFilesLines
* kconfig: convert Kconfig helper script into a shell scriptMasahiro Yamada2014-08-221-405/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tools, scripts: refactor error-out statements of Python scriptsMasahiro Yamada2014-08-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python, sys.exit() function can also take an object other than an integer. If an integer is given to the argument, Python exits with the return code of it. If a non-integer argument is given, Python outputs it to stderr and exits with the return code of 1. That means, print >> sys.stderr, "Blah Blah" sys.exit(1) is equivalent to sys.exit("Blah Blah") The latter is a useful shorthand. Note: Some error messages in Buildman and Patman were output to stdout. But they should go to stderr. They are also fixed by this commit. This is a nice side effect. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* kconfig: switch to KconfigMasahiro Yamada2014-07-301-0/+410
This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run "make <board>_defconfig" to do the board configuration. It will create the .config file and additionally spl/.config, tpl/.config if SPL, TPL is enabled, respectively. You can use "make config", "make menuconfig" etc. to create a new .config or modify the existing one. Use "make spl/config", "make spl/menuconfig" etc. for spl/.config and do likewise for tpl/.config file. The generic syntax of configuration targets for SPL, TPL is: <target_image>/<config_command> Here, <target_image> is either 'spl' or 'tpl' <config_command> is 'config', 'menuconfig', 'xconfig', etc. When the configuration is done, run "make". (Or "make <board>_defconfig all" will do the configuration and build in one time.) For futher information of how Kconfig works in U-Boot, please read the comment block of scripts/multiconfig.py. By the way, there is another item worth remarking here: coexistence of Kconfig and board herder files. Prior to Kconfig, we used C headers to define a set of configs. We expect a very long term to migrate from C headers to Kconfig. Two different infractructure must coexist in the interim. In our former configuration scheme, include/autoconf.mk was generated for use in makefiles. It is still generated under include/, spl/include/, tpl/include/ directory for the Normal, SPL, TPL image, respectively. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud