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 3DB71C433EF for ; Wed, 6 Apr 2022 12:29:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BFCB83CAC; Wed, 6 Apr 2022 14:29:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="oohY7YRI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA88F83D0B; Wed, 6 Apr 2022 14:29:43 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 47473806B7 for ; Wed, 6 Apr 2022 14:29:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-francis@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 236CTQah028952; Wed, 6 Apr 2022 07:29:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1649248167; bh=yL4bd1HL+dV5V119MXBYmeRx+ZTx44G9qiYRhlOYM30=; h=From:To:CC:Subject:Date; b=oohY7YRIYIhK+iWJl7o6jyN3fZxD/aB+SNObwdYd5kMOFZN5pPvRsrM/HLfLWssFS CxKJ3tpA3E0v70vfX0oNTXpwda2nYT02dFahcrICsSG3PlApzHCxGHItNLbe6czORW /8Zv1rWkp3GT44J/8HLZaoe1PXGleUBwLXfY0vBk= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 236CTQ9S030923 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 Apr 2022 07:29:26 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 6 Apr 2022 07:29:26 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Wed, 6 Apr 2022 07:29:26 -0500 Received: from ula0497641.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 236CTJch104086; Wed, 6 Apr 2022 07:29:21 -0500 From: Neha Malcom Francis To: CC: , , , , , , , , , , , Subject: [RESEND, RFC 0/8] Integration of sysfw and tispl with U-Boot Date: Wed, 6 Apr 2022 17:59:11 +0530 Message-ID: <20220406122919.6104-1-n-francis@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.5 at phobos.denx.de X-Virus-Status: Clean Resending this patch as I had added an improper tag last time. Devices that belong to the K3 architecture require SYSFW which is a FIT image consisting of a signed system firmware image and board config binaries. Board config binaries are needed to bring up SYSFW during U-Boot SPL startup. The board config data is given in YAML as input. These board configs contain board-specific information such as resource management, power management and security. The following series intends to plumb the system firmware generation into U-Boot using binman for packaging. Thus it will eliminate the need for additional custom repositories for SYSFW generation and also moves t owards the community standard build flow. The series also plumbs the generation of tispl.bin into the build flow. This image is required for loading u-boot in K3 devices. The image is packaged using ATF, OPTEE and DM (Device Manager). Please note that the following series has implemented the above for J721E general purpose board. The board configs and device trees added are specific to J721E GP devices. Also note the introduction of two new etypes for sysfw and ti-dm. The binman tests for sysfw has coverage of 90%, this is believed to be because of the requirement of sysfw to access a signing script located outside the binman directory. Logs of the binman test is located here: https://pastebin.ubuntu.com/p/n5CdT7TFJg/ On running CI tests on Github, errors were produced during world builds of keystone2_keystone3 and siemens (I0T2050 which is based on AM65x). This patch series is intended for only J721E and future work is to expand to the remaining K3 devices as well. The errors that come are mainly due to the boards other than J721E trying to generate tispl.bin. Error logs of the CI test is located here: https://pastebin.ubuntu.com/p/rpMrWzH7tv/ Neha Malcom Francis (8): tools: config: yaml: Add board config class to generate config binaries binman: etype: sysfw: Add entry type for sysfw schema: yaml: Add board config schema config: yaml: j721e_evm: Add board config for J721E EVM binman: sysfw: Add support for packaging tiboot3.bin and sysfw.itb binman: dtsi: sysfw: j721e: Use binman to package sysfw.itb binman: etype: dm: Add entry type for TI DM binman: dtsi: tispl: j721e: Use binman to package tispl.bin Makefile | 1 + arch/arm/dts/j721e-a72-binman.dtsi | 92 + arch/arm/dts/j721e-r5-binman.dtsi | 75 + .../k3-j721e-common-proc-board-u-boot.dtsi | 1 + .../k3-j721e-r5-common-proc-board-u-boot.dtsi | 1 + arch/arm/mach-k3/config.mk | 54 +- board/ti/common/schema.yaml | 355 ++ board/ti/j721e/Kconfig | 2 + board/ti/j721e/config.yaml | 3162 +++++++++++++++++ scripts/Makefile.spl | 4 - test/py/requirements.txt | 1 + tools/binman/entries.rst | 21 + tools/binman/etype/sysfw.py | 60 + tools/binman/etype/ti_dm.py | 22 + tools/binman/ftest.py | 14 + tools/binman/test/225_ti_dm.dts | 13 + tools/binman/test/226_sysfw.dts | 13 + tools/tibcfg_gen.py | 116 + 18 files changed, 3969 insertions(+), 38 deletions(-) create mode 100644 arch/arm/dts/j721e-a72-binman.dtsi create mode 100644 arch/arm/dts/j721e-r5-binman.dtsi create mode 100644 board/ti/common/schema.yaml create mode 100644 board/ti/j721e/config.yaml create mode 100644 tools/binman/etype/sysfw.py create mode 100644 tools/binman/etype/ti_dm.py create mode 100644 tools/binman/test/225_ti_dm.dts create mode 100644 tools/binman/test/226_sysfw.dts create mode 100644 tools/tibcfg_gen.py -- 2.17.1