Hi Simon,

Le 10/07/2017 à 18:38, Simon Glass a écrit :
Hi Christophe,

On 10 July 2017 at 02:10, Christophe LEROY <christophe.le...@c-s.fr> wrote:
Simon,

Le 09/07/2017 à 22:52, Simon Glass a écrit :

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)
- figure out why CONFIG_ENV_IS_IN_FLASH enables the environment in flash
      even in SPL, which other locations do not


Simon Glass (30):
    Makefile: Rename 'env' target to 'environ'
    Move environment files from common/ to env/
    Convert CONFIG_ENV_IS_IN_MMC et al to Kconfig
    env: Move help from README to Kconfig
    Convert CONFIG_ENV_IS_IN_FLASH to Kconfig
    Convert CONFIG_ENV_IS_IN_NVRAM to Kconfig
    Convert CONFIG_ENV_IS_IN_EEPROM to Kconfig
    Convert CONFIG_ENV_IS_IN_DATAFLASH to Kconfig
    Convert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig
    Convert CONFIG_ENV_IS_IN_REMOTE to Kconfig
    Convert CONFIG_ENV_IS_IN_FAT to Kconfig
    env: common: Make env_get_addr/get_char_memory() static
    env: common: Drop env_get_addr()
    env: common: Factor out the common env_valid check
    env: common: Drop env_get_char_init()
    env: common: Drop env_get_char_memory()
    env: Add an enum for environment state
    env: Rename nand env_location to nand_env_location
    env: Create a location driver for each location
    env: Add a new implementation of environment access
    env: Switch over to use environment location drivers
    env: Drop common init() functions
    env: Drop the env_name_spec global
    env: Drop unused env_ptr variables
    env: Drop env_init_new()
    env: Drop env_get_char_spec()
    env: Drop env_relocate_spec() in favour of env_load()
    env: Drop saveenv() in favour of env_save()
    env: Adjust the get_char() method to return an int
    env: Adjust the load() method to return an error

   Kconfig                                            |   2 +
   Makefile                                           |   5 +-
   README                                             | 352
------------------
   arch/Kconfig                                       |   1 +
   arch/arm/Kconfig                                   |   2 +
   arch/arm/cpu/armv7/mx6/Kconfig                     |   1 +
   arch/arm/cpu/armv7/mx7/Kconfig                     |   1 +
   arch/arm/mach-exynos/Kconfig                       |   1 +
   arch/arm/mach-integrator/Kconfig                   |   2 +
   arch/arm/mach-mvebu/Kconfig                        |   1 +
   arch/arm/mach-omap2/boot-common.c                  |   3 +-
   arch/arm/mach-sunxi/Kconfig                        |   6 +
   arch/arm/mach-tegra/Kconfig                        |   3 +
   arch/m68k/Kconfig                                  |   8 +
   arch/microblaze/Kconfig                            |   1 +
   arch/mips/Kconfig                                  |   7 +
   arch/powerpc/Kconfig                               |   1 +
   arch/powerpc/cpu/mpc83xx/Kconfig                   |   6 +
   arch/powerpc/cpu/mpc85xx/Kconfig                   |   4 +
   arch/powerpc/cpu/mpc86xx/Kconfig                   |   1 +


It looks like the mpc8xx has been left behind.

It may just be that there are no useful 'imply' targets there.

include/configs/MCR3000.h contains the following:

#define CONFIG_ENV_IS_IN_FLASH  1
#define CONFIG_ENV_SECT_SIZE    (64 * 1024)
#define CONFIG_ENV_SIZE         CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_ADDR         (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
#define CONFIG_ENV_OFFSET       (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
#define CONFIG_ENV_OVERWRITE    1

So I would expect something about it in your serie. Maybe is it because this target was added recently in mainline ?

christophe
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to