]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kconfig: merge_config: use an empty file as initfile
authorDaniel Gomez <da.gomez@samsung.com>
Fri, 28 Mar 2025 14:28:37 +0000 (14:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:53 +0000 (14:41 +0200)
commita6f24a41ef5272ef9af33f6bf31fc1c0d5428957
tree3190c7250fcde16624206c2f312831fe16dc8674
parentadbb39eca39d11cc7bd512ac36d2130213c1d58c
kconfig: merge_config: use an empty file as initfile

[ Upstream commit a26fe287eed112b4e21e854f173c8918a6a8596d ]

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 <da.gomez@samsung.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/kconfig/merge_config.sh