Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1536565imm; Mon, 3 Sep 2018 03:05:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbiWRwUwCwF3UG/2GOXOmPyhj5NqJ9s5RVhRLoepGz2HTaM9/zrz+n7GASWonclITjvlGs4 X-Received: by 2002:a63:df04:: with SMTP id u4-v6mr25896775pgg.434.1535969118846; Mon, 03 Sep 2018 03:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535969118; cv=none; d=google.com; s=arc-20160816; b=ZJ+cz0C/GRexBJJ328vQHlD2j5NK3PFjk6aFI0v1c7bTNK697Yfy7CPUYUMK5H1tg1 0oocTUtBhANR8lbDRbOe0ymoJFtWL4nYallKi1hRXmRcxX59FuXxcQR/r7ZK0iLCBBou /XkbCamFhArQ63rztmPdiAgeNYbvj8NHPAS+TUNgO26n2oiw/TS5zfiRKL3tMZH7oTn+ XWPmLNvFkNBd1AOW5JM3E0EwanMJwqyUKvnvlb5RYBEBC8IAKfyF+HJXNTimCgTc0nwk /HRekd1x6rFIisLGUdsrHpnfMvw0VsdTovmAfKM8CJSGgpuf6LkN0STWrXo3tJLiRDA1 tauQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=AXfpxzad3p9nMHosRdYtTF6ipqbKVsh5ibLJLNOL+Cs=; b=z6MqVc6m0TevOd4D9pLhAWQrdFQVaI1ZRXUHYfedluRtEzQCPPSdfAxZTEKYtWyWoZ U9bwIPsPBMe1Y6QccB0KDjvtaSPRuzi5yjGA++wElOYXr8p5WFDTHb8CTbo9FN8yNlUH KYmg7YtG11hsJCLOw6Q5eXeoU5hsRQvubaxxx+nh5lNonXJLGPesOTHmGmAD1/R7NtB/ XbfhwqVwgOBsaEu1EYmZR94afWJTxvf5beWcnenWbMTiv+mGXVcB0ToRWISUS27U7KHR ry3vx8riuGcvKQgROrlHkQ4bOz4Dp/jJcVBOTNJq4bdbKs/Jrh9Xv46JrICnGYb7MZD7 BuOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tHcTILgs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1-v6si3482289pfd.60.2018.09.03.03.05.04; Mon, 03 Sep 2018 03:05:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tHcTILgs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbeICOXB (ORCPT + 99 others); Mon, 3 Sep 2018 10:23:01 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:36957 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbeICOXB (ORCPT ); Mon, 3 Sep 2018 10:23:01 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w83A2AsY026175; Mon, 3 Sep 2018 19:02:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w83A2AsY026175 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1535968932; bh=AXfpxzad3p9nMHosRdYtTF6ipqbKVsh5ibLJLNOL+Cs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tHcTILgsszEG3AWAaNCwF72GVDuN8ZSanaqjiVVyZ9N1XNhQ85eR81X1XaW+I8slx K7Fr8LMks4eyoK+PnuOwXVzrZTDCfZhLmE2k2RFnLpINdNwShn+w83sfrghVXbMMI+ 1yAFlJjytYdzISMcD47evojdsqKg2B1ZZViU7JZbmRCykb32u2H+iWnKuZDI/PSZxh yWYGz9u5Zk1RM2xoIqEtcGoKsWE4oy1Wh+WQyxDOidXh9dBDVUzjutJaxu3hv8uoKz XD3Jq6PXOaZuKg0J7YbZkwlk4pzzSmDkER/8RwhhezvBLOEAmxMxxcBWbxXUNSjokW G/L0SliYvWnWA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Javier Martinez Canillas , Laura Abbott , Jiri Kosina , Ben Hutchings , =?UTF-8?q?Michal=20Such=8F=AB=A1nek?= , Takashi Iwai , Masahiro Yamada , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Michal Marek Subject: [RFC PATCH 1/3] kconfig: support an environment variable for non-interactive syncconfig Date: Mon, 3 Sep 2018 19:01:54 +0900 Message-Id: <1535968916-9159-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535968916-9159-1-git-send-email-yamada.masahiro@socionext.com> References: <1535968916-9159-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When Kconfig files are updated, or build environments etc. are changed, 'make syncconfig' is invoked, which will show prompts if new config options are available. Users must explicitly input values for all new symbols. This is the conventional behavior for the kernel build. However, it would be useful to process this non-interactively in such cases as package building. Package maintainers create source packages with the .config configured on their machines. Package builders may work on different machine environments, where different compilers are installed. With the recent changes in Kconfig, the .config contents depend on the compiler. During package building, it is not sensible to show prompts for new symbols; it would be just annoys script automation. Add a new switch, KCONFIG_NONINTERACTIVE_UPDATE. If this environment variable is set, Kconfig will sync the configuration non-interactively. All new symbols are silently set to their default values. Signed-off-by: Masahiro Yamada --- Documentation/kbuild/kconfig.txt | 6 ++++++ scripts/kconfig/conf.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 68c8291..5c29c3f 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt @@ -129,6 +129,12 @@ KCONFIG_NOSILENTUPDATE If this variable has a non-blank value, it prevents silent kernel config updates (requires explicit updates). +KCONFIG_NONINTERACTIVE_UPDATE +-------------------------------------------------- +If this variable has a non-blank value, it prevents user input prompts +from showing up even when new symbols are available. All new symbols +are silently set to their default values. + KCONFIG_AUTOCONFIG -------------------------------------------------- This environment variable can be set to specify the path & name of the diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 7b2b372..b64bbc0 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -680,6 +680,11 @@ int main(int ac, char **av) case oldconfig: case listnewconfig: case syncconfig: + if (input_mode == syncconfig) { + name = getenv("KCONFIG_NONINTERACTIVE_UPDATE"); + if (name && *name) + break; + } /* Update until a loop caused no more changes */ do { conf_cnt = 0; -- 2.7.4