aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gomez <[email protected]>2025-03-28 14:28:37 +0000
committerMasahiro Yamada <[email protected]>2025-04-05 21:22:01 +0000
commita26fe287eed112b4e21e854f173c8918a6a8596d (patch)
tree9bf3434cf1a70d522ed083087c9cfadcef17683d
parentnios2: migrate to the generic rule for built-in DTB (diff)
downloadkernel-a26fe287eed112b4e21e854f173c8918a6a8596d.tar.gz
kernel-a26fe287eed112b4e21e854f173c8918a6a8596d.zip
kconfig: merge_config: use an empty file as initfile
The scripts/kconfig/merge_config.sh script requires an existing $INITFILE (or the $1 argument) as a base file for merging Kconfig fragments. However, an empty $INITFILE can serve as an initial starting point, later referenced by the KCONFIG_ALLCONFIG Makefile variable if -m is not used. This variable can point to any configuration file containing preset config symbols (the merged output) as stated in Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will contain just the merge output requiring the user to run make (i.e. KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make olddefconfig). Instead of failing when `$INITFILE` is missing, create an empty file and use it as the starting point for merges. Signed-off-by: Daniel Gomez <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
-rwxr-xr-xscripts/kconfig/merge_config.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 0b7952471c18..79c09b378be8 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -112,8 +112,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*