Kconfig 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. menu "Console"
  2. config MENU
  3. bool
  4. help
  5. This is the library functionality to provide a text-based menu of
  6. choices for the user to make choices with.
  7. config CONSOLE_RECORD
  8. bool "Console recording"
  9. help
  10. This provides a way to record console output (and provide console
  11. input) through circular buffers. This is mostly useful for testing.
  12. Console output is recorded even when the console is silent.
  13. To enable console recording, call console_record_reset_enable()
  14. from your code.
  15. config CONSOLE_RECORD_INIT_F
  16. bool "Enable console recording during pre-relocation init"
  17. depends on CONSOLE_RECORD && SYS_MALLOC_F
  18. default y
  19. help
  20. This option enables console recording during pre-relocation init.
  21. CONFIG_SYS_MALLOC_F must be enabled to use this feature.
  22. config CONSOLE_RECORD_OUT_SIZE
  23. hex "Output buffer size"
  24. depends on CONSOLE_RECORD
  25. default 0x400 if CONSOLE_RECORD
  26. help
  27. Set the size of the console output buffer. When this fills up, no
  28. more data will be recorded until some is removed. The buffer is
  29. allocated immediately after the malloc() region is ready.
  30. config CONSOLE_RECORD_OUT_SIZE_F
  31. hex "Output buffer size before relocation"
  32. depends on CONSOLE_RECORD
  33. default 0x400 if CONSOLE_RECORD
  34. help
  35. Set the size of the console output buffer before relocation. When
  36. this fills up, no more data will be recorded until some is removed.
  37. The buffer is allocated immediately after the early malloc() region is
  38. ready.
  39. config CONSOLE_RECORD_IN_SIZE
  40. hex "Input buffer size"
  41. depends on CONSOLE_RECORD
  42. default 0x100 if CONSOLE_RECORD
  43. help
  44. Set the size of the console input buffer. When this contains data,
  45. tstc() and getc() will use this in preference to real device input.
  46. The buffer is allocated immediately after the malloc() region is
  47. ready.
  48. config DISABLE_CONSOLE
  49. bool "Add functionality to disable console completely"
  50. help
  51. Disable console (in & out).
  52. config IDENT_STRING
  53. string "Board specific string to be added to uboot version string"
  54. help
  55. This options adds the board specific name to u-boot version.
  56. config LOGLEVEL
  57. int "loglevel"
  58. default 4
  59. range 0 10
  60. help
  61. All Messages with a loglevel smaller than the console loglevel will
  62. be compiled in. The loglevels are defined as follows:
  63. 0 - emergency
  64. 1 - alert
  65. 2 - critical
  66. 3 - error
  67. 4 - warning
  68. 5 - note
  69. 6 - info
  70. 7 - debug
  71. 8 - debug content
  72. 9 - debug hardware I/O
  73. config SPL_LOGLEVEL
  74. int
  75. depends on SPL
  76. default LOGLEVEL
  77. config TPL_LOGLEVEL
  78. int
  79. depends on TPL
  80. default LOGLEVEL
  81. config VPL_LOGLEVEL
  82. int "loglevel for VPL"
  83. depends on VPL
  84. default LOGLEVEL
  85. help
  86. All Messages with a loglevel smaller than the console loglevel will
  87. be compiled in to VPL. See LOGLEVEL for a list of available log
  88. levels. Setting this to a value above 4 may increase the code size
  89. significantly.
  90. config SILENT_CONSOLE
  91. bool "Support a silent console"
  92. help
  93. This option allows the console to be silenced, meaning that no
  94. output will appear on the console devices. This is controlled by
  95. setting the environment variable 'silent' to a non-empty value.
  96. Note this also silences the console when booting Linux.
  97. When the console is set up, the variable is checked, and the
  98. GD_FLG_SILENT flag is set. Changing the environment variable later
  99. will update the flag.
  100. config SPL_SILENT_CONSOLE
  101. bool "Use a silent console in SPL"
  102. default y if SILENT_CONSOLE && !SANDBOX
  103. help
  104. This selects a silent console in SPL. When enabled it drops some
  105. output messages. The GD_FLG_SILENT flag is not used in SPL so there
  106. is no run-time control of console messages in SPL.
  107. Future work may allow the SPL console to be silenced completely using
  108. this option.
  109. config TPL_SILENT_CONSOLE
  110. bool "Use a silent console in TPL"
  111. default y if SILENT_CONSOLE && !SANDBOX
  112. help
  113. This selects a silent console in TPL. When enabled it drops some
  114. output messages. The GD_FLG_SILENT flag is not used in TPL so there
  115. is no run-time control of console messages in TPL.
  116. Future work may allow the TPL console to be silenced completely using
  117. this option.
  118. config SILENT_U_BOOT_ONLY
  119. bool "Only silence the U-Boot console"
  120. depends on SILENT_CONSOLE
  121. help
  122. Normally when the U-Boot console is silenced, Linux's console is
  123. also silenced (assuming the board boots into Linux). This option
  124. allows the linux console to operate normally, even if U-Boot's
  125. is silenced.
  126. config SILENT_CONSOLE_UPDATE_ON_SET
  127. bool "Changes to the 'silent' environment variable update immediately"
  128. depends on SILENT_CONSOLE
  129. default y if SILENT_CONSOLE
  130. help
  131. When the 'silent' environment variable is changed, update the
  132. console silence flag immediately. This allows 'setenv' to be used
  133. to silence or un-silence the console.
  134. The effect is that any change to the variable will affect the
  135. GD_FLG_SILENT flag.
  136. config SILENT_CONSOLE_UPDATE_ON_RELOC
  137. bool "Allow flags to take effect on relocation"
  138. depends on SILENT_CONSOLE
  139. help
  140. In some cases the environment is not available until relocation
  141. (e.g. NAND). This option makes the value of the 'silent'
  142. environment variable take effect at relocation.
  143. config SILENT_CONSOLE_UNTIL_ENV
  144. bool "Keep console silent until environment is loaded"
  145. depends on SILENT_CONSOLE
  146. help
  147. This option makes sure U-Boot will never use the console unless the
  148. environment from flash does not contain the 'silent' variable. If
  149. set, the console is kept silent until after the environment was
  150. loaded. Use this in combination with PRE_CONSOLE_BUFFER to print out
  151. earlier messages after loading the environment when allowed.
  152. config PRE_CONSOLE_BUFFER
  153. bool "Buffer characters before the console is available"
  154. help
  155. Prior to the console being initialised (i.e. serial UART
  156. initialised etc) all console output is silently discarded.
  157. Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
  158. buffer any console messages prior to the console being
  159. initialised to a buffer. The buffer is a circular buffer, so
  160. if it overflows, earlier output is discarded.
  161. Note that this is not currently supported in SPL. It would be
  162. useful to be able to share the pre-console buffer with SPL.
  163. config PRE_CON_BUF_SZ
  164. int "Sets the size of the pre-console buffer"
  165. depends on PRE_CONSOLE_BUFFER
  166. default 4096
  167. help
  168. The size of the pre-console buffer affects how much console output
  169. can be held before it overflows and starts discarding earlier
  170. output. Normally there is very little output at this early stage,
  171. unless debugging is enabled, so allow enough for ~10 lines of
  172. text.
  173. This is a useful feature if you are using a video console and
  174. want to see the full boot output on the console. Without this
  175. option only the post-relocation output will be displayed.
  176. config PRE_CON_BUF_ADDR
  177. hex "Address of the pre-console buffer"
  178. depends on PRE_CONSOLE_BUFFER
  179. default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
  180. default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
  181. default 0x0f000000 if ROCKCHIP_RK3288
  182. default 0x0f200000 if ROCKCHIP_RK3399
  183. help
  184. This sets the start address of the pre-console buffer. This must
  185. be in available memory and is accessed before relocation and
  186. possibly before DRAM is set up. Therefore choose an address
  187. carefully.
  188. We should consider removing this option and allocating the memory
  189. in board_init_f_init_reserve() instead.
  190. config CONSOLE_FLUSH_SUPPORT
  191. bool "Enable console flush support"
  192. default y
  193. help
  194. This enables compilation of flush() function for console flush support.
  195. config CONSOLE_MUX
  196. bool "Enable console multiplexing"
  197. default y if VIDEO || LCD
  198. help
  199. This allows multiple devices to be used for each console 'file'.
  200. For example, stdout can be set to go to serial and video.
  201. Similarly, stdin can be set to come from serial and keyboard.
  202. Input can be provided from either source. Console multiplexing
  203. adds a small amount of size to U-Boot. Changes to the environment
  204. variables stdout, stdin and stderr will take effect immediately.
  205. config SYS_CONSOLE_IS_IN_ENV
  206. bool "Select console devices from the environment"
  207. default y if CONSOLE_MUX
  208. help
  209. This allows multiple input/output devices to be set at boot time.
  210. For example, if stdout is set to "serial,vidconsole" then output
  211. will be sent to both the serial and video devices on boot. The
  212. environment variables can be updated after boot to change the
  213. input/output devices.
  214. config SYS_CONSOLE_OVERWRITE_ROUTINE
  215. bool "Allow board control over console overwriting"
  216. help
  217. If this is enabled, and the board-specific function
  218. overwrite_console() returns 1, the stdin, stderr and stdout are
  219. switched to the serial port, else the settings in the environment
  220. are used. If this is not enabled, the console will not be switched
  221. to serial.
  222. config SYS_CONSOLE_ENV_OVERWRITE
  223. bool "Update environment variables during console init"
  224. depends on SYS_CONSOLE_IS_IN_ENV
  225. help
  226. The console environment variables (stdout, stdin, stderr) can be
  227. used to determine the correct console devices on start-up. This
  228. option writes the console devices to these variables on console
  229. start-up (after relocation). This causes the environment to be
  230. updated to match the console devices actually chosen.
  231. config SYS_CONSOLE_INFO_QUIET
  232. bool "Don't display the console devices on boot"
  233. help
  234. Normally U-Boot displays the current settings for stdout, stdin
  235. and stderr on boot when the post-relocation console is set up.
  236. Enable this option to suppress this output. It can be obtained by
  237. calling stdio_print_current_devices() from board code.
  238. config SYS_STDIO_DEREGISTER
  239. bool "Allow deregistering stdio devices"
  240. default y if USB_KEYBOARD
  241. help
  242. Generally there is no need to deregister stdio devices since they
  243. are never deactivated. But if a stdio device is used which can be
  244. removed (for example a USB keyboard) then this option can be
  245. enabled to ensure this is handled correctly.
  246. config SPL_SYS_STDIO_DEREGISTER
  247. bool "Allow deregistering stdio devices in SPL"
  248. help
  249. Generally there is no need to deregister stdio devices since they
  250. are never deactivated. But if a stdio device is used which can be
  251. removed (for example a USB keyboard) then this option can be
  252. enabled to ensure this is handled correctly. This is very rarely
  253. needed in SPL.
  254. config SYS_DEVICE_NULLDEV
  255. bool "Enable a null device for stdio"
  256. default y if SPLASH_SCREEN || SYS_STDIO_DEREGISTER
  257. help
  258. Enable creation of a "nulldev" stdio device. This allows silent
  259. operation of the console by setting stdout to "nulldev". Enable
  260. this to use a serial console under board control.
  261. endmenu
  262. menu "Logging"
  263. config LOG
  264. bool "Enable logging support"
  265. depends on DM
  266. help
  267. This enables support for logging of status and debug messages. These
  268. can be displayed on the console, recorded in a memory buffer, or
  269. discarded if not needed. Logging supports various categories and
  270. levels of severity.
  271. if LOG
  272. config LOG_MAX_LEVEL
  273. int "Maximum log level to record"
  274. default 6
  275. range 0 9
  276. help
  277. This selects the maximum log level that will be recorded. Any value
  278. higher than this will be ignored. If possible log statements below
  279. this level will be discarded at build time. Levels:
  280. 0 - emergency
  281. 1 - alert
  282. 2 - critical
  283. 3 - error
  284. 4 - warning
  285. 5 - note
  286. 6 - info
  287. 7 - debug
  288. 8 - debug content
  289. 9 - debug hardware I/O
  290. config LOG_DEFAULT_LEVEL
  291. int "Default logging level to display"
  292. default LOG_MAX_LEVEL
  293. range 0 LOG_MAX_LEVEL
  294. help
  295. This is the default logging level set when U-Boot starts. It can
  296. be adjusted later using the 'log level' command. Note that setting
  297. this to a value above LOG_MAX_LEVEL will be ineffective, since the
  298. higher levels are not compiled in to U-Boot.
  299. 0 - emergency
  300. 1 - alert
  301. 2 - critical
  302. 3 - error
  303. 4 - warning
  304. 5 - note
  305. 6 - info
  306. 7 - debug
  307. 8 - debug content
  308. 9 - debug hardware I/O
  309. config LOG_CONSOLE
  310. bool "Allow log output to the console"
  311. default y
  312. help
  313. Enables a log driver which writes log records to the console.
  314. Generally the console is the serial port or LCD display. Only the
  315. log message is shown - other details like level, category, file and
  316. line number are omitted.
  317. config LOGF_FILE
  318. bool "Show source file name in log messages by default"
  319. help
  320. Show the source file name in log messages by default. This value
  321. can be overridden using the 'log format' command.
  322. config LOGF_LINE
  323. bool "Show source line number in log messages by default"
  324. help
  325. Show the source line number in log messages by default. This value
  326. can be overridden using the 'log format' command.
  327. config LOGF_FUNC
  328. bool "Show function name in log messages by default"
  329. help
  330. Show the function name in log messages by default. This value can
  331. be overridden using the 'log format' command.
  332. config LOGF_FUNC_PAD
  333. int "Number of characters to use for function"
  334. default 20
  335. help
  336. Sets the field width to use when showing the function. Set this to
  337. a larger value if you have lots of long function names, and want
  338. things to line up.
  339. config LOG_SYSLOG
  340. bool "Log output to syslog server"
  341. depends on NET
  342. help
  343. Enables a log driver which broadcasts log records via UDP port 514
  344. to syslog servers.
  345. config SPL_LOG
  346. bool "Enable logging support in SPL"
  347. depends on LOG && SPL
  348. help
  349. This enables support for logging of status and debug messages. These
  350. can be displayed on the console, recorded in a memory buffer, or
  351. discarded if not needed. Logging supports various categories and
  352. levels of severity.
  353. if SPL_LOG
  354. config SPL_LOG_MAX_LEVEL
  355. int "Maximum log level to record in SPL"
  356. depends on SPL_LOG
  357. default 3
  358. range 0 9
  359. help
  360. This selects the maximum log level that will be recorded. Any value
  361. higher than this will be ignored. If possible log statements below
  362. this level will be discarded at build time. Levels:
  363. 0 - emergency
  364. 1 - alert
  365. 2 - critical
  366. 3 - error
  367. 4 - warning
  368. 5 - note
  369. 6 - info
  370. 7 - debug
  371. 8 - debug content
  372. 9 - debug hardware I/O
  373. config SPL_LOG_CONSOLE
  374. bool "Allow log output to the console in SPL"
  375. default y
  376. help
  377. Enables a log driver which writes log records to the console.
  378. Generally the console is the serial port or LCD display. Only the
  379. log message is shown - other details like level, category, file and
  380. line number are omitted.
  381. endif
  382. config TPL_LOG
  383. bool "Enable logging support in TPL"
  384. depends on LOG && TPL
  385. help
  386. This enables support for logging of status and debug messages. These
  387. can be displayed on the console, recorded in a memory buffer, or
  388. discarded if not needed. Logging supports various categories and
  389. levels of severity.
  390. if TPL_LOG
  391. config TPL_LOG_MAX_LEVEL
  392. int "Maximum log level to record in TPL"
  393. depends on TPL_LOG
  394. default 3
  395. range 0 9
  396. help
  397. This selects the maximum log level that will be recorded. Any value
  398. higher than this will be ignored. If possible log statements below
  399. this level will be discarded at build time. Levels:
  400. 0 - emergency
  401. 1 - alert
  402. 2 - critical
  403. 3 - error
  404. 4 - warning
  405. 5 - note
  406. 6 - info
  407. 7 - debug
  408. 8 - debug content
  409. 9 - debug hardware I/O
  410. config TPL_LOG_CONSOLE
  411. bool "Allow log output to the console in TPL"
  412. default y
  413. help
  414. Enables a log driver which writes log records to the console.
  415. Generally the console is the serial port or LCD display. Only the
  416. log message is shown - other details like level, category, file and
  417. line number are omitted.
  418. endif
  419. config VPL_LOG
  420. bool "Enable logging support in VPL"
  421. depends on LOG && VPL
  422. help
  423. This enables support for logging of status and debug messages. These
  424. can be displayed on the console, recorded in a memory buffer, or
  425. discarded if not needed. Logging supports various categories and
  426. levels of severity.
  427. if VPL_LOG
  428. config VPL_LOG_MAX_LEVEL
  429. int "Maximum log level to record in VPL"
  430. default 3
  431. help
  432. This selects the maximum log level that will be recorded. Any value
  433. higher than this will be ignored. If possible log statements below
  434. this level will be discarded at build time. Levels:
  435. 0 - emergency
  436. 1 - alert
  437. 2 - critical
  438. 3 - error
  439. 4 - warning
  440. 5 - note
  441. 6 - info
  442. 7 - debug
  443. 8 - debug content
  444. 9 - debug hardware I/O
  445. config VPL_LOG_CONSOLE
  446. bool "Allow log output to the console in VPL"
  447. default y
  448. help
  449. Enables a log driver which writes log records to the console.
  450. Generally the console is the serial port or LCD display. Only the
  451. log message is shown - other details like level, category, file and
  452. line number are omitted.
  453. endif
  454. config LOG_ERROR_RETURN
  455. bool "Log all functions which return an error"
  456. help
  457. When an error is returned in U-Boot it is sometimes difficult to
  458. figure out the root cause. For example, reading from SPI flash may
  459. fail due to a problem in the SPI controller or due to the flash part
  460. not returning the expected information. This option changes
  461. log_ret() to log any errors it sees. With this option disabled,
  462. log_ret() is a nop.
  463. You can add log_ret() to all functions which return an error code.
  464. config LOG_TEST
  465. bool "Provide a test for logging"
  466. depends on UNIT_TEST
  467. default y if SANDBOX
  468. help
  469. This enables a 'log test' command to test logging. It is normally
  470. executed from a pytest and simply outputs logging information
  471. in various different ways to test that the logging system works
  472. correctly with various settings.
  473. endif
  474. endmenu
  475. menu "Init options"
  476. config BOARD_TYPES
  477. bool "Enable board_type entry in global data struct"
  478. help
  479. If this option is enabled, a field will be added to the global
  480. data struct to store an unsigned long value for the type of
  481. platform that we have determined we are on, at run-time.
  482. config DISPLAY_CPUINFO
  483. bool "Display information about the CPU during start up"
  484. default y if ARC || ARM || NIOS2 || X86 || XTENSA || M68K
  485. help
  486. Display information about the CPU that U-Boot is running on
  487. when U-Boot starts up. The function print_cpuinfo() is called
  488. to do this.
  489. config DISPLAY_BOARDINFO
  490. bool "Display information about the board during early start up"
  491. default y if ARC || ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
  492. help
  493. Display information about the board that U-Boot is running on
  494. when U-Boot starts up. The board function checkboard() is called
  495. to do this.
  496. config DISPLAY_BOARDINFO_LATE
  497. bool "Display information about the board during late start up"
  498. help
  499. Display information about the board that U-Boot is running on after
  500. the relocation phase. The board function checkboard() is called to do
  501. this.
  502. menu "Start-up hooks"
  503. config CYCLIC
  504. bool "General-purpose cyclic execution mechanism"
  505. help
  506. This enables a general-purpose cyclic execution infrastructure,
  507. to allow "small" (run-time wise) functions to be executed at
  508. a specified frequency. Things like LED blinking or watchdog
  509. triggering are examples for such tasks.
  510. if CYCLIC
  511. config CYCLIC_MAX_CPU_TIME_US
  512. int "Sets the max allowed time for a cyclic function in us"
  513. default 1000
  514. help
  515. The max allowed time for a cyclic function in us. If a functions
  516. takes longer than this duration this function will get unregistered
  517. automatically.
  518. endif # CYCLIC
  519. config EVENT
  520. bool
  521. help
  522. This adds a framework for general purpose sending and processing of
  523. events, to allow interested parties to be alerted when something
  524. happens. This is an attempt to stem the flow of weak functions,
  525. hooks, functions in board_f.c and board_r.c and the Kconfig options
  526. below.
  527. See doc/develop/event.rst for more information.
  528. if EVENT
  529. config EVENT_DYNAMIC
  530. bool
  531. help
  532. Enable this to support adding an event spy at runtime, without adding
  533. it to the EVENT_SPY() linker list. This increases code size slightly
  534. but provides more flexibility for boards and subsystems that need it.
  535. config EVENT_DEBUG
  536. bool "Enable event debugging assistance"
  537. default y if SANDBOX
  538. help
  539. Enable this to get useful features for seeing what is happening with
  540. events, such as event-type names. This adds to the code size of
  541. U-Boot so can be turned off for production builds.
  542. config SPL_EVENT
  543. bool # General-purpose event-handling mechanism in SPL
  544. depends on SPL
  545. help
  546. This adds a framework for general purpose sending and processing of
  547. events, to allow interested parties to be alerted when something
  548. happens. This is an attempt to stem the flow of weak functions,
  549. hooks, functions in board_f.c and board_r.c and the Kconfig options
  550. below.
  551. See doc/develop/event.rst for more information.
  552. config SPL_EVENT_DYNAMIC
  553. bool
  554. depends on SPL_EVENT && EVENT_DYNAMIC
  555. help
  556. Enable this to support adding an event spy at runtime, without adding
  557. it to the EVENT_SPY() linker list. This increases code size slightly
  558. but provides more flexibility for boards and subsystems that need it.
  559. endif # EVENT
  560. config ARCH_EARLY_INIT_R
  561. bool
  562. help
  563. With this option U-Boot will call arch_early_init_r() soon after
  564. relocation. Driver model is running by this point, and the cache
  565. is on. Note that board_early_init_r() is called first, if
  566. enabled. This can be used to set up architecture-specific devices.
  567. config ARCH_MISC_INIT
  568. bool "Call arch-specific init after relocation, when console is ready"
  569. help
  570. With this option U-Boot will call arch_misc_init() after
  571. relocation to allow miscellaneous arch-dependent initialisation
  572. to be performed. This function should be defined by the board
  573. and will be called after the console is set up, after relocation.
  574. config BOARD_EARLY_INIT_F
  575. bool "Call board-specific init before relocation"
  576. help
  577. Some boards need to perform initialisation as soon as possible
  578. after boot. With this option, U-Boot calls board_early_init_f()
  579. after driver model is ready in the pre-relocation init sequence.
  580. Note that the normal serial console is not yet set up, but the
  581. debug UART will be available if enabled.
  582. config BOARD_EARLY_INIT_R
  583. bool "Call board-specific init after relocation"
  584. help
  585. Some boards need to perform initialisation as directly after
  586. relocation. With this option, U-Boot calls board_early_init_r()
  587. in the post-relocation init sequence.
  588. config BOARD_POSTCLK_INIT
  589. bool "Call board_postclk_init"
  590. help
  591. Some boards need this to initialize select items, after clocks /
  592. timebase and before env / serial.
  593. config BOARD_LATE_INIT
  594. bool "Execute Board late init"
  595. help
  596. Sometimes board require some initialization code that might
  597. require once the actual init done, example saving board specific env,
  598. boot-modes etc. which eventually done at late.
  599. So this config enable the late init code with the help of board_late_init
  600. function which should defined on respective boards.
  601. config CLOCKS
  602. bool "Call set_cpu_clk_info"
  603. depends on ARM
  604. config HWCONFIG
  605. bool "hwconfig infrastructure"
  606. default y if PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
  607. config SYS_FSL_CLK
  608. bool
  609. depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || \
  610. (FSL_ESDHC_IMX && (ARCH_MX5 || ARCH_MX6 || ARCH_MX7))
  611. default y
  612. help
  613. Enable to call get_clocks() in board_init_f() for platforms other
  614. than PowerPC or M68k. This is a legacy option. If not TARGET_BRPPT2
  615. config LAST_STAGE_INIT
  616. bool "Call board-specific as last setup step"
  617. help
  618. Some boards need to perform initialisation immediately before control
  619. is passed to the command-line interpreter (e.g. for initializations
  620. that depend on later phases in the init sequence). With this option,
  621. U-Boot calls last_stage_init() before the command-line interpreter is
  622. started.
  623. config MISC_INIT_R
  624. bool "Execute Misc Init"
  625. default y if ARCH_KEYSTONE || ARCH_SUNXI || MPC85xx
  626. default y if ARCH_OMAP2PLUS && !AM33XX
  627. help
  628. Enabling this option calls 'misc_init_r' function
  629. config SYS_MALLOC_BOOTPARAMS
  630. bool "Malloc a buffer to use for bootparams"
  631. help
  632. In some cases rather than using a known location to store the
  633. bi_boot_params portion of gd we need to allocate it from our malloc pool.
  634. config SYS_BOOTPARAMS_LEN
  635. hex "Size of the bootparam buffer to malloc in bytes"
  636. depends on SYS_MALLOC_BOOTPARAMS
  637. default 0x20000 if MIPS || RCAR_64
  638. default 0x10000
  639. config ID_EEPROM
  640. bool "Enable I2C connected system identifier EEPROM"
  641. help
  642. A number of different systems and vendors enable a vendor-specified
  643. EEPROM that contains various identifying features.
  644. config SYS_EEPROM_BUS_NUM
  645. int "I2C bus number of the system identifier EEPROM"
  646. depends on ID_EEPROM
  647. default 0
  648. choice
  649. prompt "EEPROM starts with 'CCID' or 'NXID'"
  650. depends on ID_EEPROM && (PPC || ARCH_LS1021A || FSL_LAYERSCAPE)
  651. default SYS_I2C_EEPROM_NXID
  652. help
  653. Specify if the Freescale / NXP ID EEPROM starts with 'CCID' or 'NXID'
  654. ASCII literal string.
  655. config SYS_I2C_EEPROM_CCID
  656. bool "EEPROM starts with 'CCID'"
  657. config SYS_I2C_EEPROM_NXID
  658. bool "EEPROM starts with 'NXID'"
  659. endchoice
  660. config PCI_INIT_R
  661. bool "Enumerate PCI buses during init"
  662. depends on PCI
  663. help
  664. With this option U-Boot will call pci_init() soon after relocation,
  665. which will enumerate PCI buses. This is needed, for instance, in the
  666. case of DM PCI-based Ethernet devices, which will not be detected
  667. without having the enumeration performed earlier.
  668. config RESET_PHY_R
  669. bool "Reset ethernet PHY during init"
  670. help
  671. Implement reset_phy() in board code if required to reset the ethernet
  672. PHY.
  673. endmenu
  674. endmenu # Init options
  675. menu "Security support"
  676. config HASH
  677. bool # "Support hashing API (SHA1, SHA256, etc.)"
  678. help
  679. This provides a way to hash data in memory using various supported
  680. algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
  681. and the algorithms it supports are defined in common/hash.c. See
  682. also CMD_HASH for command-line access.
  683. config AVB_VERIFY
  684. bool "Build Android Verified Boot operations"
  685. depends on LIBAVB
  686. depends on MMC
  687. depends on PARTITION_UUIDS
  688. help
  689. This option enables compilation of bootloader-dependent operations,
  690. used by Android Verified Boot 2.0 library (libavb). Includes:
  691. * Helpers to process strings in order to build OS bootargs.
  692. * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
  693. * Helpers to alloc/init/free avb ops.
  694. if AVB_VERIFY
  695. config AVB_BUF_ADDR
  696. hex "Define AVB buffer address"
  697. default FASTBOOT_BUF_ADDR
  698. help
  699. AVB requires a buffer for memory transactions. This variable defines the
  700. buffer address.
  701. config AVB_BUF_SIZE
  702. hex "Define AVB buffer SIZE"
  703. default FASTBOOT_BUF_SIZE
  704. help
  705. AVB requires a buffer for memory transactions. This variable defines the
  706. buffer size.
  707. endif # AVB_VERIFY
  708. config SCP03
  709. bool "Build SCP03 - Secure Channel Protocol O3 - controls"
  710. depends on OPTEE || SANDBOX
  711. depends on TEE
  712. help
  713. This option allows U-Boot to enable and or provision SCP03 on an OPTEE
  714. controlled Secured Element.
  715. config SPL_HASH
  716. bool # "Support hashing API (SHA1, SHA256, etc.)"
  717. help
  718. This provides a way to hash data in memory using various supported
  719. algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
  720. and the algorithms it supports are defined in common/hash.c. See
  721. also CMD_HASH for command-line access.
  722. config TPL_HASH
  723. bool # "Support hashing API (SHA1, SHA256, etc.)"
  724. help
  725. This provides a way to hash data in memory using various supported
  726. algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
  727. and the algorithms it supports are defined in common/hash.c. See
  728. also CMD_HASH for command-line access.
  729. config STACKPROTECTOR
  730. bool "Stack Protector buffer overflow detection"
  731. help
  732. Enable stack smash detection through compiler's stack-protector
  733. canary logic
  734. config SPL_STACKPROTECTOR
  735. bool "Stack Protector buffer overflow detection for SPL"
  736. depends on STACKPROTECTOR && SPL
  737. config TPL_STACKPROTECTOR
  738. bool "Stack Protector buffer overflow detection for TPL"
  739. depends on STACKPROTECTOR && TPL
  740. config BOARD_RNG_SEED
  741. bool "Provide /chosen/rng-seed property to the linux kernel"
  742. help
  743. Selecting this option requires the board to define a
  744. board_rng_seed() function, which should return a buffer
  745. which will be used to populate the /chosen/rng-seed property
  746. in the device tree for the OS being booted.
  747. It is up to the board code (and more generally the whole
  748. BSP) where and how to store (or generate) such a seed, how
  749. to ensure a given seed is only used once, how to create a
  750. new seed for use on subsequent boots, and whether or not the
  751. kernel should account any entropy from the given seed.
  752. endmenu
  753. menu "Update support"
  754. config UPDATE_COMMON
  755. bool
  756. select DFU_WRITE_ALT
  757. config UPDATE_TFTP
  758. bool "Auto-update using fitImage via TFTP"
  759. depends on FIT && OF_LIBFDT && !MTD_NOR_FLASH
  760. select UPDATE_COMMON
  761. help
  762. This option allows performing update of NOR with data in fitImage
  763. sent via TFTP boot.
  764. config UPDATE_TFTP_CNT_MAX
  765. int "The number of connection retries during auto-update"
  766. default 0
  767. depends on UPDATE_TFTP || DFU_TFTP
  768. config UPDATE_TFTP_MSEC_MAX
  769. int "Delay in mSec to wait for the TFTP server during auto-update"
  770. default 100
  771. depends on UPDATE_TFTP || DFU_TFTP
  772. config UPDATE_LOAD_ADDR
  773. hex "Address in memory to load the update to"
  774. depends on UPDATE_TFTP || DFU_TFTP
  775. default 0x100000
  776. help
  777. This option defines the location in memory to be used to load the
  778. update to, if 'loadaddr' is not set in the environment.
  779. config UPDATE_FIT
  780. bool "Firmware update using fitImage"
  781. depends on FIT && OF_LIBFDT
  782. depends on DFU
  783. select UPDATE_COMMON
  784. help
  785. This option allows performing update of DFU-capable storage with
  786. data in fitImage.
  787. config ANDROID_AB
  788. bool "Android A/B updates"
  789. help
  790. If enabled, adds support for the new Android A/B update model. This
  791. allows the bootloader to select which slot to boot from based on the
  792. information provided by userspace via the Android boot_ctrl HAL. This
  793. allows a bootloader to try a new version of the system but roll back
  794. to previous version if the new one didn't boot all the way.
  795. config ANDROID_AB_BACKUP_OFFSET
  796. hex "Offset of backup bootloader control"
  797. depends on ANDROID_AB
  798. default 0x0
  799. help
  800. If non-zero, a backup bootloader message starting at this offset in
  801. the partition will tried in the event that the primary one (starting
  802. at offset 0) fails its checksum.
  803. endmenu
  804. menu "Blob list"
  805. config BLOBLIST
  806. bool "Support for a bloblist"
  807. select CRC32
  808. help
  809. This enables support for a bloblist in U-Boot, which can be passed
  810. from TPL to SPL to U-Boot proper (and potentially to Linux). The
  811. blob list supports multiple binary blobs of data, each with a tag,
  812. so that different U-Boot components can store data which can survive
  813. through to the next phase of the boot.
  814. config SPL_BLOBLIST
  815. bool "Support for a bloblist in SPL"
  816. depends on BLOBLIST && SPL_LIBGENERIC_SUPPORT && SPL_LIBCOMMON_SUPPORT
  817. select SPL_CRC32
  818. default y if SPL
  819. help
  820. This enables a bloblist in SPL. If this is the first part of U-Boot
  821. to run, then the bloblist is set up in SPL and passed to U-Boot
  822. proper. If TPL also has a bloblist, then SPL uses the one from there.
  823. config TPL_BLOBLIST
  824. bool "Support for a bloblist in TPL"
  825. depends on BLOBLIST && TPL_LIBGENERIC_SUPPORT && TPL_LIBCOMMON_SUPPORT
  826. select TPL_CRC32
  827. default y if TPL
  828. help
  829. This enables a bloblist in TPL. The bloblist is set up in TPL and
  830. passed to SPL and U-Boot proper.
  831. config VPL_BLOBLIST
  832. bool "Support for a bloblist in VPL"
  833. depends on BLOBLIST && VPL_LIBGENERIC_SUPPORT && VPL_LIBCOMMON_SUPPORT
  834. default y if VPL
  835. help
  836. This enables a bloblist in VPL. The bloblist is set up in VPL and
  837. passed to SPL and U-Boot proper.
  838. if BLOBLIST
  839. choice
  840. prompt "Bloblist location"
  841. help
  842. Select the location of the bloblist, via various means.
  843. config BLOBLIST_FIXED
  844. bool "Place bloblist at a fixed address in memory"
  845. help
  846. Select this to used a fixed memory address for the bloblist. If the
  847. bloblist exists at this address from a previous phase, it used as is.
  848. If not it is created at this address in U-Boot.
  849. config BLOBLIST_ALLOC
  850. bool "Allocate bloblist"
  851. help
  852. Allocate the bloblist using malloc(). This avoids the need to
  853. specify a fixed address on systems where this is unknown or can
  854. change at runtime.
  855. endchoice
  856. config BLOBLIST_ADDR
  857. hex "Address of bloblist"
  858. default 0xc000 if SANDBOX
  859. depends on BLOBLIST_FIXED
  860. help
  861. Sets the address of the bloblist, set up by the first part of U-Boot
  862. which runs. Subsequent U-Boot phases typically use the same address.
  863. This is not used if BLOBLIST_ALLOC is selected.
  864. config BLOBLIST_SIZE
  865. hex "Size of bloblist"
  866. default 0x400
  867. help
  868. Sets the size of the bloblist in bytes. This must include all
  869. overhead (alignment, bloblist header, record header). The bloblist
  870. is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
  871. proper), and this sane bloblist is used for subsequent phases.
  872. config BLOBLIST_SIZE_RELOC
  873. hex "Size of bloblist after relocation"
  874. default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
  875. default 0 if BLOBLIST_PASSAGE
  876. help
  877. Sets the size of the bloblist in bytes after relocation. Since U-Boot
  878. has a lot more memory available then, it is possible to use a larger
  879. size than the one set up by SPL. This bloblist is set up during the
  880. relocation process.
  881. endif # BLOBLIST
  882. if SPL_BLOBLIST
  883. choice
  884. prompt "Bloblist location in SPL"
  885. help
  886. Select the location of the bloblist, via various means. Typically
  887. you should use the same value for SPL as for U-Boot, since they need
  888. to look in the same place. But if BLOBLIST_ALLOC is used, then a
  889. fresh bloblist will be created each time, since there is no shared
  890. address (between phases) for the bloblist.
  891. config SPL_BLOBLIST_FIXED
  892. bool "Place bloblist at a fixed address in memory"
  893. help
  894. Select this to used a fixed memory address for the bloblist. If the
  895. bloblist exists at this address from a previous phase, it used as is.
  896. If not it is created at this address in SPL.
  897. config SPL_BLOBLIST_ALLOC
  898. bool "Allocate bloblist"
  899. help
  900. Allocate the bloblist using malloc(). This avoids the need to
  901. specify a fixed address on systems where this is unknown or can
  902. change at runtime.
  903. endchoice
  904. endif # SPL_BLOBLIST
  905. if TPL_BLOBLIST
  906. choice
  907. prompt "Bloblist location in TPL"
  908. help
  909. Select the location of the bloblist, via various means. Typically
  910. you should use the same value for TPL as for U-Boot, since they need
  911. to look in the same place. But if BLOBLIST_ALLOC is used, then a
  912. fresh bloblist will be created each time, since there is no shared
  913. address (between phases) for the bloblist.
  914. config TPL_BLOBLIST_FIXED
  915. bool "Place bloblist at a fixed address in memory"
  916. help
  917. Select this to used a fixed memory address for the bloblist. If the
  918. bloblist exists at this address from a previous phase, it used as is.
  919. If not it is created at this address in TPL.
  920. config TPL_BLOBLIST_ALLOC
  921. bool "Allocate bloblist"
  922. help
  923. Allocate the bloblist using malloc(). This avoids the need to
  924. specify a fixed address on systems where this is unknown or can
  925. change at runtime.
  926. endchoice
  927. endif # TPL_BLOBLIST
  928. if VPL_BLOBLIST
  929. choice
  930. prompt "Bloblist location in VPL"
  931. help
  932. Select the location of the bloblist, via various means. Typically
  933. you should use the same value for VPL as for U-Boot, since they need
  934. to look in the same place. But if BLOBLIST_ALLOC is used, then a
  935. fresh bloblist will be created each time, since there is no shared
  936. address (between phases) for the bloblist.
  937. config VPL_BLOBLIST_FIXED
  938. bool "Place bloblist at a fixed address in memory"
  939. help
  940. Select this to used a fixed memory address for the bloblist. If the
  941. bloblist exists at this address from a previous phase, it used as is.
  942. If not it is created at this address in VPL.
  943. config VPL_BLOBLIST_ALLOC
  944. bool "Allocate bloblist"
  945. help
  946. Allocate the bloblist using malloc(). This avoids the need to
  947. specify a fixed address on systems where this is unknown or can
  948. change at runtime.
  949. endchoice
  950. endif # VPL_BLOBLIST
  951. endmenu
  952. source "common/spl/Kconfig"
  953. config IMAGE_SIGN_INFO
  954. bool
  955. select SHA1
  956. select SHA256
  957. help
  958. Enable image_sign_info helper functions.
  959. if IMAGE_SIGN_INFO
  960. config SPL_IMAGE_SIGN_INFO
  961. bool
  962. select SHA1
  963. select SHA256
  964. help
  965. Enable image_sign_info helper functions in SPL.
  966. config VPL_IMAGE_SIGN_INFO
  967. bool
  968. select SHA1
  969. select SHA256
  970. help
  971. Enable image_sign_info helper functions in SPL.
  972. endif
  973. config FDT_SIMPLEFB
  974. bool "FDT tools for simplefb support"
  975. depends on OF_LIBFDT
  976. help
  977. Enable the fdt tools to manage the simple fb nodes in device tree.
  978. These functions can be used by board to indicate to the OS
  979. the presence of the simple frame buffer with associated reserved
  980. memory
  981. config IO_TRACE
  982. bool
  983. config BMP
  984. bool "Enable bmp image display"
  985. help
  986. Enable bmp functions to display bmp image and get bmp info.
  987. config SPL_BMP
  988. bool "Enable bmp image display at SPL"
  989. depends on SPL_VIDEO
  990. help
  991. Enable bmp functions to display bmp image and get bmp info at SPL.