Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1885539imu; Tue, 6 Nov 2018 05:58:44 -0800 (PST) X-Google-Smtp-Source: AJdET5e9M4ILwMF+D6VrtLVWcEdH3mSdgLWpl/OTZy1ku2hjeX+cLrF9cx/c7HFG38sjuJdbDZar X-Received: by 2002:a17:902:7484:: with SMTP id h4-v6mr25894540pll.227.1541512724738; Tue, 06 Nov 2018 05:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541512724; cv=none; d=google.com; s=arc-20160816; b=VGl0hveDt190oOkMigFdXPkUdBRW2sHtbCsh2A8lMwqc98xWpcVdBCSzriRQxatJ85 XkQaPF9iqj5mEXnWza5dAxMvq4DEgMAW4UFHZCK7jdBQpuw+kpNRu4m9VdAwOXJ00/z1 znFtA67crcIQl8ghRmgvgDUxLx7m2vy0wLY9WznEVAUk+WZy65WdePto6Ip14hn0BRlt 2aN3V2SfIM6Ff4Pz16B9+X/jhgLBuTSww7i2eFV6HJQ7ZThlRp9xSX/qx8nf7PGcuwAC 6q2BTV6R698Br/Aa2p8EQGLHW9Q62pgzjw/FFLVAr/m+7Slvqqvcd7j8SOkPRz5Sgl19 ugQw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=ebaVB+y5abTK19HvX2rCNWE4KN4fe1zXURPiibjaJ9E=; b=uNNBeom3YUDPMqkLyytNZCalw5FsBGs1cy5wBetF+dnW4nhjGcCcGPhltIaCX1kBCJ Rn/tzT2cpAJGxiThT8YRy69HRnLPM9MIMjbUeKM6v/LW366NPVlnHOnZ360QdWiyKzs8 BW402YcAmVYj4+gjNL6a9yOl2PrTmmINB7Uz4aGD7TTYgZ60G/8q/h6T3FFpELjWOdGJ TtRMzA6UKdgZkdQ3d6meih6SvS0nVXWhALgf95JqC+S/PE/cT6E3EhZO64wJWy5rAh9+ I/Eygzp7ITodsj96JQjhTL6qMLt+A6BFaw4DAQoyjPVdY0yOA9Y7C+ajwZcywqNwpkuW TUdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BChQs9or; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24-v6si13784729pfm.141.2018.11.06.05.58.28; Tue, 06 Nov 2018 05:58:44 -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=@linaro.org header.s=google header.b=BChQs9or; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388619AbeKFXXP (ORCPT + 99 others); Tue, 6 Nov 2018 18:23:15 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:32837 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388509AbeKFXXP (ORCPT ); Tue, 6 Nov 2018 18:23:15 -0500 Received: by mail-yb1-f196.google.com with SMTP id i78-v6so5338735ybg.0 for ; Tue, 06 Nov 2018 05:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ebaVB+y5abTK19HvX2rCNWE4KN4fe1zXURPiibjaJ9E=; b=BChQs9orPyx2PeUq1U0FMk5aka/tQaGiBzhN2Br/cBfE96BIqZC8xr2bnb9Xkbjfd+ 3Yihpyz+5twx9G5J9yy10VzJH0fWc3DsJbJV+QvO/ftUrkAPGjIi0CLEBIkxDJnvNOey ACzm5TxIAJzU3kmnrS+JjFumAqK30SP6FhZRw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ebaVB+y5abTK19HvX2rCNWE4KN4fe1zXURPiibjaJ9E=; b=S2/Fa5EZJZM8wI+8DgaM/KDixGL8XfGQeoPkxn3n+Xxkutg10/m6VhaLfSPoH55GTi YNGSFb0RflrrPpGh6MRJQR/DJFQ5SsxVubfqjWtrzWATuLimemAPc/sSa/r8OgGx/BwL 3IgQ4OiGWNh+E/hsKcg/wzFHOpBs0SIQFd6g7lfdHXCpwgLEo7r8NDMXAuIqQJ+95ED3 iIDQ0cyl6LPidbftEMqWp0Nj1jTvGbqMUeXF8sgw9xMLYtQq4uLhL3yFHNFXZ4JgrAJZ 1XnZQvDTYdKwIqfKC+XFqemGdW8iKmEv6/QhvwkfdMW0/MVXCVoz12ZalqrPK479/Yjb Rd0A== X-Gm-Message-State: AGRZ1gLtdaGYzmFohy53qrRFV4aTJS4hEjDT9o9XM6cWC3rW+/R+67B5 0UcAM4k1R/UfPk1qtlO2gDory5ZgvGtks69Llc2AzQ== X-Received: by 2002:a25:6046:: with SMTP id u67-v6mr24733225ybb.198.1541512672241; Tue, 06 Nov 2018 05:57:52 -0800 (PST) MIME-Version: 1.0 References: <20181102114119.23859-1-anders.roxell@linaro.org> In-Reply-To: From: Anders Roxell Date: Tue, 6 Nov 2018 14:57:40 +0100 Message-ID: Subject: Re: [PATCH] scripts/kconfig/merge_config: don't redefine 'y' to 'm' To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Linux Kernel Mailing List , dvhart@infradead.org, Arnd Bergmann 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 On Mon, 5 Nov 2018 at 09:35, Masahiro Yamada wrote: > > Hi Anders, > > On Fri, Nov 2, 2018 at 8:41 PM Anders Roxell wrote: > > > > In today's merge_config.sh the order of the config fragment files dictates > > the output of a config option. With this approach we will get different > > .config files depending on the order of the config fragment files. > > Adding a switch to add precedence for builtin over modules, this will > > make the .config file the same > > > > Suggested-by: Arnd Bergmann > > Signed-off-by: Anders Roxell > > --- > > I think this patch makes sense. > > Just in case, could you please provide me the context of the discussion? For instance we don't want to force X86 from DRM=y to DRM=m, when enabling selftest, that would surely break somebody's setup and you also don't want to force ARM64 from DRM=m to DRM=y, that seems unnecessary for a big subsystem like DRM. > > Does the real problem exist in the kernel tree, Not that I'm aware about. Cheers, Anders > or for local fragment files? > > > Thanks. > > > > > scripts/kconfig/merge_config.sh | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh > > index da66e7742282..902a60b45614 100755 > > --- a/scripts/kconfig/merge_config.sh > > +++ b/scripts/kconfig/merge_config.sh > > @@ -32,6 +32,7 @@ usage() { > > echo " -m only merge the fragments, do not execute the make command" > > echo " -n use allnoconfig instead of alldefconfig" > > echo " -r list redundant entries when merging fragments" > > + echo " -y make builtin have precedence over modules" > > echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." > > echo > > echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable." > > @@ -40,6 +41,7 @@ usage() { > > RUNMAKE=true > > ALLTARGET=alldefconfig > > WARNREDUN=false > > +BUILTIN=false > > OUTPUT=. > > CONFIG_PREFIX=${CONFIG_-CONFIG_} > > > > @@ -64,6 +66,11 @@ while true; do > > shift > > continue > > ;; > > + "-y") > > + BUILTIN=true > > + shift > > + continue > > + ;; > > "-O") > > if [ -d $2 ];then > > OUTPUT=$(echo $2 | sed 's/\/*$//') > > @@ -122,7 +129,13 @@ for MERGE_FILE in $MERGE_LIST ; do > > grep -q -w $CFG $TMP_FILE || continue > > PREV_VAL=$(grep -w $CFG $TMP_FILE) > > NEW_VAL=$(grep -w $CFG $MERGE_FILE) > > - if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then > > + if test "$BUILTIN" = "true" && echo $PREV_VAL |grep -Eq '^\w+=y' && echo $NEW_VAL |grep -Eq '^\w+=m' ; then > > + echo Value of $CFG is \'y\' and we don\'t want to redefine the fragment $MERGE_FILE: > > + echo Previous value: $PREV_VAL > > + echo New value: $NEW_VAL > > + echo Will use previous value. > > + echo > > + elif [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then > > echo Value of $CFG is redefined by fragment $MERGE_FILE: > > echo Previous value: $PREV_VAL > > echo New value: $NEW_VAL > > -- > > 2.11.0 > > > > > -- > Best Regards > Masahiro Yamada