From patchwork Wed Mar 18 09:57:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1257388 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 48j5B117wlz9sPk for ; Wed, 18 Mar 2020 20:59:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CDA081704; Wed, 18 Mar 2020 10:58:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1383281591; Wed, 18 Mar 2020 10:58:22 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-out.xnet.cz (smtp-out.xnet.cz [178.217.244.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 190B6814DE for ; Wed, 18 Mar 2020 10:58:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=ynezz@true.cz Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 86380458C; Wed, 18 Mar 2020 10:58:10 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 4a45bf8d; Wed, 18 Mar 2020 10:57:57 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: u-boot@lists.denx.de, Simon Glass , Philipp Tomsich , Kever Yang Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Subject: [RFC PATCH 4/9] make_fit_atf.py: produce working binaries by default Date: Wed, 18 Mar 2020 10:57:51 +0100 Message-Id: <20200318095757.9365-5-ynezz@true.cz> In-Reply-To: <20200318095757.9365-1-ynezz@true.cz> References: <20200318095757.9365-1-ynezz@true.cz> 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 At this moment unusable binaries are produced if bl31.elf file is missing in order to allow passing of various CI tests. This intention of broken binaries has to be now explicitly confirmed via new BUILDBOT_BROKEN_BINARIES config option, so usable binaries are produced by default from now on. Signed-off-by: Petr Štetiar --- arch/arm/mach-rockchip/make_fit_atf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d15c32b30329..4c55a87b51f2 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -196,17 +196,20 @@ def unpack_elf(filename): def main(): uboot_elf = "./u-boot" fit_its = sys.stdout + broken_binaries = os.getenv("BUILDBOT_BROKEN_BINARIES") == "y" if "BL31" in os.environ: bl31_elf=os.getenv("BL31"); elif os.path.isfile("./bl31.elf"): bl31_elf = "./bl31.elf" - else: + elif broken_binaries: os.system("echo 'int main(){}' > bl31.c") os.system("${CROSS_COMPILE}gcc -c bl31.c -o bl31.elf") bl31_elf = "./bl31.elf" + else: logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) - logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional') - logging.warning(' Please read Building section in doc/README.rockchip') + logging.error(' BL31 file bl31.elf NOT found, resulting binary would be non-functional') + logging.error(' Please read Building section in doc/README.rockchip') + sys.exit(1) if "TEE" in os.environ: tee_elf = os.getenv("TEE")