Received: by 10.223.185.116 with SMTP id b49csp7537862wrg; Thu, 1 Mar 2018 07:07:28 -0800 (PST) X-Google-Smtp-Source: AG47ELt/Jp26JOUpCGcQ7Jtb5eieEpQjKTNEiYzWsvIbu0O/eJ3jm0qp1RopmHBvhuIHfW/XDDq+ X-Received: by 2002:a17:902:74c3:: with SMTP id f3-v6mr2226078plt.444.1519916847913; Thu, 01 Mar 2018 07:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519916847; cv=none; d=google.com; s=arc-20160816; b=iEsGSom57SNzGPDkzsIecGnFoXGm1BKcWKJxnoDPwOmuMEa7Rh/hhQ1RqBmq6WuWoH /ROqUyl0bNqWQal2L58Z59eKpJbd6UgejPud7Jci0/6VOQNvLDYdnQAw/l0G5ELuuf7l 8v6qoLkW72e8p7J/dd8jNJHR2sC4AlNwNHHKZ8cYQOU7GFMLyD4+uvFSnh2oY//uoc34 TvEoFHt1vJxH27ChQYNHOqbTTbbR+koNk6upgT/ty2+SeNFDeprsEQgbbFDB4/OKG/8+ bL9HQk/E6hPM4qDosjz4X5ZMZJmLO3XhkRwfiR9ApEWLKUtcwjRkXqRJBjysIewvMQBo GFnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=wu+vftJ4QL/tker6DPa8XnNyBdA2YhdWyn+pK3YvYC4=; b=QO8X1pJE33n8kSdaiSpz0Q5YvCJoFgH7Zife8pPUn8rM2WWTWVieQLcrbo8At60bus 6N5OB0MmmHw2a3cxqfieT59hNRxoyxzjnG0FP4AhxWYsufQZnpK1cklwkoWeCuxuJG76 8MNmqP6xps948Q5QJw3FyiFLlxF9CJhLlhGkJUSM9TGlDsehYDTQTqVuNcnuOwPpwgMp Ez4gNb506lQLgzEYsagFPZj/RaRzsmkwkcB0wTttogStDbKqGsW63xIkDZDLOQtvC1Lv qnxMNzFA3zpag+iq+EEzPDMaFaFg6mHkjuxWxqYUjlb/d0SAqH595zJlFXziCIGwXalb P2Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=XR9vPiTi; 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 t186si2579306pgt.130.2018.03.01.07.07.11; Thu, 01 Mar 2018 07:07:27 -0800 (PST) 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=XR9vPiTi; 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 S1031710AbeCAPGF (ORCPT + 99 others); Thu, 1 Mar 2018 10:06:05 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:20341 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031659AbeCAPGD (ORCPT ); Thu, 1 Mar 2018 10:06:03 -0500 Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com [209.85.217.170]) (authenticated) by conssluserg-03.nifty.com with ESMTP id w21F5xlr012167; Fri, 2 Mar 2018 00:06:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com w21F5xlr012167 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519916760; bh=wu+vftJ4QL/tker6DPa8XnNyBdA2YhdWyn+pK3YvYC4=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=XR9vPiTi+d1wZ0bvUPIQlUGmw7PmxJo5p1+2jcCUwHfs350IqToh2RKvVY3EFWNcW KevGKaHRXYx66WtQ6gBrrj2DqC7DV7BSPEQXntStpiXkKoQaP+dFFIpTd4MnE34ePK 81QZ47O13hixnEUXh4sttINPKJ0dqTm3hRVbrHfDrXgpcN5kdKcMOBZR6vy8GPqfBT G0u/fsEfEKTUjcBZd70Hxe5ZLaMMirYdbTnkhBdGGmsxezU5Sg0IpmntU/tguHA6GM xGByl9slQgrHBQQ+gaskDC3+2CN3uO9koOt0UikGYyGJ8BQK4OBH3O+DgcyihYZIZJ FCDkPNj1570vQ== X-Nifty-SrcIP: [209.85.217.170] Received: by mail-ua0-f170.google.com with SMTP id b13so4041881uam.10; Thu, 01 Mar 2018 07:05:59 -0800 (PST) X-Gm-Message-State: APf1xPBtunpgX1afJ07o+e9D+iy9LrrhXMOb4CyIRVCB/pmy6TVXW7h8 biQ8hobM3JO7cEApX5ztXrhrG/fJNgJ9JduOgco= X-Received: by 10.176.76.31 with SMTP id l31mr1386013uaf.199.1519916758905; Thu, 01 Mar 2018 07:05:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.32.138 with HTTP; Thu, 1 Mar 2018 07:05:18 -0800 (PST) In-Reply-To: <1518806331-7101-5-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> <1518806331-7101-5-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Fri, 2 Mar 2018 00:05:18 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 04/23] kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list To: Linux Kbuild mailing list , Ulf Magnusson Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Sam Ravnborg , Michal Marek , Masahiro Yamada , Linux Kernel Mailing List , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-17 3:38 GMT+09:00 Masahiro Yamada : > The 'defconfig_list' is a weird attribute. If the '.config' is > missing, conf_read_simple() iterates over all visible defaults, > then it uses the first one for which fopen() succeeds. > > config DEFCONFIG_LIST > string > depends on !UML > option defconfig_list > default "/lib/modules/$UNAME_RELEASE/.config" > default "/etc/kernel-config" > default "/boot/config-$UNAME_RELEASE" > default "$ARCH_DEFCONFIG" > default "arch/$ARCH/defconfig" > > However, like other symbols, the first visible default is always > written out to the .config file. This might be different from what > has been actually used. > > For example, on my machine, the third one "/boot/config-$UNAME_RELEASE" > is opened, like follows: > > $ rm .config > $ make oldconfig 2>/dev/null > scripts/kconfig/conf --oldconfig Kconfig > # > # using defaults found in /boot/config-4.4.0-112-generic > # > * > * Restart config... > * > * > * IRQ subsystem > * > Expose irq internals in debugfs (GENERIC_IRQ_DEBUGFS) [N/y/?] (NEW) > > However, the resulted .config file contains the first one since it is > visible: > > $ grep CONFIG_DEFCONFIG_LIST .config > CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" > > In order to stop confusing people, prevent this CONFIG option from > being written to the .config file. > > Signed-off-by: Masahiro Yamada > --- This one is almost trivial, so I will pick it up now. Ulf, do you have any comment about this one? > I'd like to fix the root case of this weirdness later. > (and other 'option' attributes as well) > > But, this series is focusing a more important work in a bigger picture. > > For now, I decided to just hide CONFIG_DEFCONFIG_LIST > from the .config file. > > > scripts/kconfig/menu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c > index 9922285..36cd3e1 100644 > --- a/scripts/kconfig/menu.c > +++ b/scripts/kconfig/menu.c > @@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg) > sym_defconfig_list = current_entry->sym; > else if (sym_defconfig_list != current_entry->sym) > zconf_error("trying to redefine defconfig symbol"); > + sym_defconfig_list->flags |= SYMBOL_AUTO; > break; > case T_OPT_ENV: > prop_add_env(arg); > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada