From patchwork Fri Nov 2 11:41:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 150028 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1966715ljp; Fri, 2 Nov 2018 04:41:38 -0700 (PDT) X-Google-Smtp-Source: AJdET5ezmZsnHK6jQA3MvSta6EzNpxAD+nOF98JVuiEnuRNTrLcJRcWphH5grrhkG/VImxStJo32 X-Received: by 2002:a17:902:a5c6:: with SMTP id t6-v6mr11550573plq.31.1541158898177; Fri, 02 Nov 2018 04:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541158898; cv=none; d=google.com; s=arc-20160816; b=I5zaUJNDeicPVPSpGyRmzRcmOkvwqPnDSe8kL8q74UQqfnVAE1i6IGwVdoTi98gpnO ioPGScIx60BiRGKMDe5Tcr0cTlzkJFrJqb6YB66r0a9NyFLVvz3xwizj0Gn2BW99Dj4Q OjhTKBNodhwDWS1/Y90rOiCCjBrsZQ08UO5PCCEDLvp7lqjfAnVWarcf6+RMMAxW1Gka OxQYOqoGXoifsSuSJbXXyimNOxpSLSnhN4E0RPlqfnYut1p9VR3/eepBFL0yIwITrPca B1w96Pfa0QBZZUxOT1SwczM05q65zsqLnVybJ4Yx77218cA3dX3dJ5IBMu19QP0ujPXc Vk/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Mj2QZxUx6dVHSn2ZCozI/Vd9NNqleLHIpi3vz3MvkLE=; b=UTtZhdpCKsH7cYU0957KDSZxh7Amr1feETEhYMVlX+FEaTRTsz/yfivAv1zsfvOP2c FyF+35W9sTCWJEC7ASkl4Ogn7y1RHzLn/l5EwTpGXvhB+y5eYYDg1JE7lJn05vN4sIjt A4WC8ysd2Q/aS8Y8Yg3qCRW1ep1f8OnLcNdqbvpIVoddkhk9B0aFx3pgyzB7AjC/s57w /8ushBOpiQJ+XVQDqbPQXfdbG/YgRt+Bs8LmJNkBJNlHZnunLbeQGHAXhAqhNcfEmX11 BPFoOh0UYKhDAava0MPQTyredOzn58C9C7EFEIktnlFMRGFvQ7KjcRbRa8SwhrjDJWGX Tb1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NMF1q5mG; 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 63-v6si3689672pfg.234.2018.11.02.04.41.37; Fri, 02 Nov 2018 04:41: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=@linaro.org header.s=google header.b=NMF1q5mG; 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 S1726687AbeKBUs2 (ORCPT + 32 others); Fri, 2 Nov 2018 16:48:28 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35835 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbeKBUs2 (ORCPT ); Fri, 2 Nov 2018 16:48:28 -0400 Received: by mail-lf1-f68.google.com with SMTP id d7-v6so1134014lfi.2 for ; Fri, 02 Nov 2018 04:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Mj2QZxUx6dVHSn2ZCozI/Vd9NNqleLHIpi3vz3MvkLE=; b=NMF1q5mGzw/98bEjtQILZ5uky78p9bTsaHK7klILVQ2s+wV4x0D7In1RNDQTJd/o1f iuaL4CEdJaiVWbAc09r/jZub31Ev0pR6QauLktPLenv61KCydYRC1R/ci4Lekzit+eN8 rQT/KhXjsPCOXwQPmlr+Jng1MoTyuDPUur2yg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Mj2QZxUx6dVHSn2ZCozI/Vd9NNqleLHIpi3vz3MvkLE=; b=dTbi/Rl5IbW3KUT16ummAWOHR6tyCB2NlHtv8n/r/brR5+wOGQlNOHWKYSoZ3fU7Kg KBD4ofWKN/5WZ4wfy7Q6jQ2jPg8PBHQUwsmU7M3sGGKU0dkZk3WGeCdMV2s8tf0e1zip uYlO8ArKUFtDXryQ1SqHP+NOyBYw7ckBgtNYXp2caM9TxNiWK12CwBfaIh7d4ptJ1LD9 kLtkhyfObnXyTdlNAqOPUbFu5NQfqpoEHEKzLBgKreuQa+Tj9TIXkmo5mK2+z56YzJko Na1XF252RFKGxF0AUK0JqZw1Cr9PapSXfxd3bPpZLLEJdl3KA746QQe88/qQ+IL2EQwO Hq5w== X-Gm-Message-State: AGRZ1gKBsY2iHvKyzKxKRuQopeBVtyaqoFSBAoXPt/j9BGmaE0IlHHGq Rt/2Drdk3gAAObDhZwcQgonLoA== X-Received: by 2002:a19:914b:: with SMTP id y11mr6351934lfj.98.1541158892788; Fri, 02 Nov 2018 04:41:32 -0700 (PDT) Received: from localhost (c-732171d5.07-21-73746f28.bbcust.telenor.se. [213.113.33.115]) by smtp.gmail.com with ESMTPSA id k9-v6sm630668ljk.97.2018.11.02.04.41.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 04:41:32 -0700 (PDT) From: Anders Roxell To: yamada.masahiro@socionext.com Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, dvhart@infradead.org, arnd@arndb.de, Anders Roxell Subject: [PATCH] scripts/kconfig/merge_config: don't redefine 'y' to 'm' Date: Fri, 2 Nov 2018 12:41:19 +0100 Message-Id: <20181102114119.23859-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- scripts/kconfig/merge_config.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) -- 2.11.0 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