[U-Boot] [PATCH v2 13/15] env: Mark env_get_location as weak

Maxime Ripard maxime.ripard at free-electrons.com
Thu Jan 18 17:21:33 UTC 2018


Hi Simon,

On Wed, Jan 17, 2018 at 03:07:58PM -0700, Simon Glass wrote:
> On 16 January 2018 at 01:16, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> > Allow boards and architectures to override the default environment lookup
> > code by overriding env_get_location.
> >
> > Reviewed-by: Andre Przywara <andre.przywara at arm.com>
> > Reviewed-by: Lukasz Majewski <lukma at denx.de>
> > Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> > ---
> >  env/env.c | 20 +++++++++++++++++++-
> >  1 file changed, 19 insertions(+), 1 deletion(-)
> >
> 
> I still don't really understand why this needs to be a weak function.
> If the board knows the priority order, can it not put it into
> global_data? We could have a little u8 array of 4 items with a
> terminator?

Sure that would be simpler, but that would also prevent us from doing
"smart" things based on data other than just whether the previous
environment is usable. Things based for example on a GPIO state, or a
custom algorithm to transition (or duplicate) the environment.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180118/0e5f9ddb/attachment.sig>


More information about the U-Boot mailing list