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 D3B42C433EF for ; Wed, 6 Apr 2022 12:30:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6175883DCB; Wed, 6 Apr 2022 14:30:29 +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="RZHye/mS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7E13183DC2; Wed, 6 Apr 2022 14:30:15 +0200 (CEST) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 F394B83DCB for ; Wed, 6 Apr 2022 14:30:03 +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 fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 236CTsdA082951; Wed, 6 Apr 2022 07:29:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1649248194; bh=QOfIQiimNmh3rWYubNw16QCAm+M4pP7mHB23yMHUuGI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RZHye/mScpvICfrJsqQUEVub/R5+ZS9lDq3Yce9AAqJy099hndw3j4gqVWfaMPy98 XLUuUXh2sAjwiZ2BuXBI5ls2+S0ty7ERg7IWYBVVuFLzlfusioCpo24gGKUC6fm94D MhhXnbx8+AoC1xhp2VhcDaxza1HHtokcIiWCeSwY= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 236CTsal031060 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 Apr 2022 07:29:54 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE108.ent.ti.com (157.170.170.38) 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:53 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE100.ent.ti.com (157.170.170.30) 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:53 -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 236CTJcm104086; Wed, 6 Apr 2022 07:29:49 -0500 From: Neha Malcom Francis To: CC: , , , , , , , , , , , Subject: [RESEND, RFC 5/8] binman: sysfw: Add support for packaging tiboot3.bin and sysfw.itb Date: Wed, 6 Apr 2022 17:59:16 +0530 Message-ID: <20220406122919.6104-6-n-francis@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220406122919.6104-1-n-francis@ti.com> References: <20220406122919.6104-1-n-francis@ti.com> 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 For devices that require sysfw.itb, board config binary artifacts must be populated in the R5 output directory. These can be used by binman to package sysfw.itb. config.mk for mach-k3 updated to generate the required binaries using tibcfg_gen.py. K3_CERT_GEN has been introduced in config.mk to remove hardcoding of the certificate signing script. Signed-off-by: Neha Malcom Francis --- arch/arm/mach-k3/config.mk | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk index da458bcfb2..5491fc4dc8 100644 --- a/arch/arm/mach-k3/config.mk +++ b/arch/arm/mach-k3/config.mk @@ -13,6 +13,7 @@ endif IMAGE_SIZE= $(shell cat $(obj)/u-boot-spl.bin | wc -c) MAX_SIZE= $(shell printf "%d" $(CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE)) +K3_CERT_GEN= $(srctree)/tools/k3_gen_x509_cert.sh ifeq ($(CONFIG_SYS_K3_KEY), "") KEY="" @@ -28,6 +29,24 @@ else KEY=$(patsubst "%",$(srctree)/%,$(CONFIG_SYS_K3_KEY)) endif +# Board config binary artifacts necessary for packaging of tiboot3.bin +# and sysfw.itb by binman, currently for general purpose devices and +# devices that require sysfw.itb in ROM boot image. Currently set up +# for J721E +ifneq ($(CONFIG_SOC_K3_J721E), ) +ifneq ($(CONFIG_TI_SECURE_DEVICE), y) + +CONFIG_YAML = $(srctree)/board/ti/$(BOARD)/config.yaml +SCHEMA_YAML = $(srctree)/board/ti/common/schema.yaml +board-cfg.bin pm-cfg.bin rm-cfg.bin sec-cfg.bin: + $(PYTHON3) $(srctree)/tools/tibcfg_gen.py $(CONFIG_YAML) $(SCHEMA_YAML) +INPUTS-y += board-cfg.bin +INPUTS-y += pm-cfg.bin +INPUTS-y += rm-cfg.bin +INPUTS-y += sec-cfg.bin +endif +endif + # tiboot3.bin is mandated by ROM and ROM only supports R5 boot. # So restrict tiboot3.bin creation for CPU_V7R. ifdef CONFIG_CPU_V7R @@ -41,7 +60,7 @@ image_check: $(obj)/u-boot-spl.bin FORCE fi tiboot3.bin: image_check FORCE - $(srctree)/tools/k3_gen_x509_cert.sh -c 16 -b $(obj)/u-boot-spl.bin \ + $(K3_CERT_GEN) -c 16 -b $(obj)/u-boot-spl.bin \ -o $@ -l $(CONFIG_SPL_TEXT_BASE) -k $(KEY) INPUTS-y += tiboot3.bin -- 2.17.1