[RESEND, RFC 5/8] binman: sysfw: Add support for packaging tiboot3.bin and sysfw.itb

Alper Nebi Yasak alpernebiyasak at gmail.com
Mon Apr 18 21:56:25 CEST 2022


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 <n-francis at ti.com>
> ---
>  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


More information about the U-Boot mailing list