1. 16 8月, 2017 4 次提交
  2. 15 8月, 2017 3 次提交
    • S
      env: Create a location driver for each location · 4415f1d1
      Simon Glass 提交于
      Set up a location driver for each supported environment location. 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.
      
      There are several special cases here in various drivers to handle
      peculiarities of certain boards:
      
      1. Some boards define CONFIG_ENV_IS_IN_FAT and CONFIG_SPL_ENV_SUPPORT but
      do not actually load the environment in SPL. The env load code was
      optimised out before but with the driver, it is not. Therefore a special
      case is added to env/fat.c. The correct fix (depending on board testing
      might be to disable CONFIG_SPL_ENV_SUPPORT.
      
      2. A similar situations happens with CONFIG_ENV_IS_IN_FLASH. Some boards
      do not actually load the environment in SPL, so to reduce code size we
      need to drop that code. A similar fix may be possible with these boards,
      or it may be possible to adjust the environment CONFIG settings.
      
      Added to the above is that the CONFIG_SPL_ENV_SUPPORT option does not
      apply when the environment is in flash.
      
      Obviously the above has been discovered through painful and time-consuming
      trial and error. Hopefully board maintainers can take a look and figure
      out what is actually needed.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      4415f1d1
    • S
      env: Add an enum for environment state · 203e94f6
      Simon Glass 提交于
      At present we have three states for the environment, numbered 0, 1 and 2.
      Add an enum to record this to avoid open-coded values.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      203e94f6
    • S
      Move environment files from common/ to env/ · 0649cd0d
      Simon Glass 提交于
      About a quarter of the files in common/ relate to the environment. It
      seems better to put these into their own subdirectory and remove the
      prefix.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      0649cd0d
  3. 25 6月, 2016 1 次提交
  4. 15 3月, 2016 1 次提交
  5. 12 9月, 2015 1 次提交
  6. 23 11月, 2014 1 次提交
  7. 09 8月, 2014 1 次提交
  8. 08 7月, 2014 1 次提交
    • W
      env_fat: use get_device_and_partition() during env save and load · be354c1a
      Wu, Josh 提交于
      Use get_device_and_partition() is better since:
      1. It will call the device initialize function internally. So we can
      remove the mmc intialization code to save many lines.
      2. It is used by fatls/fatload/fatwrite. So saveenv & load env should
      use it too.
      3. It can parse the "D:P", "D", "D:", "D:auto" string to get correct
      device and partition information by run-time.
      
      Also we remove the FAT_ENV_DEVICE and FAT_ENV_PART. We use a string:
      FAT_ENV_DEVICE_AND_PART.
      For at91sam9m10g45ek, it is "0". That means use device 0 and if:
      a)device 0 has no partition table, use the whole device as a FAT file
      system.
      b)device 0 has partittion table, use the partition #1.
      
      Refer to the commit: 10a37fd7 for details of device & partition string.
      Signed-off-by: NJosh Wu <josh.wu@atmel.com>
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      be354c1a
  9. 22 3月, 2014 1 次提交
  10. 15 10月, 2013 1 次提交
  11. 24 7月, 2013 1 次提交
  12. 06 4月, 2013 1 次提交
  13. 03 4月, 2013 1 次提交
  14. 14 12月, 2012 1 次提交
  15. 27 9月, 2012 2 次提交
  16. 31 3月, 2012 1 次提交
    • M
      Add support for loading and saving the environment to a FAT partition · 57210c7c
      Maximilian Schwerin 提交于
      The following must be defined:
      
      CONFIG_ENV_IS_IN_FAT
      	Enable this saving environment to FAT.
      
      FAT_ENV_INTERFACE
      	Interface the FAT resides on (e.g. mmc).
      
      FAT_ENV_DEVICE
      	The interface device number (e.g. 0 for mmc0)
      
      FAT_ENV_PART
      	The device part (e.g. 1 for mmc0:1)
      
      FAT_ENV_FILE
      	The filename of the environment file.
      
      Author:    Maximilian Schwerin <mvs@tigris.de>
      
      Removed dead DEBUG comment.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      57210c7c