uboot/Kconfig
<<
>>
Prefs
   1#
   2# For a description of the syntax of this configuration file,
   3# see the file Documentation/kbuild/kconfig-language.rst in the
   4# Linux kernel source tree.
   5#
   6mainmenu "U-Boot $(UBOOTVERSION) Configuration"
   7
   8comment "Compiler: $(CC_VERSION_TEXT)"
   9
  10source "scripts/Kconfig.include"
  11
  12# Allow defaults in arch-specific code to override any given here
  13source "arch/Kconfig"
  14
  15menu "General setup"
  16
  17config BROKEN
  18        bool
  19        help
  20          This option cannot be enabled. It is used as dependency
  21          for broken and incomplete features.
  22
  23config DEPRECATED
  24        bool
  25        help
  26          This option cannot be enabled.  It it used as a dependency for
  27          code that relies on deprecated features that will be removed and
  28          the conversion deadline has passed.
  29
  30config WERROR
  31        bool "Compile U-Boot with warnings as errors"
  32        help
  33          A U-Boot build should not cause any compiler warnings, and this
  34          enables the '-Werror' flag to enforce that rule.
  35
  36          However, if you have a new (or very old) compiler or linker with odd
  37          and unusual warnings, or you have some architecture with problems,
  38          you may need to disable this config option in order to
  39          successfully build U-Boot.
  40
  41config LOCALVERSION
  42        string "Local version - append to U-Boot release"
  43        help
  44          Append an extra string to the end of your U-Boot version.
  45          This will show up in your boot log, for example.
  46          The string you set here will be appended after the contents of
  47          any files with a filename matching localversion* in your
  48          object and source tree, in that order.  Your total string can
  49          be a maximum of 64 characters.
  50
  51config LOCALVERSION_AUTO
  52        bool "Automatically append version information to the version string"
  53        default y
  54        help
  55          This will try to automatically determine if the current tree is a
  56          release tree by looking for Git tags that belong to the current
  57          top of tree revision.
  58
  59          A string of the format -gxxxxxxxx will be added to the localversion
  60          if a Git-based tree is found.  The string generated by this will be
  61          appended after any matching localversion* files, and after the value
  62          set in CONFIG_LOCALVERSION.
  63
  64          (The actual string used here is the first eight characters produced
  65          by running the command:
  66
  67            $ git rev-parse --verify HEAD
  68
  69          which is done within the script "scripts/setlocalversion".)
  70
  71config CC_IS_GCC
  72        def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
  73
  74config GCC_VERSION
  75        int
  76        default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC
  77        default 0
  78
  79config CC_IS_CLANG
  80        def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
  81
  82config CLANG_VERSION
  83        int
  84        default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
  85
  86choice
  87        prompt "Optimization level"
  88        default CC_OPTIMIZE_FOR_SIZE
  89
  90config CC_OPTIMIZE_FOR_SIZE
  91        bool "Optimize for size"
  92        help
  93          Enabling this option will pass "-Os" to gcc, resulting in a smaller
  94          U-Boot image.
  95
  96          This option is enabled by default for U-Boot.
  97
  98config CC_OPTIMIZE_FOR_SPEED
  99        bool "Optimize for speed"
 100        help
 101          Enabling this option will pass "-O2" to gcc, resulting in a faster
 102          U-Boot image.
 103
 104config CC_OPTIMIZE_FOR_DEBUG
 105        bool "Optimize for debugging"
 106        help
 107          Enabling this option will pass "-Og" to gcc, enabling optimizations
 108          which don't interfere with debugging.
 109
 110endchoice
 111
 112config OPTIMIZE_INLINING
 113        bool "Allow compiler to uninline functions marked 'inline' in full U-Boot"
 114        help
 115          This option determines if U-Boot forces gcc to inline the functions
 116          developers have marked 'inline'. Doing so takes away freedom from gcc to
 117          do what it thinks is best, which is desirable in some cases for size
 118          reasons.
 119
 120config SPL_OPTIMIZE_INLINING
 121        bool "Allow compiler to uninline functions marked 'inline' in SPL"
 122        depends on SPL
 123        help
 124          This option determines if U-Boot forces gcc to inline the functions
 125          developers have marked 'inline'. Doing so takes away freedom from gcc to
 126          do what it thinks is best, which is desirable in some cases for size
 127          reasons.
 128
 129config ARCH_SUPPORTS_LTO
 130        bool
 131
 132config LTO
 133        bool "Enable Link Time Optimizations"
 134        depends on ARCH_SUPPORTS_LTO
 135        help
 136          This option enables Link Time Optimization (LTO), a mechanism which
 137          allows the compiler to optimize between different compilation units.
 138
 139          This can optimize away dead code paths, resulting in smaller binary
 140          size (if CC_OPTIMIZE_FOR_SIZE is enabled).
 141
 142          This option is not available for every architecture and may
 143          introduce bugs.
 144
 145          Currently, when compiling with GCC, due to a weird bug regarding
 146          jobserver, the final linking will not respect make's --jobs argument.
 147          Instead all available processors will be used (as reported by the
 148          nproc command).
 149
 150          If unsure, say n.
 151
 152config TPL_OPTIMIZE_INLINING
 153        bool "Allow compiler to uninline functions marked 'inline' in TPL"
 154        depends on TPL
 155        help
 156          This option determines if U-Boot forces gcc to inline the functions
 157          developers have marked 'inline'. Doing so takes away freedom from gcc to
 158          do what it thinks is best, which is desirable in some cases for size
 159          reasons.
 160
 161config CC_COVERAGE
 162        bool "Enable code coverage analysis"
 163        depends on SANDBOX
 164        help
 165          Enabling this option will pass "--coverage" to gcc to compile
 166          and link code instrumented for coverage analysis.
 167
 168config ASAN
 169        bool "Enable AddressSanitizer"
 170        depends on SANDBOX
 171        help
 172          Enables AddressSanitizer to discover out-of-bounds accesses,
 173          use-after-free, double-free and memory leaks.
 174
 175config FUZZ
 176        bool "Enable fuzzing"
 177        depends on CC_IS_CLANG
 178        depends on DM_FUZZING_ENGINE
 179        select ASAN
 180        help
 181          Enables the fuzzing infrastructure to generate fuzzing data and run
 182          fuzz tests.
 183
 184config CC_HAS_ASM_INLINE
 185        def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
 186
 187config XEN
 188        bool "Select U-Boot be run as a bootloader for XEN Virtual Machine"
 189        depends on ARM64
 190        select SSCANF
 191        help
 192          Enabling this option will make U-Boot be run as a bootloader
 193          for XEN [1] Virtual Machine.
 194
 195          Xen is a virtual machine monitor (VMM) or a type-1 hypervisor with support
 196          for para-virtualization. Xen can organize the safe execution of several
 197          virtual machines on the same physical system with performance close to
 198          native. It is used as the basis for a number of different commercial and
 199          open source applications, such as: server virtualization, Infrastructure
 200          as a Service (IaaS), desktop virtualization, security applications,
 201          embedded and hardware appliances.
 202          Xen has a special VM called Domain-0 that runs the Dom0 kernel and allows
 203          Xen to use the device drivers for the Domain-0 kernel by default.
 204
 205          [1] - https://xenproject.org/
 206
 207config ENV_VARS_UBOOT_CONFIG
 208        bool "Add arch, board, vendor and soc variables to default environment"
 209        help
 210          Define this in order to add variables describing the
 211          U-Boot build configuration to the default environment.
 212          These will be named arch, cpu, board, vendor, and soc.
 213          Enabling this option will cause the following to be defined:
 214          - CONFIG_SYS_ARCH
 215          - CONFIG_SYS_CPU
 216          - CONFIG_SYS_BOARD
 217          - CONFIG_SYS_VENDOR
 218          - CONFIG_SYS_SOC
 219
 220config NR_DRAM_BANKS
 221        int "Number of DRAM banks"
 222        default 1 if ARCH_SC5XX || ARCH_SUNXI || ARCH_OWL
 223        default 2 if OMAP34XX
 224        default 4
 225        help
 226          This defines the number of DRAM banks.
 227
 228config SYS_BOOT_GET_CMDLINE
 229        bool "Enable kernel command line setup"
 230        help
 231          Enables allocating and saving kernel cmdline in space between
 232          "bootm_low" and "bootm_low" + BOOTMAPSZ.
 233
 234config SYS_BARGSIZE
 235        int "Size of kernel command line buffer in bytes"
 236        depends on SYS_BOOT_GET_CMDLINE
 237        default 512
 238        help
 239          Buffer size for Boot Arguments which are passed to the application
 240          (usually a Linux kernel) when it is booted
 241
 242config SYS_BOOT_GET_KBD
 243        bool "Enable kernel board information setup"
 244        help
 245          Enables allocating and saving a kernel copy of the bd_info in
 246          space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
 247
 248config HAS_CUSTOM_SYS_INIT_SP_ADDR
 249        bool "Use a custom location for the initial stack pointer address"
 250        depends on ARC || (ARM && !INIT_SP_RELATIVE) || MIPS || PPC || RISCV
 251        default y if OMAP34XX || AM33XX || AM43XX || DRA7XX
 252        default y if TFABOOT
 253        help
 254          Typically, we use an initial stack pointer address that is calculated
 255          by taking the statically defined CFG_SYS_INIT_RAM_ADDR, adding the
 256          statically defined CFG_SYS_INIT_RAM_SIZE and then subtracting the
 257          build-time constant of GENERATED_GBL_DATA_SIZE.  On MIPS a different
 258          but statica calculation is performed.  However, some platforms will
 259          take a different approach.  Say Y here to define the address statically
 260          instead.
 261
 262config CUSTOM_SYS_INIT_SP_ADDR
 263        hex "Static location for the initial stack pointer"
 264        depends on HAS_CUSTOM_SYS_INIT_SP_ADDR
 265        default 0x4020ff00 if OMAP34XX
 266        default 0x4030ff00 if AM33XX
 267        default 0x4033ff00 if AM43XX
 268        default 0x4037ff00 if DRA7XX
 269        default TEXT_BASE if TFABOOT
 270
 271config SYS_MALLOC_F
 272        bool "Enable malloc() pool before relocation"
 273        default y if DM
 274
 275        help
 276          Before relocation, memory is very limited on many platforms. Still,
 277          we can provide a small malloc() pool if needed. Driver model in
 278          particular needs this to operate, so that it can allocate the
 279          initial serial device and any others that are needed.
 280
 281config SYS_MALLOC_F_LEN
 282        hex "Size of malloc() pool before relocation"
 283        depends on SYS_MALLOC_F
 284        default 0x400 if M68K || PPC || ROCKCHIP_PX30 || ROCKCHIP_RK3036 || \
 285                         ROCKCHIP_RV1108
 286        default 0x600 if ARCH_ZYNQMP_R5 || ARCH_ZYNQMP
 287        default 0x800 if ARCH_ZYNQ || ROCKCHIP_RK3128 || ROCKCHIP_RK3188 || \
 288                         ROCKCHIP_RK322X || X86
 289        default 0x1000 if ARCH_MESON || ARCH_BMIPS || ARCH_MTMIPS
 290        default 0x1800 if ARCH_TEGRA
 291        default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
 292                          ROCKCHIP_RK3399
 293        default 0x8000 if RCAR_GEN3
 294        default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
 295        default 0x2000
 296        help
 297                Size of the malloc() pool for use before relocation. If
 298                this is defined, then a very simple malloc() implementation
 299                will become available before relocation. The address is just
 300                below the global data, and the stack is moved down to make
 301                space.
 302
 303                This feature allocates regions with increasing addresses
 304                within the region. calloc() is supported, but realloc()
 305                is not available. free() is supported but does nothing.
 306                The memory will be freed (or in fact just forgotten) when
 307                U-Boot relocates itself.
 308
 309config SYS_MALLOC_LEN
 310        hex "Define memory for Dynamic allocation"
 311        default 0x4000000 if SANDBOX
 312        default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON
 313        default 0x200000 if ARCH_BMIPS || X86
 314        default 0x4020000 if SUNXI_MINIMUM_DRAM_MB >= 256
 315        default 0x220000 if SUNXI_MINIMUM_DRAM_MB >= 64
 316        default 0x120000 if SUNXI_MINIMUM_DRAM_MB >= 32
 317        default 0x400000
 318        help
 319          This defines memory to be allocated for Dynamic allocation
 320          TODO: Use for other architectures
 321
 322config SPL_SYS_MALLOC_F
 323        bool "Enable malloc() pool in SPL"
 324        depends on SPL_FRAMEWORK && SYS_MALLOC_F && SPL
 325        default y
 326        help
 327          In SPL memory is very limited on many platforms. Still,
 328          we can provide a small malloc() pool if needed. Driver model in
 329          particular needs this to operate, so that it can allocate the
 330          initial serial device and any others that are needed.
 331
 332config SPL_SYS_MALLOC_F_LEN
 333        hex "Size of malloc() pool in SPL"
 334        depends on SPL_SYS_MALLOC_F
 335        default 0x2800 if RCAR_GEN3
 336        default 0x2000 if IMX8MQ
 337        default SYS_MALLOC_F_LEN
 338        help
 339          Sets the size of the malloc() pool in SPL. This is used for
 340          driver model and other features, which must allocate memory for
 341          data structures.
 342
 343          It is possible to enable CFG_SPL_SYS_MALLOC_START to start a new
 344          malloc() region in SDRAM once it is inited.
 345
 346config TPL_SYS_MALLOC_F
 347        bool "Enable malloc() pool in TPL"
 348        depends on SYS_MALLOC_F && TPL
 349        default y if SPL_SYS_MALLOC_F
 350        help
 351          In TPL memory is very limited on many platforms. Still,
 352          we can provide a small malloc() pool if needed. Driver model in
 353          particular needs this to operate, so that it can allocate the
 354          initial serial device and any others that are needed.
 355
 356config TPL_SYS_MALLOC_F_LEN
 357        hex "Size of malloc() pool in TPL"
 358        depends on TPL_SYS_MALLOC_F
 359        default SPL_SYS_MALLOC_F_LEN
 360        help
 361          Sets the size of the malloc() pool in TPL. This is used for
 362          driver model and other features, which must allocate memory for
 363          data structures.
 364
 365config VALGRIND
 366        bool "Inform valgrind about memory allocations"
 367        depends on !RISCV
 368        help
 369          Valgrind is an instrumentation framework for building dynamic analysis
 370          tools. In particular, it may be used to detect memory management bugs
 371          in U-Boot. It relies on knowing when heap blocks are allocated in
 372          order to give accurate results. This happens automatically for
 373          standard allocator functions provided by the host OS. However, this
 374          doesn't automatically happen for U-Boot's malloc implementation.
 375
 376          Enable this option to annotate U-Boot's malloc implementation so that
 377          it can be handled accurately by Valgrind. If you aren't planning on
 378          using valgrind to debug U-Boot, say 'n'.
 379
 380config VPL_SYS_MALLOC_F
 381        bool "Enable malloc() pool in VPL"
 382        depends on SYS_MALLOC_F && VPL
 383        default y if SPL_SYS_MALLOC_F
 384        help
 385          In VPL memory is very limited on many platforms. Still,
 386          we can provide a small malloc() pool if needed. Driver model in
 387          particular needs this to operate, so that it can allocate the
 388          initial serial device and any others that are needed.
 389
 390config VPL_SYS_MALLOC_F_LEN
 391        hex "Size of malloc() pool in VPL before relocation"
 392        depends on VPL_SYS_MALLOC_F
 393        default SPL_SYS_MALLOC_F_LEN
 394        help
 395          Sets the size of the malloc() pool in VPL. This is used for
 396          driver model and other features, which must allocate memory for
 397          data structures.
 398
 399menuconfig EXPERT
 400        bool "Configure standard U-Boot features (expert users)"
 401        default y
 402        help
 403          This option allows certain base U-Boot options and settings
 404          to be disabled or tweaked. This is for specialized
 405          environments which can tolerate a "non-standard" U-Boot.
 406          Use this only if you really know what you are doing.
 407
 408if EXPERT
 409        config SYS_MALLOC_CLEAR_ON_INIT
 410        bool "Init with zeros the memory reserved for malloc (slow)"
 411        default y
 412        help
 413          This setting is enabled by default. The reserved malloc
 414          memory is initialized with zeros, so first malloc calls
 415          will return the pointer to the zeroed memory. But this
 416          slows the boot time.
 417
 418          It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN
 419          value, has more than few MiB, e.g. when uses bzip2 or bmp logo.
 420          Then the boot time can be significantly reduced.
 421          Warning:
 422          When disabling this, please check if malloc calls, maybe
 423          should be replaced by calloc - if one expects zeroed memory.
 424
 425config SPL_SYS_MALLOC_CLEAR_ON_INIT
 426        bool "Init with zeros the memory reserved for malloc (slow) in SPL"
 427        depends on SPL
 428        default SYS_MALLOC_CLEAR_ON_INIT
 429        help
 430          Same as SYS_MALLOC_CLEAR_ON_INIT, but for SPL. It's possible to
 431          Enable it without SYS_MALLOC_CLEAR_ON_INIT. It's useful for boards
 432          that must have particular memory regions zero'ed before first use.
 433          If SYS_SPL_MALLOC_START is configured to be in such region, this
 434          option should be enabled.
 435
 436config SYS_MALLOC_DEFAULT_TO_INIT
 437        bool "Default malloc to init while reserving the memory for it"
 438        help
 439          It may happen that one needs to move the dynamic allocation
 440          from one to another memory range, eg. when moving the malloc
 441          from the limited static to a potentially large dynamic (DDR)
 442          memory.
 443
 444          If so then on top of setting the updated memory aside one
 445          needs to bring the malloc init.
 446
 447          If such a scenario is sought choose yes.
 448
 449config TOOLS_DEBUG
 450        bool "Enable debug information for tools"
 451        help
 452          Enable generation of debug information for tools such as mkimage.
 453          This can be used for debugging purposes. With debug information
 454          it is possible to set breakpoints on particular lines, single-step
 455          debug through the source code, etc.
 456
 457config SKIP_RELOCATE
 458        bool "Skips relocation of U-Boot to end of RAM"
 459        help
 460          Skips relocation of U-Boot allowing for systems that have extremely
 461          limited RAM to run U-Boot.
 462
 463endif # EXPERT
 464
 465config PHYS_64BIT
 466        bool "64bit physical address support"
 467        select FDT_64BIT
 468        help
 469          Say Y here to support 64bit physical memory address.
 470          This can be used not only for 64bit SoCs, but also for
 471          large physical address extension on 32bit SoCs.
 472
 473config FDT_64BIT
 474        bool "64bit fdt address support"
 475        help
 476          Say Y here to support 64bit fdt addresses.
 477          This can be used not only for 64bit SoCs, but also
 478          for large address extensions on 32bit SoCs.
 479
 480config HAS_ROM
 481        bool
 482        select BINMAN
 483        help
 484          Enables building of a u-boot.rom target. This collects U-Boot and
 485          any necessary binary blobs.
 486
 487config SPL_IMAGE
 488        string "SPL image used in the combined SPL+U-Boot image"
 489        default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
 490        default "spl/u-boot-spl.bin"
 491        depends on SPL
 492        help
 493          Select the SPL build target that shall be generated by the SPL
 494          build process (default spl/u-boot-spl.bin). This image will be
 495          used to generate a combined image with SPL and main U-Boot
 496          proper as one single image.
 497
 498config REMAKE_ELF
 499        bool "Recreate an ELF image from raw U-Boot binary"
 500        help
 501          Enable this to recreate an ELF image (u-boot.elf) from the raw
 502          U-Boot binary (u-boot.bin), which may already have been statically
 503          relocated and may already have a device-tree appended to it.
 504
 505config BUILD_TARGET
 506        string "Build target special images"
 507        default "u-boot-elf.srec" if RCAR_64
 508        default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
 509        default "u-boot-with-spl.bin" if MPC85xx && !E500MC && !E5500 && !E6500 && SPL
 510        default "u-boot-with-spl.imx" if ARCH_MX6 && SPL
 511        default "u-boot-with-spl.kwb" if ARMADA_32BIT && SPL
 512        default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
 513        default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5
 514        default "u-boot.itb" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \
 515                                RISCV || ARCH_ZYNQMP)
 516        default "u-boot.kwb" if (ARCH_KIRKWOOD || ARMADA_32BIT) && !SPL
 517        help
 518          Some SoCs need special image types (e.g. U-Boot binary
 519          with a special header) as build targets. By defining
 520          CONFIG_BUILD_TARGET in the SoC / board header, this
 521          special image will be automatically built upon calling
 522          make / buildman.
 523
 524config HAS_BOARD_SIZE_LIMIT
 525        bool "Define a maximum size for the U-Boot image"
 526        default y if RCAR_32 || RCAR_64
 527        help
 528          In some cases, we need to enforce a hard limit on how big the U-Boot
 529          image itself can be.
 530
 531config BOARD_SIZE_LIMIT
 532        int "Maximum size of the U-Boot image in bytes"
 533        default 524288 if RCAR_32
 534        default 1048576 if RCAR_64
 535        depends on HAS_BOARD_SIZE_LIMIT
 536        help
 537          Maximum size of the U-Boot image. When defined, the build system
 538          checks that the actual size does not exceed it.  This does not
 539          include SPL nor TPL, on platforms that use that functionality, they
 540          have a separate option to restict size.
 541
 542config SYS_CUSTOM_LDSCRIPT
 543        bool "Use a custom location for the U-Boot linker script"
 544        help
 545          Normally when linking U-Boot we will look in the board directory,
 546          the CPU directory and finally the "cpu" directory of the architecture
 547          for the ile "u-boot.lds" and use that as our linker.  However, in
 548          some cases we need to provide a different linker script.  To do so,
 549          enable this option and then provide the location under
 550          CONFIG_SYS_LDSCRIPT.
 551
 552config SYS_LDSCRIPT
 553        depends on SYS_CUSTOM_LDSCRIPT
 554        string "Custom ldscript location"
 555        help
 556          Path within the source tree to the linker script to use for the
 557          main U-Boot binary.
 558
 559config SYS_LOAD_ADDR
 560        hex "Address in memory to use by default"
 561        default 0x01000000 if ARCH_SOCFPGA
 562        default 0x02000000 if PPC || X86
 563        default 0x81000000 if MACH_SUNIV
 564        default 0x22000000 if MACH_SUN9I
 565        default 0x42000000 if ARCH_SUNXI
 566        default 0x82000000 if ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_K3
 567        default 0x82000000 if ARCH_MX6 && (MX6SL || MX6SLL  || MX6SX || MX6UL || MX6ULL)
 568        default 0x12000000 if ARCH_MX6 && !(MX6SL || MX6SLL  || MX6SX || MX6UL || MX6ULL)
 569        default 0x80800000 if ARCH_MX7
 570        default 0x90000000 if FSL_LSCH2 || FSL_LSCH3
 571        default 0x0 if ARCH_SC5XX
 572        help
 573          Address in memory to use as the default safe load address.
 574
 575config ERR_PTR_OFFSET
 576        hex
 577        default 0x0
 578        help
 579          Some U-Boot pointers have redundant information, so we can use a
 580          scheme where we can return either an error code or a pointer with the
 581          same return value. The default implementation just casts the pointer
 582          to a number, however, this may fail on platforms where the end of the
 583          address range is used for valid pointers (e.g. 0xffffff00 is a valid
 584          heap pointer in socfpga SPL).
 585          For such platforms, this value provides an upper range of those error
 586          pointer values - up to 'MAX_ERRNO' bytes below this value must be
 587          unused/invalid addresses.
 588
 589config PLATFORM_ELFENTRY
 590        string
 591        default "__start" if MIPS
 592        default "_start"
 593
 594config STACK_SIZE
 595        hex "Define max stack size that can be used by U-Boot"
 596        default 0x4000000 if ARCH_VERSAL_NET || ARCH_VERSAL || ARCH_ZYNQMP
 597        default 0x200000 if MICROBLAZE
 598        default 0x4000 if ARCH_STM32
 599        default 0x1000000
 600        help
 601          Define Max stack size that can be used by U-Boot. This value is used
 602          by the UEFI sub-system. On some boards initrd_high is calculated as
 603          base stack pointer minus this stack size.
 604
 605config SYS_MEM_TOP_HIDE
 606        hex "Exclude some memory from U-Boot / OS information"
 607        default 0x0
 608        help
 609          If set, this specified memory area will get subtracted from the top
 610          (end) of RAM and won't get "touched" at all by U-Boot. By fixing up
 611          gd->ram_size the OS / next stage should gets passed the now
 612          "corrected" memory size and won't touch it either.
 613          WARNING: Please make sure that this value is a multiple of the OS
 614          page size.
 615
 616config SYS_MONITOR_LEN
 617        int "Maximum size in bytes reserved for U-Boot in memory"
 618        default 1048576 if X86
 619        default 262144 if OMAP34XX
 620        default 786432 if ARCH_SUNXI
 621        default 0
 622        help
 623          Size of memory reserved for monitor code, used to determine
 624          _at_compile_time_ (!) if the environment is embedded within the
 625          U-Boot image, or in a separate flash sector, among other uses where
 626          we need to set a maximum size of the U-Boot binary itself that will
 627          be loaded.
 628
 629config MP
 630        bool "Support for multiprocessor"
 631        help
 632          This provides an option to bringup different processors
 633          in multiprocessor cases.
 634
 635config HAVE_TEXT_BASE
 636        bool
 637        depends on !NIOS2 && !XTENSA
 638        depends on !EFI_APP
 639        default y
 640
 641config TEXT_BASE
 642        depends on HAVE_TEXT_BASE
 643        default 0x0 if POSITION_INDEPENDENT
 644        default 0x17800000 if ARCH_MX6
 645        default 0x87800000 if ARCH_MX7
 646        default 0x80800000 if ARCH_OMAP2PLUS || ARCH_K3
 647        default 0x81700000 if MACH_SUNIV
 648        default 0x2a000000 if MACH_SUN9I
 649        default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
 650        default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
 651        default 0x96000000 if ARCH_SC5XX && SC59X_64
 652        default 0xB2200000 if ARCH_SC5XX && SC59X
 653        default 0x89200000 if ARCH_SC5XX && TARGET_SC584_EZKIT
 654        default 0xC2200000 if ARCH_SC5XX && (TARGET_SC589_EZKIT || TARGET_SC589_MINI)
 655        default 0x82200000 if ARCH_SC5XX && SC57X
 656        hex "Text Base"
 657        help
 658          The address in memory that U-Boot will be copied and executed from
 659          initially.
 660
 661config HAVE_SYS_UBOOT_START
 662        bool "Use custom U-Boot Start"
 663        depends on HAVE_TEXT_BASE
 664        help
 665          By default, the address in memory that U-Boot will be copied from
 666          (TEXT_BASE) and the entry point are the same. Select this to start the
 667          execution of U-Boot from a different address.
 668          This may be required if a header or vector table needs to be copied
 669          but not executed.
 670
 671config SYS_UBOOT_START
 672        hex
 673        depends on HAVE_TEXT_BASE
 674        default TEXT_BASE
 675        prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
 676        help
 677          If TEXT_BASE differs from the start of execution, this sets the
 678          address in memory that U-Boot will start execution from initially.
 679
 680config HAVE_SYS_MONITOR_BASE
 681        bool
 682        depends on ARC || MIPS || M68K || NIOS2 || PPC || XTENSA || X86 \
 683                || ENV_IS_IN_FLASH || MTD_NOR_FLASH
 684        depends on !EFI_APP
 685        default y
 686
 687config SYS_MONITOR_BASE
 688        depends on HAVE_SYS_MONITOR_BASE
 689        hex "Physical start address of boot monitor code"
 690        default TEXT_BASE
 691        help
 692          The physical start address of boot monitor code (which is the same as
 693          CONFIG_TEXT_BASE when linking) and the same as CFG_SYS_FLASH_BASE
 694          when booting from flash.
 695
 696config SPL_SYS_MONITOR_BASE
 697        depends on MPC85xx && SPL && HAVE_SYS_MONITOR_BASE
 698        hex "Physical start address of SPL monitor code"
 699        default SPL_TEXT_BASE
 700
 701config TPL_SYS_MONITOR_BASE
 702        depends on MPC85xx && TPL && HAVE_SYS_MONITOR_BASE
 703        hex "Physical start address of TPL monitor code"
 704
 705config DYNAMIC_SYS_CLK_FREQ
 706        bool "Determine CPU clock frequency at run-time"
 707        help
 708          Implement a get_board_sys_clk function that will determine the CPU
 709          clock frequency at run time, rather than define it statically.
 710
 711config SYS_CLK_FREQ
 712        depends on !DYNAMIC_SYS_CLK_FREQ
 713        int "CPU clock frequency"
 714        default 125000000 if ARCH_LS1012A
 715        default 100000000 if ARCH_P2020 || ARCH_T1024 || ARCH_T1042 || \
 716                             ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
 717        default 66666666 if ARCH_P1010 || ARCH_P1020 || ARCH_T4240
 718        default 66660000 if ARCH_T2080
 719        default 33333333 if RCAR_GEN3
 720        default 24000000 if ARCH_EXYNOS
 721        default 20000000 if RCAR_GEN2
 722        default 0
 723        help
 724          A static value for the CPU frequency.  Note that if not required
 725          for a given SoC, this can be left at 0.
 726
 727config HAS_LDR
 728        bool
 729        help
 730          Enables building .ldr targets for U-Boot and SPL. This does not
 731          automatically build any additional targets with make or buildman.
 732
 733config LDR_CPU
 734        string "CPU name to be passed to LDR utility."
 735        depends on HAS_LDR
 736        help
 737          Set the CPU name for the -T parameter in the LDR utility.  This is
 738          generally used on processors from Analog Devices, but may be also
 739          be useful for other vendors.
 740
 741source "api/Kconfig"
 742
 743endmenu         # General setup
 744
 745source "boot/Kconfig"
 746
 747source "common/Kconfig"
 748
 749source "cmd/Kconfig"
 750
 751source "disk/Kconfig"
 752
 753source "dts/Kconfig"
 754
 755source "env/Kconfig"
 756
 757menu "Networking"
 758
 759choice
 760        prompt "Networking stack"
 761        default NET
 762
 763config NO_NET
 764        bool "No networking support"
 765        help
 766          Do not include networking support
 767
 768config NET
 769        bool "Legacy U-Boot networking stack"
 770        imply NETDEVICES
 771        help
 772          Include networking support with U-Boot's internal implementation of
 773          the TCP/IP protocol stack.
 774
 775config NET_LWIP
 776        bool "Use lwIP for networking stack"
 777        imply NETDEVICES
 778        help
 779          Include networking support based on the lwIP (lightweight IP)
 780          TCP/IP stack (https://nongnu.org/lwip). This is a replacement for
 781          the default U-Boot network stack and applications located in net/
 782          and enabled via CONFIG_NET as well as other pieces of code that
 783          depend on CONFIG_NET (such as cmd/net.c enabled via CONFIG_CMD_NET).
 784          Therefore the two symbols CONFIG_NET and CONFIG_NET_LWIP are mutually
 785          exclusive.
 786
 787endchoice
 788
 789source "net/Kconfig"
 790
 791endmenu
 792
 793source "drivers/Kconfig"
 794
 795source "fs/Kconfig"
 796
 797source "lib/Kconfig"
 798
 799source "test/Kconfig"
 800
 801source "tools/Kconfig"
 802