Kconfig 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. menu "Boot timing"
  2. config BOOTSTAGE
  3. bool "Boot timing and reporting"
  4. help
  5. Enable recording of boot time while booting. To use it, insert
  6. calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
  7. bootstage.h. Only a single entry is recorded for each ID. You can
  8. give the entry a name with bootstage_mark_name(). You can also
  9. record elapsed time in a particular stage using bootstage_start()
  10. before starting and bootstage_accum() when finished. Bootstage will
  11. add up all the accumulated time and report it.
  12. Normally, IDs are defined in bootstage.h but a small number of
  13. additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
  14. as the ID.
  15. Calls to show_boot_progress() will also result in log entries but
  16. these will not have names.
  17. config SPL_BOOTSTAGE
  18. bool "Boot timing and reported in SPL"
  19. depends on BOOTSTAGE
  20. help
  21. Enable recording of boot time in SPL. To make this visible to U-Boot
  22. proper, enable BOOTSTAGE_STASH as well. This will stash the timing
  23. information when SPL finishes and load it when U-Boot proper starts
  24. up.
  25. config BOOTSTAGE_REPORT
  26. bool "Display a detailed boot timing report before booting the OS"
  27. depends on BOOTSTAGE
  28. help
  29. Enable output of a boot time report just before the OS is booted.
  30. This shows how long it took U-Boot to go through each stage of the
  31. boot process. The report looks something like this:
  32. Timer summary in microseconds:
  33. Mark Elapsed Stage
  34. 0 0 reset
  35. 3,575,678 3,575,678 board_init_f start
  36. 3,575,695 17 arch_cpu_init A9
  37. 3,575,777 82 arch_cpu_init done
  38. 3,659,598 83,821 board_init_r start
  39. 3,910,375 250,777 main_loop
  40. 29,916,167 26,005,792 bootm_start
  41. 30,361,327 445,160 start_kernel
  42. config BOOTSTAGE_RECORD_COUNT
  43. int "Number of boot stage records to store"
  44. default 30
  45. help
  46. This is the size of the bootstage record list and is the maximum
  47. number of bootstage records that can be recorded.
  48. config SPL_BOOTSTAGE_RECORD_COUNT
  49. int "Number of boot stage records to store for SPL"
  50. default 5
  51. help
  52. This is the size of the bootstage record list and is the maximum
  53. number of bootstage records that can be recorded.
  54. config BOOTSTAGE_FDT
  55. bool "Store boot timing information in the OS device tree"
  56. depends on BOOTSTAGE
  57. help
  58. Stash the bootstage information in the FDT. A root 'bootstage'
  59. node is created with each bootstage id as a child. Each child
  60. has a 'name' property and either 'mark' containing the
  61. mark time in microseconds, or 'accum' containing the
  62. accumulated time for that bootstage id in microseconds.
  63. For example:
  64. bootstage {
  65. 154 {
  66. name = "board_init_f";
  67. mark = <3575678>;
  68. };
  69. 170 {
  70. name = "lcd";
  71. accum = <33482>;
  72. };
  73. };
  74. Code in the Linux kernel can find this in /proc/devicetree.
  75. config BOOTSTAGE_STASH
  76. bool "Stash the boot timing information in memory before booting OS"
  77. depends on BOOTSTAGE
  78. help
  79. Some OSes do not support device tree. Bootstage can instead write
  80. the boot timing information in a binary format at a given address.
  81. This happens through a call to bootstage_stash(), typically in
  82. the CPU's cleanup_before_linux() function. You can use the
  83. 'bootstage stash' and 'bootstage unstash' commands to do this on
  84. the command line.
  85. config BOOTSTAGE_STASH_ADDR
  86. hex "Address to stash boot timing information"
  87. default 0
  88. help
  89. Provide an address which will not be overwritten by the OS when it
  90. starts, so that it can read this information when ready.
  91. config BOOTSTAGE_STASH_SIZE
  92. hex "Size of boot timing stash region"
  93. default 0x1000
  94. help
  95. This should be large enough to hold the bootstage stash. A value of
  96. 4096 (4KiB) is normally plenty.
  97. endmenu
  98. menu "Boot media"
  99. config NOR_BOOT
  100. bool "Support for booting from NOR flash"
  101. depends on NOR
  102. help
  103. Enabling this will make a U-Boot binary that is capable of being
  104. booted via NOR. In this case we will enable certain pinmux early
  105. as the ROM only partially sets up pinmux. We also default to using
  106. NOR for environment.
  107. config NAND_BOOT
  108. bool "Support for booting from NAND flash"
  109. default n
  110. help
  111. Enabling this will make a U-Boot binary that is capable of being
  112. booted via NAND flash. This is not a must, some SoCs need this,
  113. some not.
  114. config ONENAND_BOOT
  115. bool "Support for booting from ONENAND"
  116. default n
  117. help
  118. Enabling this will make a U-Boot binary that is capable of being
  119. booted via ONENAND. This is not a must, some SoCs need this,
  120. some not.
  121. config QSPI_BOOT
  122. bool "Support for booting from QSPI flash"
  123. default n
  124. help
  125. Enabling this will make a U-Boot binary that is capable of being
  126. booted via QSPI flash. This is not a must, some SoCs need this,
  127. some not.
  128. config SATA_BOOT
  129. bool "Support for booting from SATA"
  130. default n
  131. help
  132. Enabling this will make a U-Boot binary that is capable of being
  133. booted via SATA. This is not a must, some SoCs need this,
  134. some not.
  135. config SD_BOOT
  136. bool "Support for booting from SD/EMMC"
  137. default n
  138. help
  139. Enabling this will make a U-Boot binary that is capable of being
  140. booted via SD/EMMC. This is not a must, some SoCs need this,
  141. some not.
  142. config SPI_BOOT
  143. bool "Support for booting from SPI flash"
  144. default n
  145. help
  146. Enabling this will make a U-Boot binary that is capable of being
  147. booted via SPI flash. This is not a must, some SoCs need this,
  148. some not.
  149. endmenu
  150. config BOOTDELAY
  151. int "delay in seconds before automatically booting"
  152. default 2
  153. depends on AUTOBOOT
  154. help
  155. Delay before automatically running bootcmd;
  156. set to 0 to autoboot with no delay, but you can stop it by key input.
  157. set to -1 to disable autoboot.
  158. set to -2 to autoboot with no delay and not check for abort
  159. See doc/README.autoboot for details.
  160. config USE_BOOTARGS
  161. bool "Enable boot arguments"
  162. help
  163. Provide boot arguments to bootm command. Boot arguments are specified
  164. in CONFIG_BOOTARGS option. Enable this option to be able to specify
  165. CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
  166. will be undefined and won't take any space in U-Boot image.
  167. config BOOTARGS
  168. string "Boot arguments"
  169. depends on USE_BOOTARGS
  170. help
  171. This can be used to pass arguments to the bootm command. The value of
  172. CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
  173. this value will also override the "chosen" node in FDT blob.
  174. config USE_BOOTCOMMAND
  175. bool "Enable a default value for bootcmd"
  176. help
  177. Provide a default value for the bootcmd entry in the environment. If
  178. autoboot is enabled this is what will be run automatically. Enable
  179. this option to be able to specify CONFIG_BOOTCOMMAND as a string. If
  180. this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
  181. won't take any space in U-Boot image.
  182. config BOOTCOMMAND
  183. string "bootcmd value"
  184. depends on USE_BOOTCOMMAND
  185. default "run distro_bootcmd" if DISTRO_DEFAULTS
  186. help
  187. This is the string of commands that will be used as bootcmd and if
  188. AUTOBOOT is set, automatically run.
  189. menu "Console"
  190. config MENU
  191. bool
  192. help
  193. This is the library functionality to provide a text-based menu of
  194. choices for the user to make choices with.
  195. config CONSOLE_RECORD
  196. bool "Console recording"
  197. help
  198. This provides a way to record console output (and provide console
  199. input) through circular buffers. This is mostly useful for testing.
  200. Console output is recorded even when the console is silent.
  201. To enable console recording, call console_record_reset_enable()
  202. from your code.
  203. config CONSOLE_RECORD_OUT_SIZE
  204. hex "Output buffer size"
  205. depends on CONSOLE_RECORD
  206. default 0x400 if CONSOLE_RECORD
  207. help
  208. Set the size of the console output buffer. When this fills up, no
  209. more data will be recorded until some is removed. The buffer is
  210. allocated immediately after the malloc() region is ready.
  211. config CONSOLE_RECORD_IN_SIZE
  212. hex "Input buffer size"
  213. depends on CONSOLE_RECORD
  214. default 0x100 if CONSOLE_RECORD
  215. help
  216. Set the size of the console input buffer. When this contains data,
  217. tstc() and getc() will use this in preference to real device input.
  218. The buffer is allocated immediately after the malloc() region is
  219. ready.
  220. config IDENT_STRING
  221. string "Board specific string to be added to uboot version string"
  222. help
  223. This options adds the board specific name to u-boot version.
  224. config LOGLEVEL
  225. int "loglevel"
  226. default 4
  227. range 0 8
  228. help
  229. All Messages with a loglevel smaller than the console loglevel will
  230. be compiled in. The loglevels are defined as follows:
  231. 0 (KERN_EMERG) system is unusable
  232. 1 (KERN_ALERT) action must be taken immediately
  233. 2 (KERN_CRIT) critical conditions
  234. 3 (KERN_ERR) error conditions
  235. 4 (KERN_WARNING) warning conditions
  236. 5 (KERN_NOTICE) normal but significant condition
  237. 6 (KERN_INFO) informational
  238. 7 (KERN_DEBUG) debug-level messages
  239. config SPL_LOGLEVEL
  240. int
  241. default LOGLEVEL
  242. config SILENT_CONSOLE
  243. bool "Support a silent console"
  244. help
  245. This option allows the console to be silenced, meaning that no
  246. output will appear on the console devices. This is controlled by
  247. setting the environment vaariable 'silent' to a non-empty value.
  248. Note this also silences the console when booting Linux.
  249. When the console is set up, the variable is checked, and the
  250. GD_FLG_SILENT flag is set. Changing the environment variable later
  251. will update the flag.
  252. config SILENT_U_BOOT_ONLY
  253. bool "Only silence the U-Boot console"
  254. depends on SILENT_CONSOLE
  255. help
  256. Normally when the U-Boot console is silenced, Linux's console is
  257. also silenced (assuming the board boots into Linux). This option
  258. allows the linux console to operate normally, even if U-Boot's
  259. is silenced.
  260. config SILENT_CONSOLE_UPDATE_ON_SET
  261. bool "Changes to the 'silent' environment variable update immediately"
  262. depends on SILENT_CONSOLE
  263. default y if SILENT_CONSOLE
  264. help
  265. When the 'silent' environment variable is changed, update the
  266. console silence flag immediately. This allows 'setenv' to be used
  267. to silence or un-silence the console.
  268. The effect is that any change to the variable will affect the
  269. GD_FLG_SILENT flag.
  270. config SILENT_CONSOLE_UPDATE_ON_RELOC
  271. bool "Allow flags to take effect on relocation"
  272. depends on SILENT_CONSOLE
  273. help
  274. In some cases the environment is not available until relocation
  275. (e.g. NAND). This option makes the value of the 'silent'
  276. environment variable take effect at relocation.
  277. config PRE_CONSOLE_BUFFER
  278. bool "Buffer characters before the console is available"
  279. help
  280. Prior to the console being initialised (i.e. serial UART
  281. initialised etc) all console output is silently discarded.
  282. Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
  283. buffer any console messages prior to the console being
  284. initialised to a buffer. The buffer is a circular buffer, so
  285. if it overflows, earlier output is discarded.
  286. Note that this is not currently supported in SPL. It would be
  287. useful to be able to share the pre-console buffer with SPL.
  288. config PRE_CON_BUF_SZ
  289. int "Sets the size of the pre-console buffer"
  290. depends on PRE_CONSOLE_BUFFER
  291. default 4096
  292. help
  293. The size of the pre-console buffer affects how much console output
  294. can be held before it overflows and starts discarding earlier
  295. output. Normally there is very little output at this early stage,
  296. unless debugging is enabled, so allow enough for ~10 lines of
  297. text.
  298. This is a useful feature if you are using a video console and
  299. want to see the full boot output on the console. Without this
  300. option only the post-relocation output will be displayed.
  301. config PRE_CON_BUF_ADDR
  302. hex "Address of the pre-console buffer"
  303. depends on PRE_CONSOLE_BUFFER
  304. default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
  305. default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
  306. help
  307. This sets the start address of the pre-console buffer. This must
  308. be in available memory and is accessed before relocation and
  309. possibly before DRAM is set up. Therefore choose an address
  310. carefully.
  311. We should consider removing this option and allocating the memory
  312. in board_init_f_init_reserve() instead.
  313. config CONSOLE_MUX
  314. bool "Enable console multiplexing"
  315. default y if DM_VIDEO || VIDEO || LCD
  316. help
  317. This allows multiple devices to be used for each console 'file'.
  318. For example, stdout can be set to go to serial and video.
  319. Similarly, stdin can be set to come from serial and keyboard.
  320. Input can be provided from either source. Console multiplexing
  321. adds a small amount of size to U-Boot. Changes to the environment
  322. variables stdout, stdin and stderr will take effect immediately.
  323. config SYS_CONSOLE_IS_IN_ENV
  324. bool "Select console devices from the environment"
  325. default y if CONSOLE_MUX
  326. help
  327. This allows multiple input/output devices to be set at boot time.
  328. For example, if stdout is set to "serial,video" then output will
  329. be sent to both the serial and video devices on boot. The
  330. environment variables can be updated after boot to change the
  331. input/output devices.
  332. config SYS_CONSOLE_OVERWRITE_ROUTINE
  333. bool "Allow board control over console overwriting"
  334. help
  335. If this is enabled, and the board-specific function
  336. overwrite_console() returns 1, the stdin, stderr and stdout are
  337. switched to the serial port, else the settings in the environment
  338. are used. If this is not enabled, the console will not be switched
  339. to serial.
  340. config SYS_CONSOLE_ENV_OVERWRITE
  341. bool "Update environment variables during console init"
  342. help
  343. The console environment variables (stdout, stdin, stderr) can be
  344. used to determine the correct console devices on start-up. This
  345. option writes the console devices to these variables on console
  346. start-up (after relocation). This causes the environment to be
  347. updated to match the console devices actually chosen.
  348. config SYS_CONSOLE_INFO_QUIET
  349. bool "Don't display the console devices on boot"
  350. help
  351. Normally U-Boot displays the current settings for stdout, stdin
  352. and stderr on boot when the post-relocation console is set up.
  353. Enable this option to supress this output. It can be obtained by
  354. calling stdio_print_current_devices() from board code.
  355. config SYS_STDIO_DEREGISTER
  356. bool "Allow deregistering stdio devices"
  357. default y if USB_KEYBOARD
  358. help
  359. Generally there is no need to deregister stdio devices since they
  360. are never deactivated. But if a stdio device is used which can be
  361. removed (for example a USB keyboard) then this option can be
  362. enabled to ensure this is handled correctly.
  363. endmenu
  364. menu "Logging"
  365. config LOG
  366. bool "Enable logging support"
  367. help
  368. This enables support for logging of status and debug messages. These
  369. can be displayed on the console, recorded in a memory buffer, or
  370. discarded if not needed. Logging supports various categories and
  371. levels of severity.
  372. config SPL_LOG
  373. bool "Enable logging support in SPL"
  374. help
  375. This enables support for logging of status and debug messages. These
  376. can be displayed on the console, recorded in a memory buffer, or
  377. discarded if not needed. Logging supports various categories and
  378. levels of severity.
  379. config LOG_MAX_LEVEL
  380. int "Maximum log level to record"
  381. depends on LOG
  382. default 5
  383. help
  384. This selects the maximum log level that will be recorded. Any value
  385. higher than this will be ignored. If possible log statements below
  386. this level will be discarded at build time. Levels:
  387. 0 - panic
  388. 1 - critical
  389. 2 - error
  390. 3 - warning
  391. 4 - note
  392. 5 - info
  393. 6 - detail
  394. 7 - debug
  395. config SPL_LOG_MAX_LEVEL
  396. int "Maximum log level to record in SPL"
  397. depends on SPL_LOG
  398. default 3
  399. help
  400. This selects the maximum log level that will be recorded. Any value
  401. higher than this will be ignored. If possible log statements below
  402. this level will be discarded at build time. Levels:
  403. 0 - panic
  404. 1 - critical
  405. 2 - error
  406. 3 - warning
  407. 4 - note
  408. 5 - info
  409. 6 - detail
  410. 7 - debug
  411. config LOG_CONSOLE
  412. bool "Allow log output to the console"
  413. depends on LOG
  414. default y
  415. help
  416. Enables a log driver which writes log records to the console.
  417. Generally the console is the serial port or LCD display. Only the
  418. log message is shown - other details like level, category, file and
  419. line number are omitted.
  420. config LOG_SPL_CONSOLE
  421. bool "Allow log output to the console in SPL"
  422. depends on LOG_SPL
  423. default y
  424. help
  425. Enables a log driver which writes log records to the console.
  426. Generally the console is the serial port or LCD display. Only the
  427. log message is shown - other details like level, category, file and
  428. line number are omitted.
  429. config LOG_TEST
  430. bool "Provide a test for logging"
  431. depends on LOG
  432. default y if SANDBOX
  433. help
  434. This enables a 'log test' command to test logging. It is normally
  435. executed from a pytest and simply outputs logging information
  436. in various different ways to test that the logging system works
  437. correctly with varoius settings.
  438. endmenu
  439. config DEFAULT_FDT_FILE
  440. string "Default fdt file"
  441. help
  442. This option is used to set the default fdt file to boot OS.
  443. config VERSION_VARIABLE
  444. bool "add U-Boot environment variable vers"
  445. default n
  446. help
  447. If this variable is defined, an environment variable
  448. named "ver" is created by U-Boot showing the U-Boot
  449. version as printed by the "version" command.
  450. Any change to this variable will be reverted at the
  451. next reset.
  452. config BOARD_LATE_INIT
  453. bool
  454. help
  455. Sometimes board require some initialization code that might
  456. require once the actual init done, example saving board specific env,
  457. boot-modes etc. which eventually done at late.
  458. So this config enable the late init code with the help of board_late_init
  459. function which should defined on respective boards.
  460. config DISPLAY_CPUINFO
  461. bool "Display information about the CPU during start up"
  462. default y if ARM || NIOS2 || X86 || XTENSA || M68K
  463. help
  464. Display information about the CPU that U-Boot is running on
  465. when U-Boot starts up. The function print_cpuinfo() is called
  466. to do this.
  467. config DISPLAY_BOARDINFO
  468. bool "Display information about the board during start up"
  469. default y if ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
  470. help
  471. Display information about the board that U-Boot is running on
  472. when U-Boot starts up. The board function checkboard() is called
  473. to do this.
  474. menu "Start-up hooks"
  475. config ARCH_EARLY_INIT_R
  476. bool "Call arch-specific init soon after relocation"
  477. help
  478. With this option U-Boot will call arch_early_init_r() soon after
  479. relocation. Driver model is running by this point, and the cache
  480. is on. Note that board_early_init_r() is called first, if
  481. enabled. This can be used to set up architecture-specific devices.
  482. config ARCH_MISC_INIT
  483. bool "Call arch-specific init after relocation, when console is ready"
  484. help
  485. With this option U-Boot will call arch_misc_init() after
  486. relocation to allow miscellaneous arch-dependent initialisation
  487. to be performed. This function should be defined by the board
  488. and will be called after the console is set up, after relocaiton.
  489. config BOARD_EARLY_INIT_F
  490. bool "Call board-specific init before relocation"
  491. help
  492. Some boards need to perform initialisation as soon as possible
  493. after boot. With this option, U-Boot calls board_early_init_f()
  494. after driver model is ready in the pre-relocation init sequence.
  495. Note that the normal serial console is not yet set up, but the
  496. debug UART will be available if enabled.
  497. endmenu
  498. menu "Security support"
  499. config HASH
  500. bool # "Support hashing API (SHA1, SHA256, etc.)"
  501. help
  502. This provides a way to hash data in memory using various supported
  503. algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
  504. and the algorithms it supports are defined in common/hash.c. See
  505. also CMD_HASH for command-line access.
  506. endmenu
  507. source "common/spl/Kconfig"