mbox series

[ImageBuilder,v4,0/1] Imagebuilder dynamic addresses and sizes

Message ID 20220930155849.2210574-1-andrei.cherechesu@oss.nxp.com (mailing list archive)
Headers show
Series Imagebuilder dynamic addresses and sizes | expand

Message

Andrei Cherechesu Sept. 30, 2022, 3:58 p.m. UTC
From: Andrei Cherechesu <andrei.cherechesu@nxp.com>

This sent patch adds support for dynamically computing the addresses
and sizes for loaded binaries via the boot script generated by
Imagebuilder.

Compared to the v3 version of the patch, this includes Stefano's
suggestions of not adding as many "if" statements on the
$dynamic_loading_opt parameter added by the patch, along with
keeping compatibility with the FDTEDIT case.

The sent patch extends Stefano's suggestion, by also keeping
the normal flow (without "-s" parameter) mostly unaltered: the addresses
inside the generated script are literals, and the $memaddr variable
is not re-computed after each binary loaded since it's unused. The
only difference in the normal flow is that the binaries' sizes and
addresses are stored after loading each binary. Also, removed the "0x"
prefix of $memaddr set on the first line in the generated script.

These mentioned changes, compared to Stefano's suggestion, need
an additional 2 "if" branches on $dynamic_loading_opt, which I
find a worthy tradeoff for keeping the normal flow mostly unaltered.
Otherwise, I'm also happy to go with Stefano's suggestion, but
the script generated on the normal flow would contain many
unnecessary steps.

Andrei Cherechesu (1):
  uboot-script-gen: Dynamically compute addr and size when loading
    binaries


 scripts/uboot-script-gen | 114 +++++++++++++++++++++++++++------------
 1 file changed, 80 insertions(+), 34 deletions(-)