From 8caaec62602453cf2a24ccc0799c59bf4e3d74f9 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 4 Sep 2014 22:16:15 +0900 Subject: kconfig: show an error message when defconfig is not found 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 Acked-by: Stephen Warren --- scripts/multiconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh index a5790428c8..49fcfad3c1 100644 --- a/scripts/multiconfig.sh +++ b/scripts/multiconfig.sh @@ -118,6 +118,13 @@ do_board_defconfig () { defconfig_path=$srctree/configs/$1 tmp_defconfig_path=configs/.tmp_defconfig + if [ ! -r $defconfig_path ]; then + echo >&2 "***" + echo >&2 "*** Can't find default configuration \"confis/$1\"!" + echo >&2 "***" + exit 1 + fi + mkdir -p arch configs # defconfig for Normal: # pick lines without prefixes and lines starting '+' prefix -- cgit From 021f0495979317e26b2cf582cf2b765008390bcd Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 5 Sep 2014 01:56:51 +0900 Subject: scripts/Makefile.clean: clean also $(extra-m) and $(extra-) This commit is a backport from Linux Kernel, commit 9d5db8949f1ecf4019785b04d8986835d3c0e99e, written by me. Signed-off-by: Masahiro Yamada --- scripts/Makefile.clean | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index d6dcd47f6f..88f14e2d8f 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -45,8 +45,8 @@ subdir-ymn := $(foreach f, $(subdir-ymn), \ # build a list of files to remove, usually relative to the current # directory -__clean-files := $(extra-y) $(always) \ - $(targets) $(clean-files) \ +__clean-files := $(extra-y) $(extra-m) $(extra-) \ + $(always) $(targets) $(clean-files) \ $(host-progs) \ $(hostprogs-y) $(hostprogs-m) $(hostprogs-) -- cgit From 11b5db67879c1ac0f1c358fb9b791896af189b0a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 10 Sep 2014 18:13:10 +0900 Subject: kconfig: add sanity checks for SPL configuration For the SPL configuration, "make /" is used. Here, is either "spl" or "tpl" is one of "config", "menuconfig", "xconfig", etc. This commit adds two checks: [1] If 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 Suggested-by: Simon Glass --- scripts/multiconfig.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'scripts') diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh index 49fcfad3c1..4a8737f352 100644 --- a/scripts/multiconfig.sh +++ b/scripts/multiconfig.sh @@ -252,6 +252,35 @@ do_savedefconfig () { IFS=$save_IFS } +# Some sanity checks before running "make /", +# where should be either "spl" or "tpl". +# Doing "make spl/menuconfig" etc. on a non-SPL board makes no sense. +# It should be allowed only when ".config" exists and "CONFIG_SPL" is enabled. +# +# Usage: +# check_enabled_sumbimage / +check_enabled_subimage () { + + case $2 in + spl|tpl) ;; + *) + echo >&2 "***" + echo >&2 "*** \"make $1\" is not supported." + echo >&2 "***" + exit 1 + ;; + esac + test -r "$KCONFIG_CONFIG" && get_enabled_subimages | grep -q $2 || { + config=CONFIG_$(echo $2 | tr '[a-z]' '[A-Z]') + + echo >&2 "***" + echo >&2 "*** Create \"$KCONFIG_CONFIG\" with \"$config\" enabled" + echo >&2 "*** before \"make $1\"." + echo >&2 "***" + exit 1 + } +} + # Usage: # do_others / # The field "/" is typically empy, "spl/", "tpl/" for Normal, SPL, TPL, @@ -265,6 +294,7 @@ do_others () { objdir= else objdir=${1%/*} + check_enabled_subimage $1 $objdir fi run_make_config $target $objdir -- cgit From 64147e564cf43bb33b68766053960002bc0784dd Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 16 Sep 2014 16:33:05 +0900 Subject: kconfig: remove config_cmd_defaults.h Now config_cmd_defaults.h is empty so it can be deleted safely. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass --- scripts/Makefile.autoconf | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index 44c39970f3..ced2b9a6b0 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -74,7 +74,6 @@ define filechk_config_h | sed '/=/ {s/=/ /;q; } ; { s/$$/ 1/; }'; \ done; \ echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\ - echo \#include \; \ echo \#include \; \ echo \#include \; \ echo \#include \; \ -- cgit From e3a4facdfc07179ebe017a07b8de6224a935a9f3 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 23 Sep 2014 12:41:02 +0200 Subject: checkpatch: remove unnecessary + after {8,8} Pick the following commit from Linux kernel: commit 66cb4ee0e52ca721f609fd5eec16187189ae5fda Author: Joe Perches Date: Wed Sep 10 09:40:47 2014 +1000 checkpatch: remove unnecessary + after {8,8} There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit. Signed-off-by: Marek Vasut Cc: Tom Rini --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3fed5e4694..74db2e24fc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2148,7 +2148,7 @@ sub process { "please, no space before tabs\n" . $herevet) && $fix) { while ($fixed[$linenr - 1] =~ - s/(^\+.*) {8,8}+\t/$1\t\t/) {} + s/(^\+.*) {8,8}\t/$1\t\t/) {} while ($fixed[$linenr - 1] =~ s/(^\+.*) +\t/$1\t/) {} } -- cgit