[PATCH v2] mkimage: allow zynqmpbif to use a register initialization file

Michal Simek michal.simek at amd.com
Thu Jun 11 13:31:21 CEST 2026



On 6/5/26 15:57, Erich E. Hoover wrote:
> The ZynqMP Boot Image Format allows specifying the register
> initialization file with the "[init]" attribute.  Since this
> feature is already supported by the "zynqmpimage" backend, this
> commit leverages that existing capability to add support for the
> "[init]" attribute in the zynqmpbif backend:
> https://docs.amd.com/r/en-US/ug1283-bootgen-user-guide/init
> 
> We are using this feature, in combination with other zynqmpbif

imperative mood.

> options, like so:
> ===
> image : {
>       [init] fsbl.int

please use different name then fsbl because fsbl is not doing this programming.
That's done by bootrom itself.

Topic board is defining it like this.
board/topic/zynq/zynq-topic-miamiplus/ps7_regs.txt

but that's for zynq

Actually I think would be good to recap format because origin format
is different compare to what it is used by bootgen right now.

https://docs.amd.com/r/en-US/ug1283-bootgen-user-guide/Initialization-Pairs-and-INT-File-Attribute


>       [bootloader] fsbl.elf
>       [pmufw_image] pmufw.elf
>       [destination_cpu=none] fsbl.tcl
>       [destination_cpu=a53-0, exception_level=el-3] bl31.elf
>       [destination_cpu=a53-0, exception_level=el-2, load=0x08000000,
> startup=0x08000000] u-boot.bin
> }
> ===
> 
> Signed-off-by: Erich E. Hoover <erich.e.hoover at gmail.com>
> ---
>   tools/zynqmpbif.c   | 16 ++++++++++++++--
>   tools/zynqmpimage.c |  4 ++--
>   tools/zynqmpimage.h |  2 ++
>   3 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c
> index 82ce0ac1a52..546b9e4fd9d 100644
> --- a/tools/zynqmpbif.c
> +++ b/tools/zynqmpbif.c
> @@ -191,6 +191,7 @@ static char *parse_partition_owner(char *line, struct bif_entry *bf)
>   }
>   
>   static const struct bif_flags bif_flags[] = {
> +	{ "init", BIF_FLAG_INIT },
>   	{ "fsbl_config", BIF_FLAG_FSBL_CONFIG },
>   	{ "trustzone", BIF_FLAG_TZ },
>   	{ "pmufw_image", BIF_FLAG_PMUFW_IMAGE },
> @@ -279,7 +280,7 @@ static int bif_add_blob(const void *data, size_t len, size_t *offset)
>   	return 0;
>   }
>   
> -static int bif_init(void)
> +static int bif_initialize(void)

What's the reason for this rename? I don't think you should rename it because it 
is just distracting.

Anyway I have tested this patch and output looks reasonable. I would obviously 
prefer to add more features there (like ignoring comments) or unify the format
but that's out of the purpose of this patch.

Thanks,
Michal


More information about the U-Boot mailing list