From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9809194A67; Tue, 27 May 2025 16:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748364427; cv=none; b=p618lwbmXee1Yu3XxQG1EzfQlvyAdqwtV3/TZBypsKUneP9nJu/qjZrjPHfItoU3H+lM8MSTalI/zLQPnC2kWCY6vYsWvFuYuMYDVksriyDYHBm3lRclZzer5ceKJGpZ8x74+SVRKTy8GBqkUEffbFb2D5JwzeZQf6C48oHJww0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748364427; c=relaxed/simple; bh=VPQbJVFTZ9sbMbEdylvvE/dzPGKAMTTSkDFW+V6pv4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rZeEewJWLCfbF68s1D7+AJGvShXQ3e+zZHCNC6O33AYMDr73QICMeeB0ajr9bziRecQKHoCG5q8tReTDPsHNrJWCW1FZZ0DMpZrVUy2Uamn4Dv5mp3uPe1GKCFqVSKVLxOJZQ51RnicesWCyaFXAiCQ4MW+qjxoufEEtM7dXcX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1mfPjSHU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1mfPjSHU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9C42C4CEE9; Tue, 27 May 2025 16:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748364425; bh=VPQbJVFTZ9sbMbEdylvvE/dzPGKAMTTSkDFW+V6pv4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mfPjSHUC563e0KKxlEYsVQIwHLfNmSfSGxOY5jZUwH7G96LjwjgoG3swPY7C7er7 YKu6oFDZfJxLHX74TmnuphRbdSv2gDYLU4RVWpHoQuyv/ODwvP/ryxPQhEref+4fI+ yJvR8KTeefZ1ioF9sAvqUseZejO06SJ+b/WoP/Xs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Gomez , Masahiro Yamada , Sasha Levin Subject: [PATCH 6.12 044/626] kconfig: merge_config: use an empty file as initfile Date: Tue, 27 May 2025 18:18:57 +0200 Message-ID: <20250527162446.848246889@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162445.028718347@linuxfoundation.org> References: <20250527162445.028718347@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Gomez [ 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 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 Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/merge_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 0b7952471c18f..79c09b378be81 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=$* -- 2.39.5