From patchwork Tue Jul 21 13:22:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 51309 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by patches.linaro.org (Postfix) with ESMTPS id 923AC20323 for ; Tue, 21 Jul 2015 13:22:56 +0000 (UTC) Received: by wgkl9 with SMTP id l9sf26961168wgk.3 for ; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=XKsGvfSiDWClvAj1WH3iXSKZpVuGDnEmuajvU90CmbQ=; b=eoAnz61ZIHvgE+iVFziHi3Gw/sbI1NzGVlmsn8+/2wJpl9liYjT0uKWRLC2d8VzJol M2//tRiEPsrpRANluIRAjJTILWHBpWO76VFsTGe0GMpISxRgZ0HeYboH0TGU/h+/jPHB h63CIsONTIWxTC+DuO4/e3NYPBschj1rRX7rcCH5hJCuUq2c70y9jrBwOLiz0r4YNIQ+ LEw28XYqCTF6IEJQiGhSxU0tJMWo68HqCicZSpzZDipA8cS9e6C/QsBjdaX3OzKJ8mWP TmfWw7rFTQ+qmbkNlyhqUcYIjzx7Kq2PEDDF3Fr5XNceDoCsLFW2EfqJ7hEYC+xxQwVI xKoQ== X-Gm-Message-State: ALoCoQniqrUr0+pIG8xbEVjwIc4w4RYgx4m3fLyhD31iPJsXbPAURskFTcLPc9SrSu6ZPM+AxAeX X-Received: by 10.112.26.5 with SMTP id h5mr17496788lbg.4.1437484975753; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.101 with SMTP id z5ls839722laz.65.gmail; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) X-Received: by 10.112.155.164 with SMTP id vx4mr32601419lbb.38.1437484975554; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id r11si20795382lby.31.2015.07.21.06.22.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2015 06:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbqi7 with SMTP id qi7so35321196lbb.3 for ; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) X-Received: by 10.152.1.66 with SMTP id 2mr33842485lak.56.1437484975269; Tue, 21 Jul 2015 06:22:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1447651lba; Tue, 21 Jul 2015 06:22:54 -0700 (PDT) X-Received: by 10.107.27.148 with SMTP id b142mr45681693iob.114.1437484973674; Tue, 21 Jul 2015 06:22:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sd4si9412783igb.67.2015.07.21.06.22.52; Tue, 21 Jul 2015 06:22:53 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754361AbbGUNWu (ORCPT + 28 others); Tue, 21 Jul 2015 09:22:50 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34641 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751743AbbGUNWs (ORCPT ); Tue, 21 Jul 2015 09:22:48 -0400 Received: by wibud3 with SMTP id ud3so114140210wib.1 for ; Tue, 21 Jul 2015 06:22:47 -0700 (PDT) X-Received: by 10.180.92.40 with SMTP id cj8mr30256234wib.92.1437484967188; Tue, 21 Jul 2015 06:22:47 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-144-121-210.as13285.net. [78.144.121.210]) by smtp.gmail.com with ESMTPSA id wx9sm25492603wjb.6.2015.07.21.06.22.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jul 2015 06:22:46 -0700 (PDT) From: Srinivas Kandagatla To: Michal Marek Cc: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC] merge_config.sh: Add support to pass arguments to make Date: Tue, 21 Jul 2015 14:22:36 +0100 Message-Id: <1437484956-23985-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The issue is flags like ARCH can be passed to make via environment variable or at command line by passing "ARCH=" argument to make file. The former case works fine if used with merge_config but the later case would not work and resulting config file from merge_config is useless. I hit this issue when I started using config fragments on arm64 bit platform and I usually pass ARCH at the make command line. As it is common for users like me to pass ARCH variable in command line, providing such flexiblity in merge_config makes more sense. This patch adds support to pass arguments to make file, without this patch the user has to set the enviroment variables which is not explicit. Signed-off-by: Srinivas Kandagatla --- scripts/kconfig/merge_config.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index ec8e203..8d9cae4 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -28,6 +28,7 @@ trap clean_up HUP INT TERM usage() { echo "Usage: $0 [OPTIONS] [CONFIG [...]]" + echo " -a arguments to make command. ex: ARCH=arm" echo " -h display this help text" echo " -m only merge the fragments, do not execute the make command" echo " -n use allnoconfig instead of alldefconfig" @@ -39,6 +40,7 @@ RUNMAKE=true ALLTARGET=alldefconfig WARNREDUN=false OUTPUT=. +MAKE_ARGS="" while true; do case $1 in @@ -61,6 +63,11 @@ while true; do shift continue ;; + "-a") + MAKE_ARGS=$2 + shift 2 + continue + ;; "-O") if [ -d $2 ];then OUTPUT=$(echo $2 | sed 's/\/*$//') @@ -139,7 +146,7 @@ fi # Use the merged file as the starting point for: # alldefconfig: Fills in any missing symbols with Kconfig default # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set -make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET +make $MAKE_ARGS KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET # Check all specified config values took (might have missed-dependency issues)