From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Wed, 26 Jul 2017 13:51:56 +0900 Subject: [U-Boot] [PATCH v2 00/34] env: Move environment code to use location drivers In-Reply-To: <20170724032009.43994-1-sjg@chromium.org> References: <20170724032009.43994-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, 2017-07-24 12:19 GMT+09:00 Simon Glass : > 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. 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. 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. Thanks for you work! -- Best Regards Masahiro Yamada