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 0966DC433F5 for ; Mon, 18 Apr 2022 19:58:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1980083AFF; Mon, 18 Apr 2022 21:58:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NrmCG/4y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F149883AE2; Mon, 18 Apr 2022 21:58:22 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 F3FA883AE2 for ; Mon, 18 Apr 2022 21:58:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ej1-x62a.google.com with SMTP id u15so28709258ejf.11 for ; Mon, 18 Apr 2022 12:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=dWAfH0nUDtKXQI26YNhinW92k1zFa+H8fk6P6eYS0q4=; b=NrmCG/4y1cmFiYzjjO27WBM3Ijb2EhFHjXTPQ6HdZ3XFzgGdVvj9Hah5shGQ2+ppoP n/kzBKfYFW9WkqKLFGbX0MS4AnST0sKrFw0yK52rmd1EWNebVcmayYJXdV9nSg2NJmi6 wsd94Mg0blEsq8+FdLlBeLrL5SHYvd22HQBsSx9/TlL/0kDAFhudLCx/Nr8wp6DPyNhI RzG6ryhQvgWAz5cMCQzI4lJ3EqMndYAwLqzgi0rhWW8Jx42S7ZIqBUJTomR6ii0+5vgx V4qCbDd0zEjEiSq5mxgGxkozSw/5ZS8P2BffD+za/Rk0a47S6jtKWLERlQalxTUDbjeP FrgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=dWAfH0nUDtKXQI26YNhinW92k1zFa+H8fk6P6eYS0q4=; b=ug7w4RNK4MFAHxrX2wT7RBw3FsaQ2ZLymVwC9pgoz5uhxrmgJktEs2k3z8HNldr/dv FS0YnI79fQgyMXaYXXxJ0/CO7Qe1Wcbfwc0Ja90Nnt5O8xEb/rhF4YMB5DOPqkaEHcz3 0tiL+7lLBV4dy0eQ73GacnGUoEwEWuxsHPbkWB+TubEv1VdTikB5zG8usij5meVgxW7H dPA7R9Zy8Zl9e6JzkrckIn+edAeg2G7KaRx4gE+PylWzBq8N3Xfrd6AKapueU0wNU5Bz RYhXueGKXxHS0z6rQZYNFskAAftzX7pAstotKiAiKvEnNvHrsXigdYJI604u0RkTYgfi oirw== X-Gm-Message-State: AOAM5319MN8FDP7n5tKJkpO3ooj8GsP0kHmlipKyVBcPpp2gt+a1zYUB pQ68OsJjRJ7eipOxjUkxxG8= X-Google-Smtp-Source: ABdhPJw/zvushNx+NkH29LOKcNpVSZ6t+p4SyNZ6f1yDp+GX44NAzP6vHagXFN8ggTcuZWyGVW7fRQ== X-Received: by 2002:a17:906:358f:b0:6ee:32ef:8cb with SMTP id o15-20020a170906358f00b006ee32ef08cbmr10790112ejb.601.1650311895660; Mon, 18 Apr 2022 12:58:15 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id o23-20020a056402039700b00423d630e575sm3619338edv.11.2022.04.18.12.58.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Apr 2022 12:58:15 -0700 (PDT) Message-ID: Date: Mon, 18 Apr 2022 22:56:25 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 From: Alper Nebi Yasak Subject: Re: [RESEND, RFC 5/8] binman: sysfw: Add support for packaging tiboot3.bin and sysfw.itb To: Neha Malcom Francis Cc: sjg@chromium.org, marek.behun@nic.cz, xypron.glpk@gmx.de, vigneshr@ti.com, a-govindraju@ti.com, kristo@kernel.org, s-anna@ti.com, kishon@ti.com, joel.peshkin@broadcom.com, patrick.delaunay@foss.st.com, mr.nuke.me@gmail.com, nm@ti.com, u-boot@lists.denx.de References: <20220406122919.6104-1-n-francis@ti.com> <20220406122919.6104-6-n-francis@ti.com> Content-Language: en-US In-Reply-To: <20220406122919.6104-6-n-francis@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 06/04/2022 15:29, Neha Malcom Francis wrote: > 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. I think it'd make sense to squash these changes into the first patch where you introduce the python script. Then you can order the series as: yaml files, tibcfg_gen.py, binman etypes, binman dts changes. Also the subject has 'binman:' but these aren't really changes to binman, so maybe it shouldn't. > > K3_CERT_GEN has been introduced in config.mk to remove hardcoding of the > certificate signing script. This seems to be an independent change, maybe extract it to a new patch? > > 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