[PATCH v3 8/9] binman: Add support for SCP firmware

Simon Glass sjg at chromium.org
Sun Sep 6 15:58:36 CEST 2020


Hi Samuel,

On Sat, 5 Sep 2020 at 21:26, Samuel Holland <samuel at sholland.org> wrote:
>
> Add an entry type for a firmware blob for a Sytem Control Processor,
> given by an entry arg. This firmware is a raw binary blob.
>
> Signed-off-by: Samuel Holland <samuel at sholland.org>
> ---
>  Makefile                  |  2 +-
>  tools/binman/etype/scp.py | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 1 deletion(-)
>  create mode 100644 tools/binman/etype/scp.py
>
> diff --git a/Makefile b/Makefile
> index d5aa8605c0a..5a6681f129e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1328,7 +1328,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
>                 build -u -d u-boot.dtb -O . -m --allow-missing \
>                 -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
>                 -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
> -               -a atf-bl31-path=${BL31} \
> +               -a atf-bl31-path=${BL31} -a scp-path=${SCP} \
>                 $(BINMAN_$(@F))
>
>  OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
> diff --git a/tools/binman/etype/scp.py b/tools/binman/etype/scp.py
> new file mode 100644
> index 00000000000..93f8787d2d7
> --- /dev/null
> +++ b/tools/binman/etype/scp.py
> @@ -0,0 +1,19 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +# Copyright 2020 Samuel Holland <samuel at sholland.org>
> +#
> +# Entry-type module for System Control Processor (SCP) firmware blob
> +#
> +
> +from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
> +
> +class Entry_scp(Entry_blob_named_by_arg):
> +    """Entry containing a System Control Processor (SCP) firmware blob
> +
> +    Properties / Entry arguments:
> +        - scp-path: Filename of file to read into the entry, typically scp.bin
> +
> +    This entry holds firmware for an external platform-specific coprocessor.
> +    """
> +    def __init__(self, section, etype, node):
> +        super().__init__(section, etype, node, 'scp')
> +        self.external = True
> --
> 2.26.2
>

This looks good but needs a test in ftest.py for code coverage:

binman test -T

Regards,
Simon


More information about the U-Boot mailing list