xref: /openbmc/u-boot/Kconfig (revision da74d1f3)
151631259SMasahiro Yamada#
251631259SMasahiro Yamada# For a description of the syntax of this configuration file,
359d7c34bSRobert P. J. Day# see the file Documentation/kbuild/kconfig-language.txt in the
459d7c34bSRobert P. J. Day# Linux kernel source tree.
551631259SMasahiro Yamada#
651631259SMasahiro Yamadamainmenu "U-Boot $UBOOTVERSION Configuration"
751631259SMasahiro Yamada
851631259SMasahiro Yamadaconfig UBOOTVERSION
951631259SMasahiro Yamada	string
1051631259SMasahiro Yamada	option env="UBOOTVERSION"
1151631259SMasahiro Yamada
1266afaef2SSimon Glass# Allow defaults in arch-specific code to override any given here
1366afaef2SSimon Glasssource "arch/Kconfig"
1466afaef2SSimon Glass
1551631259SMasahiro Yamadamenu "General setup"
1651631259SMasahiro Yamada
17e91c3c33SMasahiro Yamadaconfig LOCALVERSION
18e91c3c33SMasahiro Yamada	string "Local version - append to U-Boot release"
19e91c3c33SMasahiro Yamada	help
20e91c3c33SMasahiro Yamada	  Append an extra string to the end of your U-Boot version.
2159d7c34bSRobert P. J. Day	  This will show up in your boot log, for example.
22e91c3c33SMasahiro Yamada	  The string you set here will be appended after the contents of
23e91c3c33SMasahiro Yamada	  any files with a filename matching localversion* in your
24e91c3c33SMasahiro Yamada	  object and source tree, in that order.  Your total string can
25e91c3c33SMasahiro Yamada	  be a maximum of 64 characters.
26e91c3c33SMasahiro Yamada
27e91c3c33SMasahiro Yamadaconfig LOCALVERSION_AUTO
28e91c3c33SMasahiro Yamada	bool "Automatically append version information to the version string"
29e91c3c33SMasahiro Yamada	default y
30e91c3c33SMasahiro Yamada	help
31e91c3c33SMasahiro Yamada	  This will try to automatically determine if the current tree is a
3259d7c34bSRobert P. J. Day	  release tree by looking for Git tags that belong to the current
33e91c3c33SMasahiro Yamada	  top of tree revision.
34e91c3c33SMasahiro Yamada
35e91c3c33SMasahiro Yamada	  A string of the format -gxxxxxxxx will be added to the localversion
3659d7c34bSRobert P. J. Day	  if a Git-based tree is found.  The string generated by this will be
37e91c3c33SMasahiro Yamada	  appended after any matching localversion* files, and after the value
38e91c3c33SMasahiro Yamada	  set in CONFIG_LOCALVERSION.
39e91c3c33SMasahiro Yamada
40e91c3c33SMasahiro Yamada	  (The actual string used here is the first eight characters produced
41e91c3c33SMasahiro Yamada	  by running the command:
42e91c3c33SMasahiro Yamada
43e91c3c33SMasahiro Yamada	    $ git rev-parse --verify HEAD
44e91c3c33SMasahiro Yamada
45e91c3c33SMasahiro Yamada	  which is done within the script "scripts/setlocalversion".)
46e91c3c33SMasahiro Yamada
474a8ed8e2SMasahiro Yamadaconfig CC_OPTIMIZE_FOR_SIZE
484a8ed8e2SMasahiro Yamada	bool "Optimize for size"
494a8ed8e2SMasahiro Yamada	default y
504a8ed8e2SMasahiro Yamada	help
514a8ed8e2SMasahiro Yamada	  Enabling this option will pass "-Os" instead of "-O2" to gcc
524a8ed8e2SMasahiro Yamada	  resulting in a smaller U-Boot image.
534a8ed8e2SMasahiro Yamada
544a8ed8e2SMasahiro Yamada	  This option is enabled by default for U-Boot.
554a8ed8e2SMasahiro Yamada
569f823615SHans de Goedeconfig DISTRO_DEFAULTS
579f823615SHans de Goede	bool "Select defaults suitable for booting general purpose Linux distributions"
589f823615SHans de Goede	default y if ARCH_SUNXI
599f823615SHans de Goede	default n
609f823615SHans de Goede	select CMD_BOOTZ
619f823615SHans de Goede	select CMD_DHCP
629f823615SHans de Goede	select CMD_EXT2
639f823615SHans de Goede	select CMD_EXT4
649f823615SHans de Goede	select CMD_FAT
659f823615SHans de Goede	select CMD_FS_GENERIC
669f823615SHans de Goede	select CMD_MII
679f823615SHans de Goede	select CMD_PING
689f823615SHans de Goede	select HUSH_PARSER
699f823615SHans de Goede	help
709f823615SHans de Goede	  Select this to enable various options and commands which are suitable
719f823615SHans de Goede	  for building u-boot for booting general purpose Linux distributions.
729f823615SHans de Goede
73b724bd7dSSimon Glassconfig SYS_MALLOC_F
74b724bd7dSSimon Glass	bool "Enable malloc() pool before relocation"
75326a6823SMasahiro Yamada	default y if DM
76b724bd7dSSimon Glass	help
7759d7c34bSRobert P. J. Day	  Before relocation, memory is very limited on many platforms. Still,
78b724bd7dSSimon Glass	  we can provide a small malloc() pool if needed. Driver model in
79b724bd7dSSimon Glass	  particular needs this to operate, so that it can allocate the
80b724bd7dSSimon Glass	  initial serial device and any others that are needed.
81b724bd7dSSimon Glass
82b724bd7dSSimon Glassconfig SYS_MALLOC_F_LEN
83b724bd7dSSimon Glass	hex "Size of malloc() pool before relocation"
84b724bd7dSSimon Glass	depends on SYS_MALLOC_F
85b724bd7dSSimon Glass	default 0x400
86b724bd7dSSimon Glass	help
8759d7c34bSRobert P. J. Day	  Before relocation, memory is very limited on many platforms. Still,
88b724bd7dSSimon Glass	  we can provide a small malloc() pool if needed. Driver model in
89b724bd7dSSimon Glass	  particular needs this to operate, so that it can allocate the
90b724bd7dSSimon Glass	  initial serial device and any others that are needed.
91b724bd7dSSimon Glass
921bf0979fSTom Rinimenuconfig EXPERT
931bf0979fSTom Rini	bool "Configure standard U-Boot features (expert users)"
940aa8a4adSPrzemyslaw Marczak	default y
951bf0979fSTom Rini	help
961bf0979fSTom Rini	  This option allows certain base U-Boot options and settings
971bf0979fSTom Rini	  to be disabled or tweaked. This is for specialized
981bf0979fSTom Rini	  environments which can tolerate a "non-standard" U-Boot.
9959d7c34bSRobert P. J. Day	  Use this only if you really know what you are doing.
1001bf0979fSTom Rini
1010aa8a4adSPrzemyslaw Marczakif EXPERT
1020aa8a4adSPrzemyslaw Marczak	config SYS_MALLOC_CLEAR_ON_INIT
1030aa8a4adSPrzemyslaw Marczak	bool "Init with zeros the memory reserved for malloc (slow)"
1040aa8a4adSPrzemyslaw Marczak	default y
1050aa8a4adSPrzemyslaw Marczak	help
1060aa8a4adSPrzemyslaw Marczak	  This setting is enabled by default. The reserved malloc
1070aa8a4adSPrzemyslaw Marczak	  memory is initialized with zeros, so first malloc calls
1080aa8a4adSPrzemyslaw Marczak	  will return the pointer to the zeroed memory. But this
1090aa8a4adSPrzemyslaw Marczak	  slows the boot time.
1100aa8a4adSPrzemyslaw Marczak
1110aa8a4adSPrzemyslaw Marczak	  It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN
1120aa8a4adSPrzemyslaw Marczak	  value, has more than few MiB, e.g. when uses bzip2 or bmp logo.
1130aa8a4adSPrzemyslaw Marczak	  Then the boot time can be significantly reduced.
1140aa8a4adSPrzemyslaw Marczak	  Warning:
1150aa8a4adSPrzemyslaw Marczak	  When disabling this, please check if malloc calls, maybe
11659d7c34bSRobert P. J. Day	  should be replaced by calloc - if one expects zeroed memory.
1170aa8a4adSPrzemyslaw Marczakendif
11840ad4c4bSMasahiro Yamadaendmenu		# General setup
11940ad4c4bSMasahiro Yamada
120e91c3c33SMasahiro Yamadamenu "Boot images"
121e91c3c33SMasahiro Yamada
12202627356SMasahiro Yamadaconfig SUPPORT_SPL
12302627356SMasahiro Yamada	bool
12402627356SMasahiro Yamada
125cf6bbe4cSMasahiro Yamadaconfig SUPPORT_TPL
126cf6bbe4cSMasahiro Yamada	bool
127cf6bbe4cSMasahiro Yamada
12851631259SMasahiro Yamadaconfig SPL
12951631259SMasahiro Yamada	bool
13002627356SMasahiro Yamada	depends on SUPPORT_SPL
131d648964fSMasahiro Yamada	prompt "Enable SPL"
13251631259SMasahiro Yamada	help
13351631259SMasahiro Yamada	  If you want to build SPL as well as the normal image, say Y.
13451631259SMasahiro Yamada
1351eb0c03cSHans de Goedeconfig SPL_SYS_MALLOC_SIMPLE
1361eb0c03cSHans de Goede	bool
1371eb0c03cSHans de Goede	depends on SPL
13859d7c34bSRobert P. J. Day	prompt "Only use malloc_simple functions in the SPL"
1391eb0c03cSHans de Goede	help
1401eb0c03cSHans de Goede	  Say Y here to only use the *_simple malloc functions from
14159d7c34bSRobert P. J. Day	  malloc_simple.c, rather then using the versions from dlmalloc.c;
1421eb0c03cSHans de Goede	  this will make the SPL binary smaller at the cost of more heap
1431eb0c03cSHans de Goede	  usage as the *_simple malloc functions do not re-use free-ed mem.
1441eb0c03cSHans de Goede
145db910353SSimon Glassconfig SPL_STACK_R
146db910353SSimon Glass	depends on SPL
147db910353SSimon Glass	bool "Enable SDRAM location for SPL stack"
148db910353SSimon Glass	help
149db910353SSimon Glass	  SPL starts off execution in SRAM and thus typically has only a small
150db910353SSimon Glass	  stack available. Since SPL sets up DRAM while in its board_init_f()
151db910353SSimon Glass	  function, it is possible for the stack to move there before
152db910353SSimon Glass	  board_init_r() is reached. This option enables a special SDRAM
153db910353SSimon Glass	  location for the SPL stack. U-Boot SPL switches to this after
154db910353SSimon Glass	  board_init_f() completes, and before board_init_r() starts.
155db910353SSimon Glass
156db910353SSimon Glassconfig SPL_STACK_R_ADDR
157db910353SSimon Glass	depends on SPL_STACK_R
158db910353SSimon Glass	hex "SDRAM location for SPL stack"
159db910353SSimon Glass	help
160db910353SSimon Glass	  Specify the address in SDRAM for the SPL stack. This will be set up
161db910353SSimon Glass	  before board_init_r() is called.
162db910353SSimon Glass
163dcfcb8d4SHans de Goedeconfig SPL_STACK_R_MALLOC_SIMPLE_LEN
164dcfcb8d4SHans de Goede	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
165dcfcb8d4SHans de Goede	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
166dcfcb8d4SHans de Goede	default 0x100000
167dcfcb8d4SHans de Goede	help
168dcfcb8d4SHans de Goede	  Specify the amount of the stack to use as memory pool for
169dcfcb8d4SHans de Goede	  malloc_simple after switching the stack to DRAM. This may be set
170dcfcb8d4SHans de Goede	  to give board_init_r() a larger heap then the initial heap in
171dcfcb8d4SHans de Goede	  SRAM which is limited to SYS_MALLOC_F_LEN bytes.
172dcfcb8d4SHans de Goede
17310172962SSimon Glassconfig SPL_SEPARATE_BSS
17410172962SSimon Glass	depends on SPL
17510172962SSimon Glass	bool "BSS section is in a different memory region from text"
17610172962SSimon Glass	help
17710172962SSimon Glass	  Some platforms need a large BSS region in SPL and can provide this
17810172962SSimon Glass	  because RAM is already set up. In this case BSS can be moved to RAM.
17910172962SSimon Glass	  This option should then be enabled so that the correct device tree
18010172962SSimon Glass	  location is used. Normally we put the device tree at the end of BSS
18110172962SSimon Glass	  but with this option enabled, it goes at _image_binary_end.
18210172962SSimon Glass
18351631259SMasahiro Yamadaconfig TPL
18451631259SMasahiro Yamada	bool
185cf6bbe4cSMasahiro Yamada	depends on SPL && SUPPORT_TPL
186d648964fSMasahiro Yamada	prompt "Enable TPL"
18751631259SMasahiro Yamada	help
18851631259SMasahiro Yamada	  If you want to build TPL as well as the normal image and SPL, say Y.
18951631259SMasahiro Yamada
190b6cf4439SMasahiro Yamadaconfig FIT
191b6cf4439SMasahiro Yamada	bool "Support Flattened Image Tree"
192b6cf4439SMasahiro Yamada	help
193b6cf4439SMasahiro Yamada	  This option allows to boot the new uImage structrure,
194b6cf4439SMasahiro Yamada	  Flattened Image Tree.  FIT is formally a FDT, which can include
195b6cf4439SMasahiro Yamada	  images of various types (kernel, FDT blob, ramdisk, etc.)
196b6cf4439SMasahiro Yamada	  in a single blob.  To boot this new uImage structure,
1971f9ac4a4SIgor Grinberg	  pass the address of the blob to the "bootm" command.
19873223f0eSSimon Glass	  FIT is very flexible, supporting compression, multiple images,
19973223f0eSSimon Glass	  multiple configurations, verification through hashing and also
20073223f0eSSimon Glass	  verified boot (secure boot using RSA). This option enables that
20173223f0eSSimon Glass	  feature.
202b6cf4439SMasahiro Yamada
20351c14cd1STeddy Reedconfig SPL_FIT
20451c14cd1STeddy Reed	bool "Support Flattened Image Tree within SPL"
20551c14cd1STeddy Reed	depends on FIT
20651c14cd1STeddy Reed	depends on SPL
20751c14cd1STeddy Reed
208b6cf4439SMasahiro Yamadaconfig FIT_VERBOSE
209b6cf4439SMasahiro Yamada	bool "Display verbose messages on FIT boot"
210b6cf4439SMasahiro Yamada	depends on FIT
211b6cf4439SMasahiro Yamada
212b6cf4439SMasahiro Yamadaconfig FIT_SIGNATURE
213c4beb22fSRuchika Gupta	bool "Enable signature verification of FIT uImages"
214b6cf4439SMasahiro Yamada	depends on FIT
2159009798dSChris Kuethe	depends on DM
216c4beb22fSRuchika Gupta	select RSA
217b6cf4439SMasahiro Yamada	help
218b6cf4439SMasahiro Yamada	  This option enables signature verification of FIT uImages,
21994e3c8c4Sgaurav rana	  using a hash signed and verified using RSA. If
22094e3c8c4Sgaurav rana	  CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
22173223f0eSSimon Glass	  hashing is available using hardware, then then RSA library will use
22273223f0eSSimon Glass	  it. See doc/uImage.FIT/signature.txt for more details.
22373223f0eSSimon Glass
22473223f0eSSimon Glass	  WARNING: When relying on signed FIT images with a required signature
22573223f0eSSimon Glass	  check the legacy image format is disabled by default, so that
22673223f0eSSimon Glass	  unsigned images cannot be loaded. If a board needs the legacy image
22773223f0eSSimon Glass	  format support in this case, enable it using
22873223f0eSSimon Glass	  CONFIG_IMAGE_FORMAT_LEGACY.
22973223f0eSSimon Glass
23051c14cd1STeddy Reedconfig SPL_FIT_SIGNATURE
23151c14cd1STeddy Reed	bool "Enable signature verification of FIT firmware within SPL"
23251c14cd1STeddy Reed	depends on SPL_FIT
23351c14cd1STeddy Reed	depends on SPL_DM
23451c14cd1STeddy Reed	select SPL_RSA
23551c14cd1STeddy Reed
23673223f0eSSimon Glassconfig FIT_BEST_MATCH
23773223f0eSSimon Glass	bool "Select the best match for the kernel device tree"
23873223f0eSSimon Glass	depends on FIT
23973223f0eSSimon Glass	help
24073223f0eSSimon Glass	  When no configuration is explicitly selected, default to the
24173223f0eSSimon Glass	  one whose fdt's compatibility field best matches that of
24273223f0eSSimon Glass	  U-Boot itself. A match is considered "best" if it matches the
24373223f0eSSimon Glass	  most specific compatibility entry of U-Boot's fdt's root node.
24473223f0eSSimon Glass	  The order of entries in the configuration's fdt is ignored.
24573223f0eSSimon Glass
24673223f0eSSimon Glassconfig FIT_VERBOSE
24773223f0eSSimon Glass	bool "Show verbose messages when FIT images fails"
24873223f0eSSimon Glass	depends on FIT
24973223f0eSSimon Glass	help
25073223f0eSSimon Glass	  Generally a system will have valid FIT images so debug messages
25173223f0eSSimon Glass	  are a waste of code space. If you are debugging your images then
25273223f0eSSimon Glass	  you can enable this option to get more verbose information about
25373223f0eSSimon Glass	  failures.
25473223f0eSSimon Glass
25573223f0eSSimon Glassconfig OF_BOARD_SETUP
25673223f0eSSimon Glass	bool "Set up board-specific details in device tree before boot"
25773223f0eSSimon Glass	depends on OF_LIBFDT
25873223f0eSSimon Glass	help
25973223f0eSSimon Glass	  This causes U-Boot to call ft_board_setup() before booting into
26073223f0eSSimon Glass	  the Operating System. This function can set up various
26173223f0eSSimon Glass	  board-specific information in the device tree for use by the OS.
26273223f0eSSimon Glass	  The device tree is then passed to the OS.
26373223f0eSSimon Glass
26473223f0eSSimon Glassconfig OF_SYSTEM_SETUP
26573223f0eSSimon Glass	bool "Set up system-specific details in device tree before boot"
26673223f0eSSimon Glass	depends on OF_LIBFDT
26773223f0eSSimon Glass	help
26873223f0eSSimon Glass	  This causes U-Boot to call ft_system_setup() before booting into
26973223f0eSSimon Glass	  the Operating System. This function can set up various
27073223f0eSSimon Glass	  system-specific information in the device tree for use by the OS.
27173223f0eSSimon Glass	  The device tree is then passed to the OS.
27273223f0eSSimon Glass
27373223f0eSSimon Glassconfig OF_STDOUT_VIA_ALIAS
27473223f0eSSimon Glass	bool "Update the device-tree stdout alias from U-Boot"
27573223f0eSSimon Glass	depends on OF_LIBFDT
27673223f0eSSimon Glass	help
27773223f0eSSimon Glass	  This uses U-Boot's serial alias from the aliases node to update
27873223f0eSSimon Glass	  the device tree passed to the OS. The "linux,stdout-path" property
27973223f0eSSimon Glass	  in the chosen node is set to point to the correct serial node.
28073223f0eSSimon Glass	  This option currently references CONFIG_CONS_INDEX, which is
28173223f0eSSimon Glass	  incorrect when used with device tree as this option does not
28273223f0eSSimon Glass	  exist / should not be used.
283b6cf4439SMasahiro Yamada
28451631259SMasahiro Yamadaconfig SYS_EXTRA_OPTIONS
28551631259SMasahiro Yamada	string "Extra Options (DEPRECATED)"
28651631259SMasahiro Yamada	help
28751631259SMasahiro Yamada	  The old configuration infrastructure (= mkconfig + boards.cfg)
288ed36323fSMasahiro Yamada	  provided the extra options field. If you have something like
28951631259SMasahiro Yamada	  "HAS_BAR,BAZ=64", the optional options
29051631259SMasahiro Yamada	    #define CONFIG_HAS
29151631259SMasahiro Yamada	    #define CONFIG_BAZ	64
29251631259SMasahiro Yamada	  will be defined in include/config.h.
29351631259SMasahiro Yamada	  This option was prepared for the smooth migration from the old
29451631259SMasahiro Yamada	  configuration to Kconfig. Since this option will be removed sometime,
29551631259SMasahiro Yamada	  new boards should not use this option.
29651631259SMasahiro Yamada
2977f7563ceSMasahiro Yamadaconfig SYS_TEXT_BASE
298c6e18144SMasahiro Yamada	depends on SPARC || ARC || X86 || ARCH_UNIPHIER || ARCH_ZYNQMP || \
299ec35e123SPaul Burton		(M68K && !TARGET_ASTRO_MCF5373L) || MICROBLAZE || MIPS
300484cce0dSBen Stoltz	depends on !EFI_APP
3017f7563ceSMasahiro Yamada	hex "Text Base"
3027f7563ceSMasahiro Yamada	help
3037f7563ceSMasahiro Yamada	  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
3047f7563ceSMasahiro Yamada
305f1dcee59SSimon Glassconfig SPL_LOAD_FIT
306f1dcee59SSimon Glass	bool "Enable SPL loading U-Boot as a FIT"
307f1dcee59SSimon Glass	depends on FIT
308f1dcee59SSimon Glass	help
309f1dcee59SSimon Glass	  Normally with the SPL framework a legacy image is generated as part
310f1dcee59SSimon Glass	  of the build. This contains U-Boot along with information as to
311f1dcee59SSimon Glass	  where it should be loaded. This option instead enables generation
312f1dcee59SSimon Glass	  of a FIT (Flat Image Tree) which provides more flexibility. In
313f1dcee59SSimon Glass	  particular it can handle selecting from multiple device tree
314f1dcee59SSimon Glass	  and passing the correct one to U-Boot.
315f1dcee59SSimon Glass
316*da74d1f3SDaniel Allredconfig SPL_FIT_IMAGE_POST_PROCESS
317*da74d1f3SDaniel Allred	bool "Enable post-processing of FIT artifacts after loading by the SPL"
318*da74d1f3SDaniel Allred	depends on SPL_LOAD_FIT && TI_SECURE_DEVICE
319*da74d1f3SDaniel Allred	help
320*da74d1f3SDaniel Allred	  Allows doing any sort of manipulation to blobs after they got extracted
321*da74d1f3SDaniel Allred	  from the U-Boot FIT image like stripping off headers or modifying the
322*da74d1f3SDaniel Allred	  size of the blob, verification, authentication, decryption etc. in a
323*da74d1f3SDaniel Allred	  platform or board specific way. In order to use this feature a platform
324*da74d1f3SDaniel Allred	  or board-specific implementation of board_fit_image_post_process() must
325*da74d1f3SDaniel Allred	  be provided. Also, anything done during this post-processing step would
326*da74d1f3SDaniel Allred	  need to be comprehended in how the images were prepared before being
327*da74d1f3SDaniel Allred	  injected into the FIT creation (i.e. the blobs would have been pre-
328*da74d1f3SDaniel Allred	  processed before being added to the FIT image).
329*da74d1f3SDaniel Allred
33033d88183SAlexey Brodkinconfig SYS_CLK_FREQ
331e71b422bSIain Paton	depends on ARC || ARCH_SUNXI
33233d88183SAlexey Brodkin	int "CPU clock frequency"
33333d88183SAlexey Brodkin	help
33433d88183SAlexey Brodkin	  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
33533d88183SAlexey Brodkin
336e91c3c33SMasahiro Yamadaendmenu		# Boot images
33751631259SMasahiro Yamada
338ed36323fSMasahiro Yamadasource "common/Kconfig"
339ed36323fSMasahiro Yamada
34072a8cf8dSSimon Glasssource "cmd/Kconfig"
34172a8cf8dSSimon Glass
342783e6a72SMasahiro Yamadasource "dts/Kconfig"
343783e6a72SMasahiro Yamada
344ed36323fSMasahiro Yamadasource "net/Kconfig"
345ed36323fSMasahiro Yamada
346ed36323fSMasahiro Yamadasource "drivers/Kconfig"
347ed36323fSMasahiro Yamada
348ed36323fSMasahiro Yamadasource "fs/Kconfig"
349ed36323fSMasahiro Yamada
350ed36323fSMasahiro Yamadasource "lib/Kconfig"
3511967982aSSimon Glass
3521967982aSSimon Glasssource "test/Kconfig"
353