Kconfig 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  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. select DM
  368. help
  369. This enables support for logging of status and debug messages. These
  370. can be displayed on the console, recorded in a memory buffer, or
  371. discarded if not needed. Logging supports various categories and
  372. levels of severity.
  373. config SPL_LOG
  374. bool "Enable logging support in SPL"
  375. help
  376. This enables support for logging of status and debug messages. These
  377. can be displayed on the console, recorded in a memory buffer, or
  378. discarded if not needed. Logging supports various categories and
  379. levels of severity.
  380. config LOG_MAX_LEVEL
  381. int "Maximum log level to record"
  382. depends on LOG
  383. default 5
  384. help
  385. This selects the maximum log level that will be recorded. Any value
  386. higher than this will be ignored. If possible log statements below
  387. this level will be discarded at build time. Levels:
  388. 0 - panic
  389. 1 - critical
  390. 2 - error
  391. 3 - warning
  392. 4 - note
  393. 5 - info
  394. 6 - detail
  395. 7 - debug
  396. config SPL_LOG_MAX_LEVEL
  397. int "Maximum log level to record in SPL"
  398. depends on SPL_LOG
  399. default 3
  400. help
  401. This selects the maximum log level that will be recorded. Any value
  402. higher than this will be ignored. If possible log statements below
  403. this level will be discarded at build time. Levels:
  404. 0 - panic
  405. 1 - critical
  406. 2 - error
  407. 3 - warning
  408. 4 - note
  409. 5 - info
  410. 6 - detail
  411. 7 - debug
  412. config LOG_CONSOLE
  413. bool "Allow log output to the console"
  414. depends on LOG
  415. default y
  416. help
  417. Enables a log driver which writes log records to the console.
  418. Generally the console is the serial port or LCD display. Only the
  419. log message is shown - other details like level, category, file and
  420. line number are omitted.
  421. config LOG_SPL_CONSOLE
  422. bool "Allow log output to the console in SPL"
  423. depends on LOG_SPL
  424. default y
  425. help
  426. Enables a log driver which writes log records to the console.
  427. Generally the console is the serial port or LCD display. Only the
  428. log message is shown - other details like level, category, file and
  429. line number are omitted.
  430. config LOG_TEST
  431. bool "Provide a test for logging"
  432. depends on LOG
  433. default y if SANDBOX
  434. help
  435. This enables a 'log test' command to test logging. It is normally
  436. executed from a pytest and simply outputs logging information
  437. in various different ways to test that the logging system works
  438. correctly with varoius settings.
  439. config LOG_ERROR_RETURN
  440. bool "Log all functions which return an error"
  441. depends on LOG
  442. help
  443. When an error is returned in U-Boot it is sometimes difficult to
  444. figure out the root cause. For eaxmple, reading from SPI flash may
  445. fail due to a problem in the SPI controller or due to the flash part
  446. not returning the expected information. This option changes
  447. log_ret() to log any errors it sees. With this option disabled,
  448. log_ret() is a nop.
  449. You can add log_ret() to all functions which return an error code.
  450. endmenu
  451. config SUPPORT_RAW_INITRD
  452. bool "Enable raw initrd images"
  453. help
  454. Note, defining the SUPPORT_RAW_INITRD allows user to supply
  455. kernel with raw initrd images. The syntax is slightly different, the
  456. address of the initrd must be augmented by it's size, in the following
  457. format: "<initrd address>:<initrd size>".
  458. config DEFAULT_FDT_FILE
  459. string "Default fdt file"
  460. help
  461. This option is used to set the default fdt file to boot OS.
  462. config VERSION_VARIABLE
  463. bool "add U-Boot environment variable vers"
  464. default n
  465. help
  466. If this variable is defined, an environment variable
  467. named "ver" is created by U-Boot showing the U-Boot
  468. version as printed by the "version" command.
  469. Any change to this variable will be reverted at the
  470. next reset.
  471. config BOARD_LATE_INIT
  472. bool
  473. help
  474. Sometimes board require some initialization code that might
  475. require once the actual init done, example saving board specific env,
  476. boot-modes etc. which eventually done at late.
  477. So this config enable the late init code with the help of board_late_init
  478. function which should defined on respective boards.
  479. config DISPLAY_CPUINFO
  480. bool "Display information about the CPU during start up"
  481. default y if ARM || NIOS2 || X86 || XTENSA || M68K
  482. help
  483. Display information about the CPU that U-Boot is running on
  484. when U-Boot starts up. The function print_cpuinfo() is called
  485. to do this.
  486. config DISPLAY_BOARDINFO
  487. bool "Display information about the board during early start up"
  488. default y if ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
  489. help
  490. Display information about the board that U-Boot is running on
  491. when U-Boot starts up. The board function checkboard() is called
  492. to do this.
  493. config DISPLAY_BOARDINFO_LATE
  494. bool "Display information about the board during late start up"
  495. help
  496. Display information about the board that U-Boot is running on after
  497. the relocation phase. The board function checkboard() is called to do
  498. this.
  499. menu "Start-up hooks"
  500. config ARCH_EARLY_INIT_R
  501. bool "Call arch-specific init soon after relocation"
  502. help
  503. With this option U-Boot will call arch_early_init_r() soon after
  504. relocation. Driver model is running by this point, and the cache
  505. is on. Note that board_early_init_r() is called first, if
  506. enabled. This can be used to set up architecture-specific devices.
  507. config ARCH_MISC_INIT
  508. bool "Call arch-specific init after relocation, when console is ready"
  509. help
  510. With this option U-Boot will call arch_misc_init() after
  511. relocation to allow miscellaneous arch-dependent initialisation
  512. to be performed. This function should be defined by the board
  513. and will be called after the console is set up, after relocaiton.
  514. config BOARD_EARLY_INIT_F
  515. bool "Call board-specific init before relocation"
  516. help
  517. Some boards need to perform initialisation as soon as possible
  518. after boot. With this option, U-Boot calls board_early_init_f()
  519. after driver model is ready in the pre-relocation init sequence.
  520. Note that the normal serial console is not yet set up, but the
  521. debug UART will be available if enabled.
  522. config BOARD_EARLY_INIT_R
  523. bool "Call board-specific init after relocation"
  524. help
  525. Some boards need to perform initialisation as directly after
  526. relocation. With this option, U-Boot calls board_early_init_r()
  527. in the post-relocation init sequence.
  528. config LAST_STAGE_INIT
  529. bool "Call board-specific as last setup step"
  530. help
  531. Some boards need to perform initialisation immediately before control
  532. is passed to the command-line interpreter (e.g. for initializations
  533. that depend on later phases in the init sequence). With this option,
  534. U-Boot calls last_stage_init() before the command-line interpreter is
  535. started.
  536. endmenu
  537. menu "Security support"
  538. config HASH
  539. bool # "Support hashing API (SHA1, SHA256, etc.)"
  540. help
  541. This provides a way to hash data in memory using various supported
  542. algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
  543. and the algorithms it supports are defined in common/hash.c. See
  544. also CMD_HASH for command-line access.
  545. endmenu
  546. menu "Update support"
  547. config UPDATE_TFTP
  548. bool "Auto-update using fitImage via TFTP"
  549. depends on FIT
  550. help
  551. This option allows performing update of NOR with data in fitImage
  552. sent via TFTP boot.
  553. config UPDATE_TFTP_CNT_MAX
  554. int "The number of connection retries during auto-update"
  555. default 0
  556. depends on UPDATE_TFTP
  557. config UPDATE_TFTP_MSEC_MAX
  558. int "Delay in mSec to wait for the TFTP server during auto-update"
  559. default 100
  560. depends on UPDATE_TFTP
  561. endmenu
  562. source "common/spl/Kconfig"