Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10ECEC433FE for ; Mon, 10 Oct 2022 15:18:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B61D84EEA; Mon, 10 Oct 2022 17:18:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="n/rq5Rnq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82A3C84ECC; Mon, 10 Oct 2022 17:18:40 +0200 (CEST) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 A3BF684EE9 for ; Mon, 10 Oct 2022 17:18:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x834.google.com with SMTP id ay9so6676897qtb.0 for ; Mon, 10 Oct 2022 08:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZA9hUVPR49WRaL3zD3xmw7vpXvzhobzNuetKpG0UHqU=; b=n/rq5RnqkE53N/OVnBHjP0P55/3WLwx+2t2nijACbaCNkAZaKerZo2p7BVEzefvL76 z17ybIDcvxxgMDIenEnyQVrb4KZmIkaEPCf1TK6PD6T+O2csKecdIi8AP0a3AYggdlGd 4x2+LzxA5oV0j03UwfjrWQfTbscxNypGsvQRI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZA9hUVPR49WRaL3zD3xmw7vpXvzhobzNuetKpG0UHqU=; b=7sbmBck1xkd0nvrueqq0I+dqp8jELVS55tu2g68i4oNP9ZX3tXBMyE768pqB9fbhO4 qvKbPhDQIxvHScJ5U/K9dl32MPK7esOd+x/647LfZ2V9z8QbmWnXDQzhv+D46EfDZPMx jrehNdGMVjlN5xjiumy0soQSEzUu7Om+YB8BhK+2iVVzR3gZKJU+mrr7hBVkEvS9elOl 4UtLJealN0xS62C9uy0DjV3qy7vSR81MUKrul9Jhmqdu3RrGjDBsOyMwGQC3tauK9ryv 6tCAArLWjRCY8BfyLEapo/eeeZSNYEosXdV5WBFctRJ2y9ktxS8mBuYJx/hvxOft+MvG yCFg== X-Gm-Message-State: ACrzQf2RGClAxgr1QVBkrsDcXDNx2r04frK6QiYi5BNc+zgSO8FOOKaz YaYXvNhrL744s0EFhY005a283npf9bp/qA== X-Google-Smtp-Source: AMsMyM7f6WkhuL/FSxlBQZdWZ8lJFqs8Xflfbh7UBheXcCHoZCM97EhPraDJQKoPIU+ZJYpeAly8NA== X-Received: by 2002:a05:622a:5d0:b0:39a:41fc:36fb with SMTP id d16-20020a05622a05d000b0039a41fc36fbmr4478105qtb.499.1665415113350; Mon, 10 Oct 2022 08:18:33 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-9534-07b5-32fb-791d.res6.spectrum.com. [2603:6081:7b00:6400:9534:7b5:32fb:791d]) by smtp.gmail.com with ESMTPSA id k15-20020a05620a414f00b006e6a7c2a269sm10308346qko.22.2022.10.10.08.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 08:18:33 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Rasmus Villemoes , Simon Glass Subject: [PATCH 2/2] buildman: Add --allow-missing-binaries flag to build with BINMAN_ALLOW_MISSING=1 Date: Mon, 10 Oct 2022 11:18:31 -0400 Message-Id: <20221010151831.3376759-2-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010151831.3376759-1-trini@konsulko.com> References: <20221010151831.3376759-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI. Cc: Rasmus Villemoes Cc: Simon Glass Signed-off-by: Tom Rini --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 6 +++--- tools/buildman/builder.py | 5 ++++- tools/buildman/builderthread.py | 2 ++ tools/buildman/cmdline.py | 3 +++ tools/buildman/control.py | 3 ++- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index f200b40dbb24..c932c2b3c619 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -553,7 +553,7 @@ stages: cat << "EOF" >> build.sh if [[ "${BUILDMAN}" != "" ]]; then ret=0; - tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?; + tools/buildman/buildman -o /tmp -P -E -W --allow-missing-binaries ${BUILDMAN} ${OVERRIDE} || ret=$?; if [[ $ret -ne 0 ]]; then tools/buildman/buildman -o /tmp -seP ${BUILDMAN}; exit $ret; diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7052a6061cb3..d9fb6518a0af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ build all 32bit ARM platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?; + ./tools/buildman/buildman -o /tmp -P -E -W --allow-missing-binaries arm -x aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; @@ -94,7 +94,7 @@ build all 64bit ARM platforms: - . /tmp/venv/bin/activate - pip install pyelftools - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?; + ./tools/buildman/buildman -o /tmp -P -E -W --allow-missing-binaries aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; @@ -114,7 +114,7 @@ build all other platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?; + ./tools/buildman/buildman -o /tmp -P -E -W --allow-missing-binaries -x arm,powerpc || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 76252b90792a..c07e2caab9a3 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -252,7 +252,8 @@ class Builder: mrproper=False, per_board_out_dir=False, config_only=False, squash_config_y=False, warnings_as_errors=False, work_in_output=False, - test_thread_exceptions=False, adjust_cfg=None): + test_thread_exceptions=False, adjust_cfg=None, + allow_missing_binaries=False): """Create a new Builder object Args: @@ -290,6 +291,7 @@ class Builder: ~C to disable C C=val to set the value of C (val must have quotes if C is a string Kconfig + allow_missing_binaries: Run build with BINMAN_ALLOW_MISSING=1 """ self.toolchains = toolchains @@ -327,6 +329,7 @@ class Builder: self.config_filenames = BASE_CONFIG_FILENAMES self.work_in_output = work_in_output self.adjust_cfg = adjust_cfg + self.allow_missing_binaries = allow_missing_binaries self._ide = False if not self.squash_config_y: diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 6240e08c7670..722ee17f0a03 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -253,6 +253,8 @@ class BuilderThread(threading.Thread): args.extend(['-j', str(self.builder.num_jobs)]) if self.builder.warnings_as_errors: args.append('KCFLAGS=-Werror') + if self.builder.allow_missing_binaries: + args.append('BINMAN_ALLOW_MISSING=1') config_args = ['%s_defconfig' % brd.target] config_out = '' args.extend(self.builder.toolchains.GetMakeArguments(brd)) diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py index b29c1eb5ee72..18ef1902c7cd 100644 --- a/tools/buildman/cmdline.py +++ b/tools/buildman/cmdline.py @@ -15,6 +15,9 @@ def ParseArgs(): parser = OptionParser() parser.add_option('-a', '--adjust-cfg', type=str, action='append', help='Adjust the Kconfig settings in .config before building') + parser.add_option('--allow-missing-binaries', action='store_true', + default=False, help='Tell binman to allow for external binaries to' + ' be missing and generate fake ones as needed'), 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 0c75466fbd3d..1289daeaef7e 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -329,7 +329,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, warnings_as_errors=options.warnings_as_errors, work_in_output=options.work_in_output, test_thread_exceptions=test_thread_exceptions, - adjust_cfg=adjust_cfg) + adjust_cfg=adjust_cfg, + allow_missing_binaries=options.allow_missing_binaries) builder.force_config_on_failure = not options.quick if make_func: builder.do_make = make_func -- 2.25.1