Hi Jonas,

On 2026-07-13T10:02:41, Alexey Charkov <[email protected]> wrote:
> rockchip: mkimage: Add option for image load address and flag
>
> The v2 image format supports defining a load address and flag for each
> embedded image.
>
> Add initial support for writing the image load address and flag to the
> v2 image format header.
>
> This may later be used for RK3576 to embed a minimal initial image that
> if required to fix booting from SD-card due to a BootROM issue.
>
> Signed-off-by: Jonas Karlman <[email protected]>
> Signed-off-by: Alexey Charkov <[email protected]>
>
> tools/rkcommon.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

> This may later be used for RK3576 to embed a minimal initial image that
> if required to fix booting from SD-card due to a BootROM issue.

Typo: 'that if required' should be 'that is required'.

> diff --git a/tools/rkcommon.c b/tools/rkcommon.c
> @@ -385,7 +389,8 @@ static void rkcommon_set_header0_v2(void *buf, struct 
> image_tool_params *params)
> -             hdr->images[i].address = 0xFFFFFFFF;
> +             hdr->images[i].address = spl_params.images[i].address ?: 
> 0xFFFFFFFF;
> +             hdr->images[i].flag = spl_params.images[i].flag;

Lower-case hex please.

These should have cpu_to_le32(), as with the other header fields, even
though I suspect we don't use big-endian with Rockchip.

Also, the subject says 'Add option' but no mkimage option is added -
the fields can only be set from within rkcommon.c - so perhaps 'Add
support for image load address and flag' would be more accurate.

Regards,
Simon

Reply via email to