From patchwork Mon Sep 3 10:01:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 145768 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2296318ljw; Mon, 3 Sep 2018 03:03:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalA53QlxsVt7CFrkDO76bk6drF3LyWz5tUFtyxF2QCCzrzj8aIC6UTDGfi+ihjOy6zG06u X-Received: by 2002:a63:8f17:: with SMTP id n23-v6mr6633881pgd.131.1535969018293; Mon, 03 Sep 2018 03:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535969018; cv=none; d=google.com; s=arc-20160816; b=bU1FBSeqEp1pj6o7TEDLCwBGQxP0LdQZne7Q0MI+M1glfSKKJuoBozXG1EG5fpsyes 585zXumEIEwFJ0j1VNo5aw9si+dbw+e9ogA5M69CAp5bM8AWmiNksDjBhdOWYv3V41Bz Eq4x5jM3EsPaJAUguifMF2BHK09l/INdgpDXYwzPzxuptmr4CEkplc2ptZyQ+JFNkXiy GXgGKDqPIN7L/bxSAvJhAFbrepQKdv3eoEPVyPRoOsysCXVmpJhnMMJ1BrEdqXNXxbmT OuB96tEu46sAdWaDEbND24vKVugVYUuNFDNYQHua9U5LopYW7TfnehM+r0mL+9CmpMUO cWeA== 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 h12-v6si17220061pll.416.2018.09.03.03.03.38; Mon, 03 Sep 2018 03:03:38 -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 S1727987AbeICOXB (ORCPT + 32 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 , Michal Such???nek , 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(+) -- 2.7.4 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;