From patchwork Wed Mar 18 09:57:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 243803 List-Id: U-Boot discussion From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=) Date: Wed, 18 Mar 2020 10:57:51 +0100 Subject: [RFC PATCH 4/9] make_fit_atf.py: produce working binaries by default In-Reply-To: <20200318095757.9365-1-ynezz@true.cz> References: <20200318095757.9365-1-ynezz@true.cz> Message-ID: <20200318095757.9365-5-ynezz@true.cz> 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")