Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file Documentation/kbuild/kconfig-language.txt in the
  4. # Linux kernel source tree.
  5. #
  6. mainmenu "U-Boot $(UBOOTVERSION) Configuration"
  7. comment "Compiler: $(CC_VERSION_TEXT)"
  8. source "scripts/Kconfig.include"
  9. # Allow defaults in arch-specific code to override any given here
  10. source "arch/Kconfig"
  11. menu "General setup"
  12. config BROKEN
  13. bool
  14. help
  15. This option cannot be enabled. It is used as dependency
  16. for broken and incomplete features.
  17. config DEPRECATED
  18. bool
  19. help
  20. This option cannot be enabled. It it used as a dependency for
  21. code that relies on deprecated features that will be removed and
  22. the conversion deadline has passed.
  23. config LOCALVERSION
  24. string "Local version - append to U-Boot release"
  25. help
  26. Append an extra string to the end of your U-Boot version.
  27. This will show up in your boot log, for example.
  28. The string you set here will be appended after the contents of
  29. any files with a filename matching localversion* in your
  30. object and source tree, in that order. Your total string can
  31. be a maximum of 64 characters.
  32. config LOCALVERSION_AUTO
  33. bool "Automatically append version information to the version string"
  34. default y
  35. help
  36. This will try to automatically determine if the current tree is a
  37. release tree by looking for Git tags that belong to the current
  38. top of tree revision.
  39. A string of the format -gxxxxxxxx will be added to the localversion
  40. if a Git-based tree is found. The string generated by this will be
  41. appended after any matching localversion* files, and after the value
  42. set in CONFIG_LOCALVERSION.
  43. (The actual string used here is the first eight characters produced
  44. by running the command:
  45. $ git rev-parse --verify HEAD
  46. which is done within the script "scripts/setlocalversion".)
  47. config CC_IS_GCC
  48. def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
  49. config GCC_VERSION
  50. int
  51. default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC
  52. default 0
  53. config CC_IS_CLANG
  54. def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
  55. config CLANG_VERSION
  56. int
  57. default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
  58. config CC_OPTIMIZE_FOR_SIZE
  59. bool "Optimize for size"
  60. default y
  61. help
  62. Enabling this option will pass "-Os" instead of "-O2" to gcc
  63. resulting in a smaller U-Boot image.
  64. This option is enabled by default for U-Boot.
  65. config OPTIMIZE_INLINING
  66. bool "Allow compiler to uninline functions marked 'inline' in full U-Boot"
  67. default n
  68. help
  69. This option determines if U-Boot forces gcc to inline the functions
  70. developers have marked 'inline'. Doing so takes away freedom from gcc to
  71. do what it thinks is best, which is desirable in some cases for size
  72. reasons.
  73. config SPL_OPTIMIZE_INLINING
  74. bool "Allow compiler to uninline functions marked 'inline' in SPL"
  75. depends on SPL
  76. default n
  77. help
  78. This option determines if U-Boot forces gcc to inline the functions
  79. developers have marked 'inline'. Doing so takes away freedom from gcc to
  80. do what it thinks is best, which is desirable in some cases for size
  81. reasons.
  82. config ARCH_SUPPORTS_LTO
  83. bool
  84. config LTO
  85. bool "Enable Link Time Optimizations"
  86. depends on ARCH_SUPPORTS_LTO
  87. default n
  88. help
  89. This option enables Link Time Optimization (LTO), a mechanism which
  90. allows the compiler to optimize between different compilation units.
  91. This can optimize away dead code paths, resulting in smaller binary
  92. size (if CC_OPTIMIZE_FOR_SIZE is enabled).
  93. This option is not available for every architecture and may
  94. introduce bugs.
  95. Currently, when compiling with GCC, due to a weird bug regarding
  96. jobserver, the final linking will not respect make's --jobs argument.
  97. Instead all available processors will be used (as reported by the
  98. nproc command).
  99. If unsure, say n.
  100. config TPL_OPTIMIZE_INLINING
  101. bool "Allow compiler to uninline functions marked 'inline' in TPL"
  102. depends on TPL
  103. default n
  104. help
  105. This option determines if U-Boot forces gcc to inline the functions
  106. developers have marked 'inline'. Doing so takes away freedom from gcc to
  107. do what it thinks is best, which is desirable in some cases for size
  108. reasons.
  109. config CC_COVERAGE
  110. bool "Enable code coverage analysis"
  111. depends on SANDBOX
  112. help
  113. Enabling this option will pass "--coverage" to gcc to compile
  114. and link code instrumented for coverage analysis.
  115. config CC_HAS_ASM_INLINE
  116. def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
  117. config XEN
  118. bool "Select U-Boot be run as a bootloader for XEN Virtual Machine"
  119. help
  120. Enabling this option will make U-Boot be run as a bootloader
  121. for XEN [1] Virtual Machine.
  122. Xen is a virtual machine monitor (VMM) or a type-1 hypervisor with support
  123. for para-virtualization. Xen can organize the safe execution of several
  124. virtual machines on the same physical system with performance close to
  125. native. It is used as the basis for a number of different commercial and
  126. open source applications, such as: server virtualization, Infrastructure
  127. as a Service (IaaS), desktop virtualization, security applications,
  128. embedded and hardware appliances.
  129. Xen has a special VM called Domain-0 that runs the Dom0 kernel and allows
  130. Xen to use the device drivers for the Domain-0 kernel by default.
  131. [1] - https://xenproject.org/
  132. config DISTRO_DEFAULTS
  133. bool "Select defaults suitable for booting general purpose Linux distributions"
  134. select AUTO_COMPLETE
  135. select CMDLINE_EDITING
  136. select CMD_BOOTI if ARM64
  137. select CMD_BOOTZ if ARM && !ARM64
  138. select CMD_DHCP if CMD_NET
  139. select CMD_ENV_EXISTS
  140. select CMD_EXT2
  141. select CMD_EXT4
  142. select CMD_FAT
  143. select CMD_FS_GENERIC
  144. select CMD_PART if PARTITIONS
  145. select CMD_PING if CMD_NET
  146. select CMD_PXE if NET
  147. select CMD_SYSBOOT
  148. select ENV_VARS_UBOOT_CONFIG
  149. select HUSH_PARSER
  150. select SUPPORT_RAW_INITRD
  151. select SYS_LONGHELP
  152. imply CMD_MII if NET
  153. imply USB_STORAGE
  154. imply USE_BOOTCOMMAND
  155. help
  156. Select this to enable various options and commands which are suitable
  157. for building u-boot for booting general purpose Linux distributions.
  158. config ENV_VARS_UBOOT_CONFIG
  159. bool "Add arch, board, vendor and soc variables to default environment"
  160. help
  161. Define this in order to add variables describing the
  162. U-Boot build configuration to the default environment.
  163. These will be named arch, cpu, board, vendor, and soc.
  164. Enabling this option will cause the following to be defined:
  165. - CONFIG_SYS_ARCH
  166. - CONFIG_SYS_CPU
  167. - CONFIG_SYS_BOARD
  168. - CONFIG_SYS_VENDOR
  169. - CONFIG_SYS_SOC
  170. config NR_DRAM_BANKS
  171. int "Number of DRAM banks"
  172. default 1 if ARCH_SUNXI || ARCH_OWL
  173. default 4
  174. help
  175. This defines the number of DRAM banks.
  176. config SYS_BOOT_GET_CMDLINE
  177. bool "Enable kernel command line setup"
  178. help
  179. Enables allocating and saving kernel cmdline in space between
  180. "bootm_low" and "bootm_low" + BOOTMAPSZ.
  181. config SYS_BOOT_GET_KBD
  182. bool "Enable kernel board information setup"
  183. help
  184. Enables allocating and saving a kernel copy of the bd_info in
  185. space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
  186. config SYS_MALLOC_F
  187. bool "Enable malloc() pool before relocation"
  188. default y if DM
  189. help
  190. Before relocation, memory is very limited on many platforms. Still,
  191. we can provide a small malloc() pool if needed. Driver model in
  192. particular needs this to operate, so that it can allocate the
  193. initial serial device and any others that are needed.
  194. config SYS_MALLOC_F_LEN
  195. hex "Size of malloc() pool before relocation"
  196. depends on SYS_MALLOC_F
  197. default 0x1000 if AM33XX
  198. default 0x4000 if SANDBOX
  199. default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
  200. ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
  201. ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
  202. ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL)
  203. default 0x400
  204. help
  205. Before relocation, memory is very limited on many platforms. Still,
  206. we can provide a small malloc() pool if needed. Driver model in
  207. particular needs this to operate, so that it can allocate the
  208. initial serial device and any others that are needed.
  209. config SYS_MALLOC_LEN
  210. hex "Define memory for Dynamic allocation"
  211. depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP
  212. default 0x2000000 if ARCH_ROCKCHIP
  213. help
  214. This defines memory to be allocated for Dynamic allocation
  215. TODO: Use for other architectures
  216. config SPL_SYS_MALLOC_F_LEN
  217. hex "Size of malloc() pool in SPL"
  218. depends on SYS_MALLOC_F && SPL
  219. default 0x2800 if RCAR_GEN3
  220. default SYS_MALLOC_F_LEN
  221. help
  222. In SPL memory is very limited on many platforms. Still,
  223. we can provide a small malloc() pool if needed. Driver model in
  224. particular needs this to operate, so that it can allocate the
  225. initial serial device and any others that are needed.
  226. It is possible to enable CONFIG_SYS_SPL_MALLOC_START to start a new
  227. malloc() region in SDRAM once it is inited.
  228. config TPL_SYS_MALLOC_F_LEN
  229. hex "Size of malloc() pool in TPL"
  230. depends on SYS_MALLOC_F && TPL
  231. default SPL_SYS_MALLOC_F_LEN
  232. help
  233. In TPL memory is very limited on many platforms. Still,
  234. we can provide a small malloc() pool if needed. Driver model in
  235. particular needs this to operate, so that it can allocate the
  236. initial serial device and any others that are needed.
  237. menuconfig EXPERT
  238. bool "Configure standard U-Boot features (expert users)"
  239. default y
  240. help
  241. This option allows certain base U-Boot options and settings
  242. to be disabled or tweaked. This is for specialized
  243. environments which can tolerate a "non-standard" U-Boot.
  244. Use this only if you really know what you are doing.
  245. if EXPERT
  246. config SYS_MALLOC_CLEAR_ON_INIT
  247. bool "Init with zeros the memory reserved for malloc (slow)"
  248. default y
  249. help
  250. This setting is enabled by default. The reserved malloc
  251. memory is initialized with zeros, so first malloc calls
  252. will return the pointer to the zeroed memory. But this
  253. slows the boot time.
  254. It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN
  255. value, has more than few MiB, e.g. when uses bzip2 or bmp logo.
  256. Then the boot time can be significantly reduced.
  257. Warning:
  258. When disabling this, please check if malloc calls, maybe
  259. should be replaced by calloc - if one expects zeroed memory.
  260. config SYS_MALLOC_DEFAULT_TO_INIT
  261. bool "Default malloc to init while reserving the memory for it"
  262. default n
  263. help
  264. It may happen that one needs to move the dynamic allocation
  265. from one to another memory range, eg. when moving the malloc
  266. from the limited static to a potentially large dynamic (DDR)
  267. memory.
  268. If so then on top of setting the updated memory aside one
  269. needs to bring the malloc init.
  270. If such a scenario is sought choose yes.
  271. config TOOLS_DEBUG
  272. bool "Enable debug information for tools"
  273. help
  274. Enable generation of debug information for tools such as mkimage.
  275. This can be used for debugging purposes. With debug information
  276. it is possible to set breakpoints on particular lines, single-step
  277. debug through the source code, etc.
  278. endif # EXPERT
  279. config PHYS_64BIT
  280. bool "64bit physical address support"
  281. help
  282. Say Y here to support 64bit physical memory address.
  283. This can be used not only for 64bit SoCs, but also for
  284. large physical address extension on 32bit SoCs.
  285. config HAS_ROM
  286. bool
  287. select BINMAN
  288. help
  289. Enables building of a u-boot.rom target. This collects U-Boot and
  290. any necessary binary blobs.
  291. config SPL_IMAGE
  292. string "SPL image used in the combined SPL+U-Boot image"
  293. default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
  294. default "spl/u-boot-spl.bin"
  295. depends on SPL
  296. help
  297. Select the SPL build target that shall be generated by the SPL
  298. build process (default spl/u-boot-spl.bin). This image will be
  299. used to generate a combined image with SPL and main U-Boot
  300. proper as one single image.
  301. config BUILD_TARGET
  302. string "Build target special images"
  303. default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
  304. default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5
  305. default "u-boot-spl.kwb" if ARCH_MVEBU && SPL
  306. default "u-boot-elf.srec" if RCAR_GEN3
  307. default "u-boot.itb" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \
  308. ARCH_SUNXI || RISCV || ARCH_ZYNQMP)
  309. default "u-boot.kwb" if ARCH_KIRKWOOD
  310. default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
  311. default "u-boot-with-spl.imx" if ARCH_MX6 && SPL
  312. help
  313. Some SoCs need special image types (e.g. U-Boot binary
  314. with a special header) as build targets. By defining
  315. CONFIG_BUILD_TARGET in the SoC / board header, this
  316. special image will be automatically built upon calling
  317. make / buildman.
  318. config SYS_CUSTOM_LDSCRIPT
  319. bool "Use a custom location for the U-Boot linker script"
  320. help
  321. Normally when linking U-Boot we will look in the board directory,
  322. the CPU directory and finally the "cpu" directory of the architecture
  323. for the ile "u-boot.lds" and use that as our linker. However, in
  324. some cases we need to provide a different linker script. To do so,
  325. enable this option and then provide the location under
  326. CONFIG_SYS_LDSCRIPT.
  327. config SYS_LDSCRIPT
  328. depends on SYS_CUSTOM_LDSCRIPT
  329. string "Custom ldscript location"
  330. help
  331. Path within the source tree to the linker script to use for the
  332. main U-Boot binary.
  333. config ERR_PTR_OFFSET
  334. hex
  335. default 0x0
  336. help
  337. Some U-Boot pointers have redundant information, so we can use a
  338. scheme where we can return either an error code or a pointer with the
  339. same return value. The default implementation just casts the pointer
  340. to a number, however, this may fail on platforms where the end of the
  341. address range is used for valid pointers (e.g. 0xffffff00 is a valid
  342. heap pointer in socfpga SPL).
  343. For such platforms, this value provides an upper range of those error
  344. pointer values - up to 'MAX_ERRNO' bytes below this value must be
  345. unused/invalid addresses.
  346. config PLATFORM_ELFENTRY
  347. string
  348. default "__start" if MIPS
  349. default "_start"
  350. config STACK_SIZE
  351. hex "Define max stack size that can be used by U-Boot"
  352. default 0x4000000 if ARCH_VERSAL || ARCH_ZYNQMP
  353. default 0x200000 if MICROBLAZE
  354. default 0x1000000
  355. help
  356. Define Max stack size that can be used by U-Boot. This value is used
  357. by the UEFI sub-system. On some boards initrd_high is calculated as
  358. base stack pointer minus this stack size.
  359. config SYS_HAS_SRAM
  360. bool
  361. default y if TARGET_PIC32MZDASK
  362. default y if TARGET_DEVKIT8000
  363. default y if TARGET_TRICORDER
  364. default n
  365. help
  366. Enable this to allow support for the on board SRAM.
  367. SRAM base address is controlled by CONFIG_SYS_SRAM_BASE.
  368. SRAM size is controlled by CONFIG_SYS_SRAM_SIZE.
  369. config SYS_SRAM_BASE
  370. hex
  371. default 0x80000000 if TARGET_PIC32MZDASK
  372. default 0x40200000 if TARGET_DEVKIT8000
  373. default 0x40200000 if TARGET_TRICORDER
  374. default 0x0
  375. config SYS_SRAM_SIZE
  376. hex
  377. default 0x00080000 if TARGET_PIC32MZDASK
  378. default 0x10000 if TARGET_DEVKIT8000
  379. default 0x10000 if TARGET_TRICORDER
  380. default 0x0
  381. config EXAMPLES
  382. bool "Compile API examples"
  383. depends on !SANDBOX
  384. default y if ARCH_QEMU
  385. help
  386. U-Boot provides an API for standalone applications. Examples are
  387. provided in directory examples/.
  388. endmenu # General setup
  389. source "api/Kconfig"
  390. source "common/Kconfig"
  391. source "cmd/Kconfig"
  392. source "disk/Kconfig"
  393. source "dts/Kconfig"
  394. source "env/Kconfig"
  395. source "net/Kconfig"
  396. source "drivers/Kconfig"
  397. source "fs/Kconfig"
  398. source "lib/Kconfig"
  399. source "test/Kconfig"
  400. source "tools/Kconfig"