]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
authorTom Rini <trini@konsulko.com>
Sat, 8 Apr 2017 13:28:02 +0000 (09:28 -0400)
committerTom Rini <trini@konsulko.com>
Sat, 8 Apr 2017 13:28:02 +0000 (09:28 -0400)
1  2 
common/Kconfig
include/configs/sunxi-common.h

diff --combined common/Kconfig
index ec519d07ccde408ef1d7e682a7ed9ffad4f0a344,04a73e07a22a7c13d765a6881a9316661421fc54..1879aefaf83d3e3c5b85a9113879f18cbe767e12
@@@ -90,7 -90,7 +90,7 @@@ config BOOTSTAGE_STASH_ADD
  
  config BOOTSTAGE_STASH_SIZE
        hex "Size of boot timing stash region"
 -      default 4096
 +      default 0x1000
        help
          This should be large enough to hold the bootstage stash. A value of
          4096 (4KiB) is normally plenty.
@@@ -158,6 -158,75 +158,75 @@@ config SPI_BOO
  
  endmenu
  
+ menu "Environment"
+ if ARCH_SUNXI
+ choice
+       prompt "Environment Device"
+       default ENV_IS_IN_MMC if ARCH_SUNXI
+ config ENV_IS_IN_MMC
+       bool "Environment in an MMC device"
+       depends on CMD_MMC
+       help
+         Define this if you have an MMC device which you want to use for the
+         environment.
+ config ENV_IS_IN_NAND
+       bool "Environment in a NAND device"
+       depends on CMD_NAND
+       help
+         Define this if you have a NAND device which you want to use for the
+         environment.
+ config ENV_IS_IN_UBI
+       bool "Environment in a UBI volume"
+       depends on CMD_UBI
+       depends on CMD_MTDPARTS
+       help
+         Define this if you have a UBI volume which you want to use for the
+         environment.
+ config ENV_IS_NOWHERE
+       bool "Environment is not stored"
+       help
+         Define this if you don't want to or can't have an environment stored
+         on a storage medium
+ endchoice
+ config ENV_OFFSET
+       hex "Environment Offset"
+       depends on !ENV_IS_IN_UBI
+       depends on !ENV_IS_NOWHERE
+       default 0x88000 if ARCH_SUNXI
+       help
+         Offset from the start of the device (or partition)
+ config ENV_SIZE
+       hex "Environment Size"
+       depends on !ENV_IS_NOWHERE
+       default 0x20000 if ARCH_SUNXI
+       help
+         Size of the environment storage area
+ config ENV_UBI_PART
+       string "UBI partition name"
+       depends on ENV_IS_IN_UBI
+       help
+         MTD partition containing the UBI device
+ config ENV_UBI_VOLUME
+       string "UBI volume name"
+       depends on ENV_IS_IN_UBI
+       help
+         Name of the volume that you want to store the environment in.
+ endif
+ endmenu
  config BOOTDELAY
        int "delay in seconds before automatically booting"
        default 2
index cda2fec519535decac2de2f9e9a80e484859a473,171cea24ec958d0681bb9b64f2c775761870100b..1d475b10ddf491eca0ecf34bae39bc2c92c9bc60
  #define CONFIG_SYS_NAND_MAX_ECCPOS 1664
  #define CONFIG_SYS_NAND_ONFI_DETECTION
  #define CONFIG_SYS_MAX_NAND_DEVICE 8
+ #define CONFIG_MTD_DEVICE
+ #define CONFIG_MTD_PARTITIONS
  #endif
  
  #ifdef CONFIG_SPL_SPI_SUNXI
  /* mmc config */
  #ifdef CONFIG_MMC
  #define CONFIG_MMC_SUNXI_SLOT         0
- #define CONFIG_ENV_IS_IN_MMC
+ #endif
+ #if defined(CONFIG_ENV_IS_IN_MMC)
  #define CONFIG_SYS_MMC_ENV_DEV                0       /* first detected MMC controller */
  #define CONFIG_SYS_MMC_MAX_DEVICE     4
+ #elif defined(CONFIG_ENV_IS_NOWHERE)
+ #define CONFIG_ENV_SIZE                       (128 << 10)
  #endif
  
  /* 64MB of malloc() pool */
  /* standalone support */
  #define CONFIG_STANDALONE_LOAD_ADDR   CONFIG_SYS_LOAD_ADDR
  
 -/* baudrate */
 -
 -/* The stack sizes are set up in start.S using the settings below */
 -#define CONFIG_STACKSIZE              (256 << 10)     /* 256 KiB */
 -
  /* FLASH and environment organization */
  
  #define CONFIG_SYS_MONITOR_LEN                (768 << 10)     /* 768 KiB */
  
- #define CONFIG_ENV_OFFSET             (544 << 10) /* (8 + 24 + 512) KiB */
- #define CONFIG_ENV_SIZE                       (128 << 10)     /* 128 KiB */
  #define CONFIG_FAT_WRITE      /* enable write access */
  
  #define CONFIG_SPL_FRAMEWORK
@@@ -325,13 -334,6 +329,6 @@@ extern int soft_i2c_gpio_scl
  #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
  #endif
  
- #if !defined CONFIG_ENV_IS_IN_MMC && \
-     !defined CONFIG_ENV_IS_IN_NAND && \
-     !defined CONFIG_ENV_IS_IN_FAT && \
-     !defined CONFIG_ENV_IS_IN_SPI_FLASH
- #define CONFIG_ENV_IS_NOWHERE
- #endif
  #define CONFIG_MISC_INIT_R
  
  #ifndef CONFIG_SPL_BUILD
        "stderr=serial\0"
  #endif
  
+ #ifdef CONFIG_MTDIDS_DEFAULT
+ #define SUNXI_MTDIDS_DEFAULT \
+       "mtdids=" CONFIG_MTDIDS_DEFAULT "\0"
+ #else
+ #define SUNXI_MTDIDS_DEFAULT
+ #endif
+ #ifdef CONFIG_MTDPARTS_DEFAULT
+ #define SUNXI_MTDPARTS_DEFAULT \
+       "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"
+ #else
+ #define SUNXI_MTDPARTS_DEFAULT
+ #endif
  #define CONSOLE_ENV_SETTINGS \
        CONSOLE_STDIN_SETTINGS \
        CONSOLE_STDOUT_SETTINGS
        DFU_ALT_INFO_RAM \
        "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
        "console=ttyS0,115200\0" \
+       SUNXI_MTDIDS_DEFAULT \
+       SUNXI_MTDPARTS_DEFAULT \
        BOOTCMD_SUNXI_COMPAT \
        BOOTENV