summaryrefslogtreecommitdiffstats
path: root/scripts/check-config.sh
Commit message (Collapse)AuthorAgeFilesLines
* scripts/check-config.sh: Add usage()Andy Shevchenko2018-12-261-0/+9
| | | | | | | | | | When arguments are not supplied the error message is misleading and doesn't tell what exactly has to be done. Fix this by adding usage() and call it if above circumstance occurs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* scripts/check-config.sh: fix "command not found" error handlingLuca Ceresoli2018-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scripts/check-config.sh exits successfully and silently without doing any checks when the 'comm' command is not found. The problem triggers from the command around line 39: comm -23 ${suspects} ${ok} >${new_adhoc} This statement fails when 'comm' is not in $PATH, creating an empty ${new_adhoc} file. But the script continues and the following line, which is supposed to detect an error: if [ -s ${new_adhoc} ]; then will always be false since the file is empty, and the script will exit successfully as if everything were OK. The case where 'comm' in not in $PATH is not theoretical. It used to happen on yocto until a recent fix [0], and still happens on the current stable branch (rocko). Fix by setting the errexit flag to exit with error when a statement fails, so that at least the problem is noticed. For additional safety also set the nounset flag to detect expansion errors. [0] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fe0b4cb5b48580d4a3f3c0eb82bfa6f1b13801e4 Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Simon Glass <sjg@chromium.org>
* scripts: config_whitelist: Handle lines with leading spaces/tabsBin Meng2017-06-291-2/+3
| | | | | | | | Some Kconfig options are defined in a line with leading spaces/tabs. Update build-whitelist/check-config scripts to handle such cases. Generate a new config_whitelist.txt with new scripts. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* kbuild: beautify the log of config whitelist checkMasahiro Yamada2017-02-081-6/+6
| | | | | | | | | | | | | | | | Use the kbuild style log. Prior to this commit: ./scripts/check-config.sh u-boot.cfg \ ./scripts/config_whitelist.txt . 1>&2 With this commit: CFGCHK u-boot.cfg Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* check-config: fix wrong comment about how to build whitelistMasahiro Yamada2016-10-071-7/+2
| | | | | | | | | | The command suggested in this comment block is wrong; it would not rip off CONFIG options that had already been converted to Kconfig. Instead, we should use the scripts/build-whitelist.sh tool. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Makefile: Give a build error if ad-hoc CONFIG options are addedSimon Glass2016-09-161-0/+55
New CONFIG options should be added via Kconfig. To help prevent new ad-hoc CONFIGs from being added, give a build error when these are detected. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>