All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 00/34] env: Move environment code to use location drivers
Date: Thu, 27 Jul 2017 21:40:24 -0600	[thread overview]
Message-ID: <CAPnjgZ2o5ivCcDmdDN_205_NhzBTjiP1v_47QKdsB5nefG3tww@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAQqcVp-Si56_Jq5X8_0m3iUkhBLnxrgdedrPUZkf6xrhw@mail.gmail.com>

Hi Masahiro,

On 25 July 2017 at 22:51, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Hi Simon,
>
>
> 2017-07-24 12:19 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> The environment code is ripe for improvement in various ways. It has lots
>> of duplication and inconsistencies between how things work with different
>> environment locations. It does not properly use Kconfig. Error checking
>> and handling is patchy.
>>
>> This series makes a start at improving things:
>>
>> - moves the rest of the CONFIG_ENV_IS_IN_... options to Kconfig
>> - introduces the concept of a location driver for the environment
>> - drops some of the duplicated code
>> - improves error handling a little (more to be done here)
>> - moves code into a new env/ directory
>>
>> There is still much more to do:
>> - complete Kconfig conversion (e.g. CONFIG_ENV_SIZE)
>> - unify environment settings so that all locations support the same options
>> - try to rationalise the redundancy code (can we create a common
>>     implementation used by all drivers?)
>> - allow environment in multiple locations (e.g. as a fallback)
>
>
>
> I noticed CONFIG_ENV_IS_IN_* options have been moved to Kconfig.
>
>
> In Kconfig, users are allowed to enable as many options as they like.
>
>  [ ] Environment in dataflash
>  [*] Environment in EEPROM
>  [*] Environment is in a FAT filesystem
>  [*] Environment in flash memory
>  [*] Environment in an MMC device
>  [*] Environment in a NAND device
>  [*] Environment in a non-volatile RAM
>  [*] Environment is in OneNAND
>  [*] Environment is in remove memory space
>  [*] Environment is in SPI flash
>  [*] Environment in a UBI volume
>  [*] Environment is not stored
>
> Enabling multiple locations will cause build error for now.

What is the error?

>
> I assume you intentionally did not use "choice" because
> you mentioned "allow environment in multiple locations" as your future plan.
>
> Is this right?
>
> This maybe already in your mind.

Yes that's right. Also it does not seem possible to migrate with
moveconfig with a choice.

>
>
> I'd like to decide environment source run-time.
>
> For boot image location,
> we provide board_boot_order() hook
> to change the spl_boot_list.
>
> I though we could provide a similar way to
> decide the search order of environments.
> I do not have enough time these days, but it is good if you
> are taking care of it.

Yes it would be nice. I think this is enough for this release, but
hopefully next one.

>
>
> Thanks for you work!
>

:-)

>
>
> --
> Best Regards
> Masahiro Yamada

Regards,
Simon

      reply	other threads:[~2017-07-28  3:40 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  3:19 [U-Boot] [PATCH v2 00/34] env: Move environment code to use location drivers Simon Glass
2017-07-24  3:19 ` [U-Boot] [PATCH v2 01/34] configs: Resync with savedefconfig Simon Glass
2017-07-24  3:19 ` [U-Boot] [PATCH v2 02/34] Makefile: Rename 'env' target to 'environ' Simon Glass
2017-07-26 16:13   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 03/34] Move environment files from common/ to env/ Simon Glass
2017-07-26 16:13   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 04/34] Convert CONFIG_ENV_IS_IN_MMC et al to Kconfig Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 05/34] env: Move help from README " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 06/34] Convert CONFIG_ENV_IS_IN_FLASH " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 07/34] Convert CONFIG_ENV_IS_IN_NVRAM " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 08/34] Convert CONFIG_ENV_IS_IN_EEPROM " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 09/34] Convert CONFIG_ENV_IS_IN_DATAFLASH " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 10/34] Convert CONFIG_ENV_IS_IN_SPI_FLASH " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 11/34] Convert CONFIG_ENV_IS_IN_REMOTE " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 12/34] Convert CONFIG_ENV_IS_IN_FAT " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 13/34] Convert CONFIG_ENV_IS_IN_ONENAND " Simon Glass
2017-07-26  1:36   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 14/34] env: common: Make env_get_addr/get_char_memory() static Simon Glass
2017-07-26 16:13   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 15/34] env: common: Drop env_get_addr() Simon Glass
2017-07-26 16:13   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 16/34] env: common: Factor out the common env_valid check Simon Glass
2017-07-26 16:13   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 17/34] env: common: Drop env_get_char_init() Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 18/34] env: common: Drop env_get_char_memory() Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 19/34] env: Add an enum for environment state Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 20/34] env: Rename nand env_location to nand_env_location Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 21/34] env: Create a location driver for each location Simon Glass
2017-07-26 16:02   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 22/34] env: Add a new implementation of environment access Simon Glass
2017-07-26 16:04   ` Tom Rini
2017-07-26 16:32     ` Simon Glass
2017-07-26 17:23       ` Tom Rini
2017-07-26 18:02         ` Simon Glass
2017-07-26 20:13           ` Tom Rini
2017-08-01  9:49             ` Simon Glass
2017-07-24  3:19 ` [U-Boot] [PATCH v2 23/34] env: Switch over to use environment location drivers Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:19 ` [U-Boot] [PATCH v2 24/34] env: Drop common init() functions Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 25/34] env: Drop the env_name_spec global Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 26/34] env: Drop unused env_ptr variables Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 27/34] env: Drop env_init_new() Simon Glass
2017-07-26 16:14   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 28/34] env: Drop env_get_char_spec() Simon Glass
2017-07-26 16:15   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 29/34] env: Drop env_relocate_spec() in favour of env_load() Simon Glass
2017-07-26 16:15   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 30/34] env: Drop saveenv() in favour of env_save() Simon Glass
2017-07-26 16:15   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 31/34] env: Rename setenv() and friends to env_set() Simon Glass
2017-07-26 16:11   ` Tom Rini
2017-07-26 16:28     ` Simon Glass
2017-07-26 17:29       ` Tom Rini
2017-07-26 17:43         ` Tom Rini
2017-07-26 18:34           ` Simon Glass
2017-07-26 20:14             ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 32/34] env: Rename getenv() and friends to env_get() Simon Glass
2017-07-26 16:12   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 33/34] env: Adjust the get_char() method to return an int Simon Glass
2017-07-26 16:15   ` Tom Rini
2017-07-24  3:20 ` [U-Boot] [PATCH v2 34/34] env: Adjust the load() method to return an error Simon Glass
2017-07-26 16:15   ` Tom Rini
2017-07-25 17:49 ` [U-Boot] [PATCH v2 00/34] env: Move environment code to use location drivers Tom Rini
2017-07-25 21:40   ` Simon Glass
2017-07-25 21:47     ` Tom Rini
2017-07-26  4:51 ` Masahiro Yamada
2017-07-28  3:40   ` Simon Glass [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ2o5ivCcDmdDN_205_NhzBTjiP1v_47QKdsB5nefG3tww@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.