[U-Boot] [PATCH v2 21/34] env: Create a location driver for each location

Tom Rini
2017-07-26T16:02:41Z

On Sun, Jul 23, 2017 at 09:19:56PM -0600, Simon Glass wrote:

> Set up a location driver for each supported environment locatoin. At
> present this just points to the global functions and is not used. A
> later patch will switch this over to use private functions in each driver.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Add conditions for the am335x_hs_evm board with SPL
[snip]
> diff --git a/env/fat.c b/env/fat.c
> index 5a2131a5a9..8f5fff81ad 100644
> --- a/env/fat.c
> +++ b/env/fat.c
> @@ -19,6 +19,18 @@
> #include <fat.h>
> #include <mmc.h>
>
> +#ifdef CONFIG_SPL_BUILD
> +/* TODO(sjg at chromium.org): Figure out why this is needed */
> +# if !defined(CONFIG_TARGET_AM335X_EVM) || defined(CONFIG_SPL_OS_BOOT)
> +# define LOADENV
> +# endif
> +#else
> +# define LOADENV
> +# if defined(CONFIG_CMD_SAVEENV)
> +# define CMD_SAVEENV
> +# endif
> +#endif

Hmm, so. I think we have an out-of-sync with desires defconfig here,
and I'm going to post a few patches shortly since I found some similar
things as part of the env Kconfig series. am335x_hs_evm turned off
almost all of the SPL stuff it doesn't want / need (such as SPL_OS) but
missed SPL_ENV_SUPPORT.

[snip]
> +/* TODO(sjg at chromium.org): Figure out all these special cases */
> +#if (!defined(CONFIG_MICROBLAZE) && !defined(CONFIG_ARCH_ZYNQ) && \
> + !defined(CONFIG_TARGET_MCCMON6) && !defined(CONFIG_TARGET_X600) && \
> + !defined(CONFIG_TARGET_EDMINIV2)) || \
> + !defined(CONFIG_SPL_BUILD)
> +#define LOADENV
> +#endif

I bet some of these special cases are also places where Kconfig logic
and human intentions got slightly out of sync.

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170726/6695dfcc/attachment.sig>