From patchwork Thu Jul 23 20:51:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 6856031 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B573EC05AC for ; Thu, 23 Jul 2015 20:51:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E43D82013A for ; Thu, 23 Jul 2015 20:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE80120421 for ; Thu, 23 Jul 2015 20:51:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754366AbbGWUvZ (ORCPT ); Thu, 23 Jul 2015 16:51:25 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:46960 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172AbbGWUvY (ORCPT ); Thu, 23 Jul 2015 16:51:24 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t6NKpMjw001367; Thu, 23 Jul 2015 15:51:22 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t6NKpM60006888; Thu, 23 Jul 2015 15:51:22 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Thu, 23 Jul 2015 15:51:22 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t6NKpMvc009213; Thu, 23 Jul 2015 15:51:22 -0500 Received: from localhost (a0272616local.am.dhcp.ti.com [172.22.124.21]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id t6NKpL900776; Thu, 23 Jul 2015 15:51:21 -0500 (CDT) From: Dan Murphy To: CC: , , Dan Murphy Subject: [PATCH] merge_config.sh: Add the ability to perform make with an ARCH Date: Thu, 23 Jul 2015 15:51:21 -0500 Message-ID: <1437684681-29452-1-git-send-email-dmurphy@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The script does not allow building for different architectures. It may assume that the developer has set the ARCH as a global variable. Add a switch argument to pass in the desired architecture. Then verify that that architecture is supported in the arch directory. If not exit if it is supported then set it. Signed-off-by: Dan Murphy --- scripts/kconfig/merge_config.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index ec8e203..bdbff4b 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -19,7 +19,16 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. - +verify_arch() { + cd arch + for d in * ; do + if [ "$d" = "$_TEST_ARCH" ]; then + BUILD_ARCH="ARCH="$d + break + fi + done + cd .. +} clean_up() { rm -f $TMP_FILE exit @@ -33,6 +42,7 @@ usage() { echo " -n use allnoconfig instead of alldefconfig" echo " -r list redundant entries when merging fragments" echo " -O dir to put generated output files" + echo " -A architecture to support for make" } RUNMAKE=true @@ -71,6 +81,21 @@ while true; do shift 2 continue ;; + "-A") + if [ "$2" != "" ]; then + _TEST_ARCH=$2 + verify_arch + if [ "$BUILD_ARCH" = "" ]; then + echo "ARCH $_TEST_ARCH is not valid" 1>&2 + exit 1 + fi + else + echo "ARCH $_TEST_ARCH is not valid" 1>&2 + exit 1 + fi + shift 2 + continue + ;; *) break ;; @@ -139,7 +164,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 $BUILD_ARCH KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET # Check all specified config values took (might have missed-dependency issues)