[U-Boot] [PATCH v2 00/34] env: Move environment code to use location drivers
Simon Glass
sjg at chromium.org
Fri Jul 28 03:40:24 UTC 2017
Hi Masahiro,
On 25 July 2017 at 22:51, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> Hi Simon,
>
>
> 2017-07-24 12:19 GMT+09:00 Simon Glass <sjg at 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
More information about the U-Boot
mailing list