[U-Boot] [PATCH 1/2] arm: use $loadaddr as the standalone entry point

Wolfgang Denk wd at denx.de
Tue Aug 15 13:31:14 UTC 2017

Dear Max,

In message <1502799746.3076.16.camel at gmail.com> you wrote:
> Wolfgang says that a board needs to decide on what image type to
> use for the standalone application and then from that set an

No, I did not say this.  On contrary, this is not up to the "board"
to decide.  This is a decision tobe made by the end user, and U-Boot
shall not put any restrictions on this.  You may want to use a raw
binary image, someone else uses an ELF file or an uImage, and I
prefer to use a FIT image.

> appropriate CONFIG_STANDALONE_LOAD_ADDR in its board configuration.

The LOAD_ADDR you use it is a misleading name for where the image
gets loaded to in memory. Note that the payload can be compressed or
encrypted or what else.  The "load address" in the intended meaning
(as present in the image headers) is where the payload of the images
gets stored in memory (which may include decryption, uncompressing
or else).  And entry point is still something else.

> Without that the standalone binaries are useless anyway and setting
> a default in arch/arm/config.mk only purpose is that the build succeeds.

For the build process, only the "load address" and "entry point
address" in their original meaning should be interesting - but his
is not what CONFIG_STANDALONE_LOAD_ADDR provides.

> My motivation to write the patch in the first place (and Tom seems to
> agree) is that for boards who define nothing at least the plain binary
> is linked to a memory address where one can load something.

I also agree with this.  I just want to use a misleading name for
this default.  If you need an start address for the text segment
you should call it like that - we already have CONFIG_SYS_TEXT_BASE

> Note that I sent a v2 of the patchset addressing Wolfgang's first
> emails. v2 hopefully dropped the wrong connection of load/link
> address with entry point.

No, it does not, as it still uses CONFIG_LOADADDR (= default
download address of some image type) where you in fact mean the
default start address of the data payload only (and very likely this
is the same as the start of the text segment).

Best regards,

Wolfgang Denk

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A verbal contract isn't worth the paper it's written on.
                                                    -- Samuel Goldwyn

More information about the U-Boot mailing list