From patchwork Sun Mar 15 23:42:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1255193 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=AfluWGs5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48gbdV4Rkrz9sPF for ; Mon, 16 Mar 2020 10:45:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B48C8155C; Mon, 16 Mar 2020 00:44:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="AfluWGs5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 55EDC815B0; Mon, 16 Mar 2020 00:43:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BDBA480E7C for ; Mon, 16 Mar 2020 00:43:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id v3so5190425iot.11 for ; Sun, 15 Mar 2020 16:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dq5ufDx72ovSrkSUEqlL739nd2v5G7tpsVZf8nVb/6Q=; b=AfluWGs5aB/xMQqgMvGINyABbsf81jBJ/8JiAwinrocKxr/xLyXh487WYvphlo2ceA DdONRGIbNQ7KYZWwsuyOyiQdf8SrbsE9dHqPARJQjvIE0LEpCMHhnpGjnu/9Zb2mX3oJ A3QyRxWnDBofQ9ij65pFWplHTDuYtXnHx03hM= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=dq5ufDx72ovSrkSUEqlL739nd2v5G7tpsVZf8nVb/6Q=; b=IIBOQZkmrTMWS51W3atF1noT86Lni6HCAn2Nxx32lbm+GTDL+/W9Ox0zlPcIOPhplS PwvKohESrDeCav2fHVLRxQhGuX3ESzP/8b1LFmToAptOU5IHdpxVqcer0N9uS/bFvJIF S2mKi8Fu+JHd9OF7kUaafci7pCoyy1FH1PZTRWScMN3MDoLKj9kKyk4mh7zjLnVr+DEi Gu2lGLw+XhDqnG/Qdetz5ThSzTawMEKaCQHNE+QfUhKHSIsrhJ/bGpzLD9PQZtTwL+il cwanRZq6N5FHyINeEAC2LdXmrxtavA/JpQ+BAzVgGd8U9IJeKwbZ6T6EL4W2fspb1FKS b4fA== X-Gm-Message-State: ANhLgQ0CgVF1UUPWTOvvO9horm8DLz7FwzDs0kO6pnzvwenpWg9Pinpw ioPgSrAH+oWEjvicXPUHAPamIV1GR/w= X-Google-Smtp-Source: ADFU+vtk6JwUrb/CCsK7vpQ/sRyVDQttYLRcY9EjUlUegqRLoxqAnPa+7FGTYsbF1gcMUnEwRTofmg== X-Received: by 2002:a02:6c50:: with SMTP id w77mr22302370jab.39.1584315814339; Sun, 15 Mar 2020 16:43:34 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id l6sm5345148ilh.27.2020.03.15.16.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2020 16:43:34 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Stephen Warren , Stephen Warren , Tom Rini , Simon Glass Subject: [PATCH v2 09/23] buildman: Drop the -a option Date: Sun, 15 Mar 2020 17:42:49 -0600 Message-Id: <20200315234303.18598-7-sjg@chromium.org> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-goog In-Reply-To: <20200315234303.18598-1-sjg@chromium.org> References: <20200315234303.18598-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean There is no point in setting the ARCH environment variable since the U-Boot build system no-longer uses it. It seems safe to drop this feature since it was only recently added. Signed-off-by: Simon Glass --- Changes in v2: - Add a new patch to drop the -a option tools/buildman/cmdline.py | 2 -- tools/buildman/control.py | 17 ++++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py index f387aeb1cf..17ea015a95 100644 --- a/tools/buildman/cmdline.py +++ b/tools/buildman/cmdline.py @@ -13,8 +13,6 @@ def ParseArgs(): args: command lin arguments """ parser = OptionParser() - parser.add_option('-a', '--print-arch', action='store_true', - help='Print the architecture for a board (ARCH=)') parser.add_option('-A', '--print-prefix', action='store_true', help='Print the tool-chain prefix for a board (CROSS_COMPILE=)') parser.add_option('-b', '--branch', type='string', diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 7d31863c63..5ddc598c95 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -85,16 +85,15 @@ def ShowActions(series, why_selected, boards_selected, builder, options, for warning in board_warnings: print(col.Color(col.YELLOW, warning)) -def ShowToolchainInfo(boards, toolchains, print_arch, print_prefix): +def ShowToolchainPrefix(boards, toolchains): """Show information about a the tool chain used by one or more boards - The function checks that all boards use the same toolchain. + The function checks that all boards use the same toolchain, then prints + the correct value for CROSS_COMPILE. Args: boards: Boards object containing selected boards toolchains: Toolchains object containing available toolchains - print_arch: True to print ARCH value - print_prefix: True to print CROSS_COMPILE value Return: None on success, string error message otherwise @@ -107,10 +106,7 @@ def ShowToolchainInfo(boards, toolchains, print_arch, print_prefix): return 'Supplied boards must share one toolchain' return False tc = tc_set.pop() - if print_arch: - print(tc.GetEnvArgs(toolchain.VAR_ARCH)) - if print_prefix: - print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) + print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) return None def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, @@ -206,9 +202,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, if not len(selected): sys.exit(col.Color(col.RED, 'No matching boards found')) - if options.print_arch or options.print_prefix: - err = ShowToolchainInfo(boards, toolchains, options.print_arch, - options.print_prefix) + if options.print_prefix: + err = ShowToolchainInfo(boards, toolchains) if err: sys.exit(col.Color(col.RED, err)) return 0