summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.autoconf1
-rw-r--r--scripts/Makefile.clean4
-rwxr-xr-xscripts/checkpatch.pl2
-rw-r--r--scripts/multiconfig.sh37
4 files changed, 40 insertions, 4 deletions
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 44c3997..ced2b9a 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 \<config_cmd_defaults.h\>; \
echo \#include \<config_defaults.h\>; \
echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
echo \#include \<asm/config.h\>; \
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index d6dcd47..88f14e2 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-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3fed5e4..74db2e2 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/) {}
}
diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index a579042..4a8737f 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
@@ -245,6 +252,35 @@ do_savedefconfig () {
IFS=$save_IFS
}
+# Some sanity checks before running "make <objdir>/<target>",
+# where <objdir> 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 <objdir>/<target> <objdir>
+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 <objdir>/<target>
# The field "<objdir>/" is typically empy, "spl/", "tpl/" for Normal, SPL, TPL,
@@ -258,6 +294,7 @@ do_others () {
objdir=
else
objdir=${1%/*}
+ check_enabled_subimage $1 $objdir
fi
run_make_config $target $objdir