[U-Boot] [PATCH] tools: zynqmpimage: Add Xilinx ZynqMP boot header generation

Simon Glass sjg at chromium.org
Tue May 17 14:20:07 CEST 2016


Hi Michal,

On 17 May 2016 at 00:27, Michal Simek <michal.simek at xilinx.com> wrote:
> Add support for the zynqmpimage to mkimage.
> Only basic functionality is supported without encryption and register
> initialization with one partition which is filled by U-Boot SPL.
> For more detail information look at Xilinx ZynqMP TRM.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  common/image.c       |   1 +
>  include/image.h      |   3 +-
>  scripts/Makefile.spl |   9 ++
>  tools/Makefile       |   1 +
>  tools/zynqmpimage.c  | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 282 insertions(+), 1 deletion(-)
>  create mode 100644 tools/zynqmpimage.c
>
Reviewed-by: Simon Glass <sjg at chromium.org>

nit below.

> diff --git a/common/image.c b/common/image.c
> index 26d6c9a59279..9824685344bb 100644
> --- a/common/image.c
> +++ b/common/image.c
> @@ -159,6 +159,7 @@ static const table_entry_t uimage_type[] = {
>         {       IH_TYPE_RKSD,       "rksd",       "Rockchip SD Boot Image" },
>         {       IH_TYPE_RKSPI,      "rkspi",      "Rockchip SPI Boot Image" },
>         {       IH_TYPE_ZYNQIMAGE,  "zynqimage",  "Xilinx Zynq Boot Image" },
> +       {       IH_TYPE_ZYNQMPIMAGE, "zynqmpimage", "Xilinx ZynqMP Boot Image" },
>         {       -1,                 "",           "",                   },
>  };
>
> diff --git a/include/image.h b/include/image.h
> index f9ee5649c547..a8488f2b392e 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -246,8 +246,9 @@ struct lmb;
>  #define IH_TYPE_RKSD           24      /* Rockchip SD card             */
>  #define IH_TYPE_RKSPI          25      /* Rockchip SPI image           */
>  #define IH_TYPE_ZYNQIMAGE      26      /* Xilinx Zynq Boot Image */
> +#define IH_TYPE_ZYNQMPIMAGE    27      /* Xilinx ZynqMP Boot Image */
>
> -#define IH_TYPE_COUNT          27      /* Number of image types */
> +#define IH_TYPE_COUNT          28      /* Number of image types */
>
>  /*
>   * Compression Types
> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
> index ec8d8f1b72ad..5df860e7ed11 100644
> --- a/scripts/Makefile.spl
> +++ b/scripts/Makefile.spl
> @@ -129,7 +129,12 @@ endif
>  boot.bin: $(obj)/u-boot-spl.bin FORCE
>         $(call if_changed,mkimage)
>  else
> +ifdef CONFIG_ARCH_ZYNQ
>  MKIMAGEFLAGS_boot.bin = -T zynqimage
> +endif
> +ifdef CONFIG_ARCH_ZYNQMP
> +MKIMAGEFLAGS_boot.bin = -T zynqmpimage
> +endif
>
>  spl/boot.bin: $(obj)/u-boot-spl.bin FORCE
>         $(call if_changed,mkimage)
> @@ -157,6 +162,10 @@ ifdef CONFIG_ARCH_ZYNQ
>  ALL-y  += $(obj)/boot.bin
>  endif
>
> +ifdef CONFIG_ARCH_ZYNQMP
> +ALL-y  += $(obj)/boot.bin
> +endif

Can you do:

ALL-$(CONFIG_ARCH_ZYNQMP)  += $(obj)/boot.bin

?

> +
>  all:   $(ALL-y)
>
>  quiet_cmd_cat = CAT     $@

Regards,
Simon


More information about the U-Boot mailing list