#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
mainmenu "U-Boot $UBOOTVERSION Configuration"

config UBOOTVERSION
	string
	option env="UBOOTVERSION"

# Allow defaults in arch-specific code to override any given here
source "arch/Kconfig"

menu "General setup"

config LOCALVERSION
	string "Local version - append to U-Boot release"
	help
	  Append an extra string to the end of your U-Boot version.
	  This will show up on your boot log, for example.
	  The string you set here will be appended after the contents of
	  any files with a filename matching localversion* in your
	  object and source tree, in that order.  Your total string can
	  be a maximum of 64 characters.

config LOCALVERSION_AUTO
	bool "Automatically append version information to the version string"
	default y
	help
	  This will try to automatically determine if the current tree is a
	  release tree by looking for git tags that belong to the current
	  top of tree revision.

	  A string of the format -gxxxxxxxx will be added to the localversion
	  if a git-based tree is found.  The string generated by this will be
	  appended after any matching localversion* files, and after the value
	  set in CONFIG_LOCALVERSION.

	  (The actual string used here is the first eight characters produced
	  by running the command:

	    $ git rev-parse --verify HEAD

	  which is done within the script "scripts/setlocalversion".)

config CC_OPTIMIZE_FOR_SIZE
	bool "Optimize for size"
	default y
	help
	  Enabling this option will pass "-Os" instead of "-O2" to gcc
	  resulting in a smaller U-Boot image.

	  This option is enabled by default for U-Boot.

config SYS_MALLOC_F
	bool "Enable malloc() pool before relocation"
	default y if DM
	help
	  Before relocation memory is very limited on many platforms. Still,
	  we can provide a small malloc() pool if needed. Driver model in
	  particular needs this to operate, so that it can allocate the
	  initial serial device and any others that are needed.

config SYS_MALLOC_F_LEN
	hex "Size of malloc() pool before relocation"
	depends on SYS_MALLOC_F
	default 0x400
	help
	  Before relocation memory is very limited on many platforms. Still,
	  we can provide a small malloc() pool if needed. Driver model in
	  particular needs this to operate, so that it can allocate the
	  initial serial device and any others that are needed.

menuconfig EXPERT
	bool "Configure standard U-Boot features (expert users)"
	default y
	help
	  This option allows certain base U-Boot options and settings
	  to be disabled or tweaked. This is for specialized
	  environments which can tolerate a "non-standard" U-Boot.
	  Only use this if you really know what you are doing.

if EXPERT
	config SYS_MALLOC_CLEAR_ON_INIT
	bool "Init with zeros the memory reserved for malloc (slow)"
	default y
	help
	  This setting is enabled by default. The reserved malloc
	  memory is initialized with zeros, so first malloc calls
	  will return the pointer to the zeroed memory. But this
	  slows the boot time.

	  It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN
	  value, has more than few MiB, e.g. when uses bzip2 or bmp logo.
	  Then the boot time can be significantly reduced.
	  Warning:
	  When disabling this, please check if malloc calls, maybe
	  should be replaced by calloc - if expects zeroed memory.
endif
endmenu		# General setup

menu "Boot images"

config SUPPORT_SPL
	bool

config SUPPORT_TPL
	bool

config SPL
	bool
	depends on SUPPORT_SPL
	prompt "Enable SPL"
	help
	  If you want to build SPL as well as the normal image, say Y.

config SPL_STACK_R
	depends on SPL
	bool "Enable SDRAM location for SPL stack"
	help
	  SPL starts off execution in SRAM and thus typically has only a small
	  stack available. Since SPL sets up DRAM while in its board_init_f()
	  function, it is possible for the stack to move there before
	  board_init_r() is reached. This option enables a special SDRAM
	  location for the SPL stack. U-Boot SPL switches to this after
	  board_init_f() completes, and before board_init_r() starts.

config SPL_STACK_R_ADDR
	depends on SPL_STACK_R
	hex "SDRAM location for SPL stack"
	help
	  Specify the address in SDRAM for the SPL stack. This will be set up
	  before board_init_r() is called.

config TPL
	bool
	depends on SPL && SUPPORT_TPL
	prompt "Enable TPL"
	help
	  If you want to build TPL as well as the normal image and SPL, say Y.

config FIT
	bool "Support Flattened Image Tree"
	help
	  This option allows to boot the new uImage structrure,
	  Flattened Image Tree.  FIT is formally a FDT, which can include
	  images of various types (kernel, FDT blob, ramdisk, etc.)
	  in a single blob.  To boot this new uImage structure,
	  pass the the address of the blob to the "bootm" command.

config FIT_VERBOSE
	bool "Display verbose messages on FIT boot"
	depends on FIT

config FIT_SIGNATURE
	bool "Enable signature verification of FIT uImages"
	depends on FIT
	depends on DM
	select RSA
	help
	  This option enables signature verification of FIT uImages,
	  using a hash signed and verified using RSA. If
	  CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
	  hashing is available using hardware, RSA library will use it.
	  See doc/uImage.FIT/signature.txt for more details.

config SYS_EXTRA_OPTIONS
	string "Extra Options (DEPRECATED)"
	help
	  The old configuration infrastructure (= mkconfig + boards.cfg)
	  provided the extra options field. If you have something like
	  "HAS_BAR,BAZ=64", the optional options
	    #define CONFIG_HAS
	    #define CONFIG_BAZ	64
	  will be defined in include/config.h.
	  This option was prepared for the smooth migration from the old
	  configuration to Kconfig. Since this option will be removed sometime,
	  new boards should not use this option.

config SYS_TEXT_BASE
	depends on SPARC || ARC
	hex "Text Base"
	help
	  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture

config SYS_CLK_FREQ
	depends on ARC
	int "CPU clock frequency"
	help
	  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture

endmenu		# Boot images

source "common/Kconfig"

source "dts/Kconfig"

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

source "lib/Kconfig"

source "test/Kconfig"
