blob: f08a8e7493d8d9e7664aefcc8666d49c773b3f3a [file] [log] [blame]
Simon Glass98af8792016-10-17 20:12:35 -06001menu "Console"
2
Tom Rini4880b022016-11-29 09:14:56 -05003config MENU
4 bool
5 help
6 This is the library functionality to provide a text-based menu of
7 choices for the user to make choices with.
8
Simon Glass9854a872015-11-08 23:47:48 -07009config CONSOLE_RECORD
10 bool "Console recording"
11 help
12 This provides a way to record console output (and provide console
Robert P. J. Day57247d92016-08-31 12:49:13 -040013 input) through circular buffers. This is mostly useful for testing.
Simon Glass9854a872015-11-08 23:47:48 -070014 Console output is recorded even when the console is silent.
15 To enable console recording, call console_record_reset_enable()
16 from your code.
17
Ovidiu Panait4e819202020-11-28 10:43:03 +020018config CONSOLE_RECORD_INIT_F
19 bool "Enable console recording during pre-relocation init"
20 depends on CONSOLE_RECORD && SYS_MALLOC_F
21 default y
22 help
23 This option enables console recording during pre-relocation init.
24 CONFIG_SYS_MALLOC_F must be enabled to use this feature.
25
Simon Glass9854a872015-11-08 23:47:48 -070026config CONSOLE_RECORD_OUT_SIZE
27 hex "Output buffer size"
28 depends on CONSOLE_RECORD
29 default 0x400 if CONSOLE_RECORD
30 help
31 Set the size of the console output buffer. When this fills up, no
32 more data will be recorded until some is removed. The buffer is
33 allocated immediately after the malloc() region is ready.
34
Simon Glass8ce465e2021-10-23 17:26:03 -060035config CONSOLE_RECORD_OUT_SIZE_F
36 hex "Output buffer size before relocation"
37 depends on CONSOLE_RECORD
38 default 0x400 if CONSOLE_RECORD
39 help
40 Set the size of the console output buffer before relocation. When
41 this fills up, no more data will be recorded until some is removed.
42 The buffer is allocated immediately after the early malloc() region is
43 ready.
44
Simon Glass9854a872015-11-08 23:47:48 -070045config CONSOLE_RECORD_IN_SIZE
46 hex "Input buffer size"
47 depends on CONSOLE_RECORD
48 default 0x100 if CONSOLE_RECORD
49 help
50 Set the size of the console input buffer. When this contains data,
51 tstc() and getc() will use this in preference to real device input.
52 The buffer is allocated immediately after the malloc() region is
53 ready.
Siva Durga Prasad Paladugu4d255072016-07-19 10:42:22 +053054
Christian Gmeiner83f6f602018-09-10 12:43:16 +020055config DISABLE_CONSOLE
56 bool "Add functionality to disable console completely"
57 help
58 Disable console (in & out).
59
Siva Durga Prasad Paladugua4d88922016-07-29 15:31:47 +053060config IDENT_STRING
61 string "Board specific string to be added to uboot version string"
62 help
63 This options adds the board specific name to u-boot version.
64
Masahiro Yamadab44b3022017-09-16 14:10:40 +090065config LOGLEVEL
66 int "loglevel"
Tom Rini6a3e65d2017-10-04 16:44:30 -040067 default 4
Marek Bykowski2aa69c92020-02-03 11:43:32 +010068 range 0 10
Masahiro Yamadab44b3022017-09-16 14:10:40 +090069 help
70 All Messages with a loglevel smaller than the console loglevel will
71 be compiled in. The loglevels are defined as follows:
72
Simon Glass6fc7e932019-02-16 20:24:34 -070073 0 - emergency
74 1 - alert
75 2 - critical
76 3 - error
77 4 - warning
78 5 - note
79 6 - info
80 7 - debug
81 8 - debug content
82 9 - debug hardware I/O
Masahiro Yamadab44b3022017-09-16 14:10:40 +090083
84config SPL_LOGLEVEL
85 int
86 default LOGLEVEL
87
Simon Glass4d8d3052018-11-15 18:43:49 -070088config TPL_LOGLEVEL
89 int
Tom Rini8bea4bf2022-06-08 08:24:39 -040090 depends on TPL
Simon Glass4d8d3052018-11-15 18:43:49 -070091 default LOGLEVEL
92
Simon Glass747093d2022-04-30 00:56:53 -060093config VPL_LOGLEVEL
94 int "loglevel for VPL"
Tom Rini13ce3512022-06-08 08:24:40 -040095 depends on VPL
Simon Glass747093d2022-04-30 00:56:53 -060096 default LOGLEVEL
97 help
98 All Messages with a loglevel smaller than the console loglevel will
99 be compiled in to VPL. See LOGLEVEL for a list of available log
100 levels. Setting this to a value above 4 may increase the code size
101 significantly.
102
Simon Glass98af8792016-10-17 20:12:35 -0600103config SILENT_CONSOLE
104 bool "Support a silent console"
105 help
106 This option allows the console to be silenced, meaning that no
107 output will appear on the console devices. This is controlled by
Chris Packhamf7597732019-01-11 15:30:50 +1300108 setting the environment variable 'silent' to a non-empty value.
Simon Glass98af8792016-10-17 20:12:35 -0600109 Note this also silences the console when booting Linux.
110
111 When the console is set up, the variable is checked, and the
112 GD_FLG_SILENT flag is set. Changing the environment variable later
113 will update the flag.
114
115config SILENT_U_BOOT_ONLY
116 bool "Only silence the U-Boot console"
117 depends on SILENT_CONSOLE
118 help
119 Normally when the U-Boot console is silenced, Linux's console is
120 also silenced (assuming the board boots into Linux). This option
121 allows the linux console to operate normally, even if U-Boot's
122 is silenced.
123
124config SILENT_CONSOLE_UPDATE_ON_SET
125 bool "Changes to the 'silent' environment variable update immediately"
126 depends on SILENT_CONSOLE
127 default y if SILENT_CONSOLE
128 help
129 When the 'silent' environment variable is changed, update the
130 console silence flag immediately. This allows 'setenv' to be used
131 to silence or un-silence the console.
132
133 The effect is that any change to the variable will affect the
134 GD_FLG_SILENT flag.
135
136config 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
Simon Glass8f925582016-10-17 20:12:36 -0600144config PRE_CONSOLE_BUFFER
145 bool "Buffer characters before the console is available"
146 help
147 Prior to the console being initialised (i.e. serial UART
148 initialised etc) all console output is silently discarded.
149 Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
150 buffer any console messages prior to the console being
151 initialised to a buffer. The buffer is a circular buffer, so
152 if it overflows, earlier output is discarded.
153
154 Note that this is not currently supported in SPL. It would be
155 useful to be able to share the pre-console buffer with SPL.
156
157config PRE_CON_BUF_SZ
158 int "Sets the size of the pre-console buffer"
159 depends on PRE_CONSOLE_BUFFER
160 default 4096
161 help
162 The size of the pre-console buffer affects how much console output
163 can be held before it overflows and starts discarding earlier
164 output. Normally there is very little output at this early stage,
165 unless debugging is enabled, so allow enough for ~10 lines of
166 text.
167
168 This is a useful feature if you are using a video console and
169 want to see the full boot output on the console. Without this
170 option only the post-relocation output will be displayed.
171
172config PRE_CON_BUF_ADDR
173 hex "Address of the pre-console buffer"
174 depends on PRE_CONSOLE_BUFFER
175 default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
176 default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
Jagan Teki38070172020-01-23 19:42:19 +0530177 default 0x0f000000 if ROCKCHIP_RK3288
Jagan Teki61853a72020-04-02 17:11:23 +0530178 default 0x0f200000 if ROCKCHIP_RK3399
Simon Glass8f925582016-10-17 20:12:36 -0600179 help
180 This sets the start address of the pre-console buffer. This must
181 be in available memory and is accessed before relocation and
182 possibly before DRAM is set up. Therefore choose an address
183 carefully.
184
185 We should consider removing this option and allocating the memory
186 in board_init_f_init_reserve() instead.
187
Simon Glassef26d602016-10-17 20:12:37 -0600188config CONSOLE_MUX
189 bool "Enable console multiplexing"
190 default y if DM_VIDEO || VIDEO || LCD
191 help
192 This allows multiple devices to be used for each console 'file'.
193 For example, stdout can be set to go to serial and video.
194 Similarly, stdin can be set to come from serial and keyboard.
195 Input can be provided from either source. Console multiplexing
196 adds a small amount of size to U-Boot. Changes to the environment
197 variables stdout, stdin and stderr will take effect immediately.
198
199config SYS_CONSOLE_IS_IN_ENV
200 bool "Select console devices from the environment"
201 default y if CONSOLE_MUX
202 help
203 This allows multiple input/output devices to be set at boot time.
Anatolij Gustschinde99e772021-10-04 16:04:32 +0200204 For example, if stdout is set to "serial,vidconsole" then output
205 will be sent to both the serial and video devices on boot. The
Simon Glassef26d602016-10-17 20:12:37 -0600206 environment variables can be updated after boot to change the
207 input/output devices.
208
Simon Glass84f2a5d2016-10-17 20:12:59 -0600209config SYS_CONSOLE_OVERWRITE_ROUTINE
210 bool "Allow board control over console overwriting"
211 help
212 If this is enabled, and the board-specific function
213 overwrite_console() returns 1, the stdin, stderr and stdout are
214 switched to the serial port, else the settings in the environment
215 are used. If this is not enabled, the console will not be switched
216 to serial.
217
Simon Glass3505bc52016-10-17 20:12:58 -0600218config SYS_CONSOLE_ENV_OVERWRITE
219 bool "Update environment variables during console init"
220 help
221 The console environment variables (stdout, stdin, stderr) can be
222 used to determine the correct console devices on start-up. This
223 option writes the console devices to these variables on console
224 start-up (after relocation). This causes the environment to be
225 updated to match the console devices actually chosen.
226
Simon Glassf3f3eff2016-10-17 20:13:00 -0600227config SYS_CONSOLE_INFO_QUIET
228 bool "Don't display the console devices on boot"
229 help
230 Normally U-Boot displays the current settings for stdout, stdin
231 and stderr on boot when the post-relocation console is set up.
Chris Packhamf7597732019-01-11 15:30:50 +1300232 Enable this option to suppress this output. It can be obtained by
Simon Glassf3f3eff2016-10-17 20:13:00 -0600233 calling stdio_print_current_devices() from board code.
234
Simon Glass869588d2016-10-17 20:13:02 -0600235config SYS_STDIO_DEREGISTER
236 bool "Allow deregistering stdio devices"
237 default y if USB_KEYBOARD
238 help
239 Generally there is no need to deregister stdio devices since they
240 are never deactivated. But if a stdio device is used which can be
241 removed (for example a USB keyboard) then this option can be
242 enabled to ensure this is handled correctly.
243
Simon Glass7e156382020-08-11 11:23:36 -0600244config SPL_SYS_STDIO_DEREGISTER
245 bool "Allow deregistering stdio devices in SPL"
246 help
247 Generally there is no need to deregister stdio devices since they
248 are never deactivated. But if a stdio device is used which can be
249 removed (for example a USB keyboard) then this option can be
250 enabled to ensure this is handled correctly. This is very rarely
251 needed in SPL.
252
253config SYS_DEVICE_NULLDEV
254 bool "Enable a null device for stdio"
Simon Glass3ca06092020-08-11 11:23:37 -0600255 default y if SPLASH_SCREEN || SYS_STDIO_DEREGISTER
Simon Glass7e156382020-08-11 11:23:36 -0600256 help
257 Enable creation of a "nulldev" stdio device. This allows silent
258 operation of the console by setting stdout to "nulldev". Enable
259 this to use a serial console under board control.
260
Simon Glass98af8792016-10-17 20:12:35 -0600261endmenu
262
Simon Glasse9c8d492017-12-04 13:48:24 -0700263menu "Logging"
264
265config LOG
266 bool "Enable logging support"
Michal Simek563273d2018-07-23 15:55:11 +0200267 depends on DM
Simon Glasse9c8d492017-12-04 13:48:24 -0700268 help
269 This enables support for logging of status and debug messages. These
270 can be displayed on the console, recorded in a memory buffer, or
271 discarded if not needed. Logging supports various categories and
272 levels of severity.
273
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200274if LOG
Simon Glasse9c8d492017-12-04 13:48:24 -0700275
276config LOG_MAX_LEVEL
277 int "Maximum log level to record"
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200278 default 6
279 range 0 9
Simon Glass4d8d3052018-11-15 18:43:49 -0700280 help
281 This selects the maximum log level that will be recorded. Any value
282 higher than this will be ignored. If possible log statements below
283 this level will be discarded at build time. Levels:
284
Simon Glass6fc7e932019-02-16 20:24:34 -0700285 0 - emergency
286 1 - alert
287 2 - critical
288 3 - error
289 4 - warning
290 5 - note
291 6 - info
Simon Glass4d8d3052018-11-15 18:43:49 -0700292 7 - debug
Simon Glass6fc7e932019-02-16 20:24:34 -0700293 8 - debug content
294 9 - debug hardware I/O
Simon Glass4d8d3052018-11-15 18:43:49 -0700295
Simon Glassf0b05c92019-02-16 20:24:35 -0700296config LOG_DEFAULT_LEVEL
297 int "Default logging level to display"
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200298 default LOG_MAX_LEVEL
299 range 0 LOG_MAX_LEVEL
Simon Glassf0b05c92019-02-16 20:24:35 -0700300 help
301 This is the default logging level set when U-Boot starts. It can
302 be adjusted later using the 'log level' command. Note that setting
Andy Shevchenko69264f42019-06-12 15:35:24 +0300303 this to a value above LOG_MAX_LEVEL will be ineffective, since the
Simon Glassf0b05c92019-02-16 20:24:35 -0700304 higher levels are not compiled in to U-Boot.
305
306 0 - emergency
307 1 - alert
308 2 - critical
309 3 - error
310 4 - warning
311 5 - note
312 6 - info
313 7 - debug
314 8 - debug content
315 9 - debug hardware I/O
316
Simon Glassc6d47532017-12-04 13:48:25 -0700317config LOG_CONSOLE
318 bool "Allow log output to the console"
Simon Glassc6d47532017-12-04 13:48:25 -0700319 default y
320 help
321 Enables a log driver which writes log records to the console.
322 Generally the console is the serial port or LCD display. Only the
323 log message is shown - other details like level, category, file and
324 line number are omitted.
325
Heinrich Schuchardt3c21d772020-06-17 21:52:44 +0200326config LOGF_FILE
327 bool "Show source file name in log messages by default"
328 help
329 Show the source file name in log messages by default. This value
330 can be overridden using the 'log format' command.
331
332config LOGF_LINE
333 bool "Show source line number in log messages by default"
334 help
335 Show the source line number in log messages by default. This value
336 can be overridden using the 'log format' command.
337
338config LOGF_FUNC
339 bool "Show function name in log messages by default"
340 help
341 Show the function name in log messages by default. This value can
342 be overridden using the 'log format' command.
343
Simon Glass72fa1ad2021-07-05 16:33:00 -0600344config LOGF_FUNC_PAD
345 int "Number of characters to use for function"
346 default 20
347 help
348 Sets the field width to use when showing the function. Set this to
349 a larger value if you have lots of long function names, and want
350 things to line up.
351
Heinrich Schuchardtbefadde2020-02-26 21:48:16 +0100352config LOG_SYSLOG
353 bool "Log output to syslog server"
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200354 depends on NET
Heinrich Schuchardtbefadde2020-02-26 21:48:16 +0100355 help
356 Enables a log driver which broadcasts log records via UDP port 514
357 to syslog servers.
358
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200359config SPL_LOG
360 bool "Enable logging support in SPL"
361 depends on LOG
Simon Glassef11ed82017-12-04 13:48:27 -0700362 help
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200363 This enables support for logging of status and debug messages. These
364 can be displayed on the console, recorded in a memory buffer, or
365 discarded if not needed. Logging supports various categories and
366 levels of severity.
367
368if SPL_LOG
369
370config SPL_LOG_MAX_LEVEL
371 int "Maximum log level to record in SPL"
372 depends on SPL_LOG
373 default 3
374 range 0 9
375 help
376 This selects the maximum log level that will be recorded. Any value
377 higher than this will be ignored. If possible log statements below
378 this level will be discarded at build time. Levels:
379
380 0 - emergency
381 1 - alert
382 2 - critical
383 3 - error
384 4 - warning
385 5 - note
386 6 - info
387 7 - debug
388 8 - debug content
389 9 - debug hardware I/O
390
391config SPL_LOG_CONSOLE
392 bool "Allow log output to the console in SPL"
393 default y
394 help
395 Enables a log driver which writes log records to the console.
396 Generally the console is the serial port or LCD display. Only the
397 log message is shown - other details like level, category, file and
398 line number are omitted.
399
400endif
401
402config TPL_LOG
403 bool "Enable logging support in TPL"
Tom Rini8bea4bf2022-06-08 08:24:39 -0400404 depends on LOG && TPL
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200405 help
406 This enables support for logging of status and debug messages. These
407 can be displayed on the console, recorded in a memory buffer, or
408 discarded if not needed. Logging supports various categories and
409 levels of severity.
410
411if TPL_LOG
412
413config TPL_LOG_MAX_LEVEL
414 int "Maximum log level to record in TPL"
415 depends on TPL_LOG
416 default 3
417 range 0 9
418 help
419 This selects the maximum log level that will be recorded. Any value
420 higher than this will be ignored. If possible log statements below
421 this level will be discarded at build time. Levels:
422
423 0 - emergency
424 1 - alert
425 2 - critical
426 3 - error
427 4 - warning
428 5 - note
429 6 - info
430 7 - debug
431 8 - debug content
432 9 - debug hardware I/O
433
434config TPL_LOG_CONSOLE
435 bool "Allow log output to the console in TPL"
436 default y
437 help
438 Enables a log driver which writes log records to the console.
439 Generally the console is the serial port or LCD display. Only the
440 log message is shown - other details like level, category, file and
441 line number are omitted.
442
443endif
Simon Glassef11ed82017-12-04 13:48:27 -0700444
Simon Glass747093d2022-04-30 00:56:53 -0600445config VPL_LOG
446 bool "Enable logging support in VPL"
Tom Rini13ce3512022-06-08 08:24:40 -0400447 depends on LOG && VPL
Simon Glass747093d2022-04-30 00:56:53 -0600448 help
449 This enables support for logging of status and debug messages. These
450 can be displayed on the console, recorded in a memory buffer, or
451 discarded if not needed. Logging supports various categories and
452 levels of severity.
453
454if VPL_LOG
455
456config VPL_LOG_MAX_LEVEL
457 int "Maximum log level to record in VPL"
458 default 3
459 help
460 This selects the maximum log level that will be recorded. Any value
461 higher than this will be ignored. If possible log statements below
462 this level will be discarded at build time. Levels:
463
464 0 - emergency
465 1 - alert
466 2 - critical
467 3 - error
468 4 - warning
469 5 - note
470 6 - info
471 7 - debug
472 8 - debug content
473 9 - debug hardware I/O
474
475config VPL_LOG_CONSOLE
476 bool "Allow log output to the console in VPL"
477 default y
478 help
479 Enables a log driver which writes log records to the console.
480 Generally the console is the serial port or LCD display. Only the
481 log message is shown - other details like level, category, file and
482 line number are omitted.
483
484endif
485
Simon Glass3707c6e2017-12-28 13:14:23 -0700486config LOG_ERROR_RETURN
487 bool "Log all functions which return an error"
Simon Glass3707c6e2017-12-28 13:14:23 -0700488 help
489 When an error is returned in U-Boot it is sometimes difficult to
Chris Packhamf7597732019-01-11 15:30:50 +1300490 figure out the root cause. For example, reading from SPI flash may
Simon Glass3707c6e2017-12-28 13:14:23 -0700491 fail due to a problem in the SPI controller or due to the flash part
492 not returning the expected information. This option changes
493 log_ret() to log any errors it sees. With this option disabled,
494 log_ret() is a nop.
495
496 You can add log_ret() to all functions which return an error code.
497
Heinrich Schuchardt7b6c34c2020-05-31 15:34:22 +0200498config LOG_TEST
499 bool "Provide a test for logging"
500 depends on UNIT_TEST
501 default y if SANDBOX
502 help
503 This enables a 'log test' command to test logging. It is normally
504 executed from a pytest and simply outputs logging information
505 in various different ways to test that the logging system works
506 correctly with various settings.
507
508endif
509
Simon Glasse9c8d492017-12-04 13:48:24 -0700510endmenu
511
Simon Glass7df39e52020-09-10 20:21:21 -0600512menu "Init options"
513
Simon Glassa4c4ecf2020-09-10 20:21:26 -0600514config BOARD_TYPES
515 bool "Call get_board_type() to get and display the board type"
516 help
517 If this option is enabled, checkboard() will call get_board_type()
518 to get a string containing the board type and this will be
519 displayed immediately after the model is shown on the console
520 early in boot.
521
Lokesh Vutla19a97472016-10-08 14:41:44 -0400522config DISPLAY_CPUINFO
523 bool "Display information about the CPU during start up"
Alexey Brodkinf31414a2018-10-02 11:43:28 +0300524 default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K
Lokesh Vutla19a97472016-10-08 14:41:44 -0400525 help
526 Display information about the CPU that U-Boot is running on
527 when U-Boot starts up. The function print_cpuinfo() is called
528 to do this.
529
Lokesh Vutla84351792016-10-11 21:33:46 -0400530config DISPLAY_BOARDINFO
Mario Six78eba692018-03-28 14:38:17 +0200531 bool "Display information about the board during early start up"
Alexey Brodkinf31414a2018-10-02 11:43:28 +0300532 default y if ARC || ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
Lokesh Vutla84351792016-10-11 21:33:46 -0400533 help
534 Display information about the board that U-Boot is running on
535 when U-Boot starts up. The board function checkboard() is called
536 to do this.
537
Mario Six78eba692018-03-28 14:38:17 +0200538config DISPLAY_BOARDINFO_LATE
539 bool "Display information about the board during late start up"
540 help
541 Display information about the board that U-Boot is running on after
542 the relocation phase. The board function checkboard() is called to do
543 this.
544
Simon Glassa4211922017-01-23 13:31:19 -0700545menu "Start-up hooks"
546
Simon Glass87a5d1b2022-03-04 08:43:00 -0700547config EVENT
548 bool "General-purpose event-handling mechanism"
549 default y if SANDBOX
550 help
551 This enables sending and processing of events, to allow interested
552 parties to be alerted when something happens. This is an attempt to
553 step the flow of weak functions, hooks, functions in board_f.c
554 and board_r.c and the Kconfig options below.
555
556 See doc/develop/event.rst for more information.
557
558if EVENT
559
560config EVENT_DYNAMIC
561 bool "Support event registration at runtime"
562 default y if SANDBOX
563 help
564 Enable this to support adding an event spy at runtime, without adding
565 it to the EVENT_SPy() linker list. This increases code size slightly
566 but provides more flexibility for boards and subsystems that need it.
567
568config EVENT_DEBUG
569 bool "Enable event debugging assistance"
570 default y if SANDBOX
571 help
572 Enable this get usefui features for seeing what is happening with
573 events, such as event-type names. This adds to the code size of
574 U-Boot so can be turned off for production builds.
575
576endif # EVENT
577
Simon Glassa4211922017-01-23 13:31:19 -0700578config ARCH_EARLY_INIT_R
579 bool "Call arch-specific init soon after relocation"
Simon Glassa4211922017-01-23 13:31:19 -0700580 help
581 With this option U-Boot will call arch_early_init_r() soon after
582 relocation. Driver model is running by this point, and the cache
583 is on. Note that board_early_init_r() is called first, if
584 enabled. This can be used to set up architecture-specific devices.
585
Simon Glass45856012017-01-23 13:31:21 -0700586config ARCH_MISC_INIT
587 bool "Call arch-specific init after relocation, when console is ready"
588 help
589 With this option U-Boot will call arch_misc_init() after
590 relocation to allow miscellaneous arch-dependent initialisation
591 to be performed. This function should be defined by the board
Chris Packhamf7597732019-01-11 15:30:50 +1300592 and will be called after the console is set up, after relocation.
Simon Glass45856012017-01-23 13:31:21 -0700593
Simon Glassa5d67542017-01-23 13:31:20 -0700594config BOARD_EARLY_INIT_F
595 bool "Call board-specific init before relocation"
Simon Glassa5d67542017-01-23 13:31:20 -0700596 help
597 Some boards need to perform initialisation as soon as possible
598 after boot. With this option, U-Boot calls board_early_init_f()
599 after driver model is ready in the pre-relocation init sequence.
600 Note that the normal serial console is not yet set up, but the
601 debug UART will be available if enabled.
602
Mario Six02ddc142018-03-28 14:38:15 +0200603config BOARD_EARLY_INIT_R
604 bool "Call board-specific init after relocation"
605 help
606 Some boards need to perform initialisation as directly after
607 relocation. With this option, U-Boot calls board_early_init_r()
608 in the post-relocation init sequence.
609
Tom Rini6d21dd32022-02-25 11:19:47 -0500610config BOARD_POSTCLK_INIT
611 bool "Call board_postclk_init"
612 help
613 Some boards need this to initialize select items, after clocks /
614 timebase and before env / serial.
615
Simon Glass7e349e92020-09-10 20:21:23 -0600616config BOARD_LATE_INIT
617 bool "Execute Board late init"
618 help
619 Sometimes board require some initialization code that might
620 require once the actual init done, example saving board specific env,
621 boot-modes etc. which eventually done at late.
622
623 So this config enable the late init code with the help of board_late_init
624 function which should defined on respective boards.
625
Tom Rini15b4aed2022-03-23 17:20:08 -0400626config CLOCKS
627 bool "Call set_cpu_clk_info"
628 depends on ARM
629
Tom Riniada261f2021-12-12 22:12:34 -0500630config SYS_FSL_CLK
631 bool
632 depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || \
633 (FSL_ESDHC_IMX && (ARCH_MX5 || ARCH_MX6 || ARCH_MX7))
634 default y
635 help
636 Enable to call get_clocks() in board_init_f() for platforms other
637 than PowerPC or M68k. This is a legacy option. If not TARGET_BRPPT2
638
Mario Six2aeb22d2018-03-28 14:38:16 +0200639config LAST_STAGE_INIT
640 bool "Call board-specific as last setup step"
641 help
642 Some boards need to perform initialisation immediately before control
643 is passed to the command-line interpreter (e.g. for initializations
644 that depend on later phases in the init sequence). With this option,
645 U-Boot calls last_stage_init() before the command-line interpreter is
646 started.
647
Simon Glass7e349e92020-09-10 20:21:23 -0600648config MISC_INIT_R
649 bool "Execute Misc Init"
650 default y if ARCH_KEYSTONE || ARCH_SUNXI || MPC85xx
651 default y if ARCH_OMAP2PLUS && !AM33XX
652 help
653 Enabling this option calls 'misc_init_r' function
654
Tom Rini167f6992022-05-12 16:45:08 -0400655config SYS_MALLOC_BOOTPARAMS
656 bool "Malloc a buffer to use for bootparams"
657 help
658 In some cases rather than using a known location to store the
659 bi_boot_params portion of gd we need to allocate it from our malloc pool.
660
661config SYS_BOOTPARAMS_LEN
662 hex "Size of the bootparam buffer to malloc in bytes"
663 depends on SYS_MALLOC_BOOTPARAMS
664 default 0x20000 if MIPS || RCAR_GEN3
665 default 0x10000
666
Tom Rinid7d40f62021-08-17 17:59:41 -0400667config ID_EEPROM
668 bool "Enable I2C connected system identifier EEPROM"
669 help
670 A number of different systems and vendors enable a vendor-specified
671 EEPROM that contains various identifying features.
672
Ovidiu Panait98bf46f2020-05-06 20:38:44 +0300673config PCI_INIT_R
674 bool "Enumerate PCI buses during init"
675 depends on PCI
Ovidiu Panait98bf46f2020-05-06 20:38:44 +0300676 help
677 With this option U-Boot will call pci_init() soon after relocation,
678 which will enumerate PCI buses. This is needed, for instance, in the
679 case of DM PCI-based Ethernet devices, which will not be detected
680 without having the enumeration performed earlier.
681
Tom Rini29cc2b52022-03-18 08:38:20 -0400682config RESET_PHY_R
683 bool "Reset ethernet PHY during init"
684 help
685 Implement reset_phy() in board code if required to reset the ethernet
686 PHY.
687
Simon Glassa4211922017-01-23 13:31:19 -0700688endmenu
689
Simon Glass38663132020-09-10 20:21:22 -0600690endmenu # Init options
691
Simon Glassd70f9192017-05-17 09:05:34 -0600692menu "Security support"
693
694config HASH
695 bool # "Support hashing API (SHA1, SHA256, etc.)"
696 help
697 This provides a way to hash data in memory using various supported
698 algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
699 and the algorithms it supports are defined in common/hash.c. See
700 also CMD_HASH for command-line access.
701
Igor Opaniukb0aa74a2018-07-17 14:33:25 +0300702config AVB_VERIFY
703 bool "Build Android Verified Boot operations"
Usama Arife61b4152020-08-11 15:46:03 +0100704 depends on LIBAVB
Heinrich Schuchardt9c3808d2021-01-25 12:17:57 +0100705 depends on MMC
Eugeniu Rosca87c814d2018-08-14 02:43:05 +0200706 depends on PARTITION_UUIDS
Igor Opaniukb0aa74a2018-07-17 14:33:25 +0300707 help
708 This option enables compilation of bootloader-dependent operations,
709 used by Android Verified Boot 2.0 library (libavb). Includes:
710 * Helpers to process strings in order to build OS bootargs.
711 * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
712 * Helpers to alloc/init/free avb ops.
713
Usama Arife61b4152020-08-11 15:46:03 +0100714if AVB_VERIFY
715
716config AVB_BUF_ADDR
717 hex "Define AVB buffer address"
718 default FASTBOOT_BUF_ADDR
719 help
720 AVB requires a buffer for memory transactions. This variable defines the
721 buffer address.
722
723config AVB_BUF_SIZE
724 hex "Define AVB buffer SIZE"
725 default FASTBOOT_BUF_SIZE
726 help
727 AVB requires a buffer for memory transactions. This variable defines the
728 buffer size.
729
730endif # AVB_VERIFY
731
Jorge Ramirez-Ortiz166363f2021-02-14 16:27:23 +0100732config SCP03
733 bool "Build SCP03 - Secure Channel Protocol O3 - controls"
734 depends on OPTEE || SANDBOX
735 depends on TEE
736 help
737 This option allows U-Boot to enable and or provision SCP03 on an OPTEE
738 controlled Secured Element.
739
Simon Glassc0126bd2018-11-06 15:21:28 -0700740config SPL_HASH
741 bool # "Support hashing API (SHA1, SHA256, etc.)"
742 help
743 This provides a way to hash data in memory using various supported
744 algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
745 and the algorithms it supports are defined in common/hash.c. See
746 also CMD_HASH for command-line access.
747
748config TPL_HASH
749 bool # "Support hashing API (SHA1, SHA256, etc.)"
750 help
751 This provides a way to hash data in memory using various supported
752 algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
753 and the algorithms it supports are defined in common/hash.c. See
754 also CMD_HASH for command-line access.
755
Joel Peshkin4e9bce12021-04-11 11:21:58 +0200756config STACKPROTECTOR
757 bool "Stack Protector buffer overflow detection"
Joel Peshkin4e9bce12021-04-11 11:21:58 +0200758 help
759 Enable stack smash detection through compiler's stack-protector
760 canary logic
761
762config SPL_STACKPROTECTOR
763 bool "Stack Protector buffer overflow detection for SPL"
764 depends on STACKPROTECTOR && SPL
Joel Peshkin4e9bce12021-04-11 11:21:58 +0200765
766config TPL_STACKPROTECTOR
767 bool "Stack Protector buffer overflow detection for TPL"
768 depends on STACKPROTECTOR && TPL
Joel Peshkin4e9bce12021-04-11 11:21:58 +0200769
Simon Glassd70f9192017-05-17 09:05:34 -0600770endmenu
771
Marek Vasutb254c522018-02-10 16:22:06 +0100772menu "Update support"
773
AKASHI Takahiro3149e522020-10-29 13:47:43 +0900774config UPDATE_COMMON
775 bool
AKASHI Takahiro3149e522020-10-29 13:47:43 +0900776 select DFU_WRITE_ALT
777
Marek Vasutb254c522018-02-10 16:22:06 +0100778config UPDATE_TFTP
779 bool "Auto-update using fitImage via TFTP"
780 depends on FIT
AKASHI Takahiro3149e522020-10-29 13:47:43 +0900781 select UPDATE_COMMON
Marek Vasutb254c522018-02-10 16:22:06 +0100782 help
783 This option allows performing update of NOR with data in fitImage
784 sent via TFTP boot.
785
786config UPDATE_TFTP_CNT_MAX
787 int "The number of connection retries during auto-update"
788 default 0
789 depends on UPDATE_TFTP
790
791config UPDATE_TFTP_MSEC_MAX
792 int "Delay in mSec to wait for the TFTP server during auto-update"
793 default 100
794 depends on UPDATE_TFTP
795
AKASHI Takahiro3149e522020-10-29 13:47:43 +0900796config UPDATE_FIT
797 bool "Firmware update using fitImage"
798 depends on FIT
799 depends on DFU
800 select UPDATE_COMMON
801 help
802 This option allows performing update of DFU-capable storage with
803 data in fitImage.
804
Ruslan Trofymenkod65e8da2019-07-05 15:37:32 +0300805config ANDROID_AB
806 bool "Android A/B updates"
Ruslan Trofymenkod65e8da2019-07-05 15:37:32 +0300807 help
808 If enabled, adds support for the new Android A/B update model. This
809 allows the bootloader to select which slot to boot from based on the
810 information provided by userspace via the Android boot_ctrl HAL. This
811 allows a bootloader to try a new version of the system but roll back
812 to previous version if the new one didn't boot all the way.
813
Marek Vasutb254c522018-02-10 16:22:06 +0100814endmenu
815
Simon Glass9f407d42018-11-15 18:43:50 -0700816menu "Blob list"
817
818config BLOBLIST
819 bool "Support for a bloblist"
820 help
821 This enables support for a bloblist in U-Boot, which can be passed
822 from TPL to SPL to U-Boot proper (and potentially to Linux). The
823 blob list supports multiple binary blobs of data, each with a tag,
824 so that different U-Boot components can store data which can survive
Simon Glass5938d652022-01-12 19:26:21 -0700825 through to the next phase of the boot.
Simon Glass9f407d42018-11-15 18:43:50 -0700826
827config SPL_BLOBLIST
828 bool "Support for a bloblist in SPL"
Simon Glass3c0d5ea2022-04-30 00:56:48 -0600829 depends on BLOBLIST && SPL_LIBGENERIC_SUPPORT && SPL_LIBCOMMON_SUPPORT
Simon Glass9f407d42018-11-15 18:43:50 -0700830 default y if SPL
831 help
832 This enables a bloblist in SPL. If this is the first part of U-Boot
833 to run, then the bloblist is set up in SPL and passed to U-Boot
834 proper. If TPL also has a bloblist, then SPL uses the one from there.
835
836config TPL_BLOBLIST
837 bool "Support for a bloblist in TPL"
Simon Glass3c0d5ea2022-04-30 00:56:48 -0600838 depends on BLOBLIST && TPL_LIBGENERIC_SUPPORT && TPL_LIBCOMMON_SUPPORT
Simon Glass9f407d42018-11-15 18:43:50 -0700839 default y if TPL
840 help
841 This enables a bloblist in TPL. The bloblist is set up in TPL and
842 passed to SPL and U-Boot proper.
843
Simon Glass747093d2022-04-30 00:56:53 -0600844config VPL_BLOBLIST
845 bool "Support for a bloblist in VPL"
846 depends on BLOBLIST && VPL_LIBGENERIC_SUPPORT && VPL_LIBCOMMON_SUPPORT
847 default y if VPL
848 help
849 This enables a bloblist in VPL. The bloblist is set up in VPL and
850 passed to SPL and U-Boot proper.
851
Simon Glassd5b6e912021-11-03 21:09:20 -0600852if BLOBLIST
853
Simon Glass99047f52022-01-12 19:26:22 -0700854choice
855 prompt "Bloblist location"
Simon Glass9f407d42018-11-15 18:43:50 -0700856 help
Simon Glass99047f52022-01-12 19:26:22 -0700857 Select the location of the bloblist, via various means.
858
859config BLOBLIST_FIXED
860 bool "Place bloblist at a fixed address in memory"
861 help
862 Select this to used a fixed memory address for the bloblist. If the
863 bloblist exists at this address from a previous phase, it used as is.
864 If not it is created at this address in U-Boot.
Simon Glass9f407d42018-11-15 18:43:50 -0700865
Simon Glassd5b6e912021-11-03 21:09:20 -0600866config BLOBLIST_ALLOC
867 bool "Allocate bloblist"
868 help
869 Allocate the bloblist using malloc(). This avoids the need to
870 specify a fixed address on systems where this is unknown or can
871 change at runtime.
872
Simon Glass99047f52022-01-12 19:26:22 -0700873endchoice
874
Simon Glass9f407d42018-11-15 18:43:50 -0700875config BLOBLIST_ADDR
876 hex "Address of bloblist"
Simon Glassecc1ed92021-07-05 16:32:48 -0600877 default 0xc000 if SANDBOX
Simon Glass99047f52022-01-12 19:26:22 -0700878 depends on BLOBLIST_FIXED
Simon Glass9f407d42018-11-15 18:43:50 -0700879 help
880 Sets the address of the bloblist, set up by the first part of U-Boot
Simon Glass5938d652022-01-12 19:26:21 -0700881 which runs. Subsequent U-Boot phases typically use the same address.
Simon Glass9f407d42018-11-15 18:43:50 -0700882
Simon Glassd5b6e912021-11-03 21:09:20 -0600883 This is not used if BLOBLIST_ALLOC is selected.
884
Simon Glass99047f52022-01-12 19:26:22 -0700885config BLOBLIST_SIZE
886 hex "Size of bloblist"
887 default 0x400
888 help
889 Sets the size of the bloblist in bytes. This must include all
890 overhead (alignment, bloblist header, record header). The bloblist
891 is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
892 proper), and this sane bloblist is used for subsequent phases.
893
Simon Glass9fe06462021-01-13 20:29:43 -0700894config BLOBLIST_SIZE_RELOC
895 hex "Size of bloblist after relocation"
Simon Glass99047f52022-01-12 19:26:22 -0700896 default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
897 default 0 if BLOBLIST_PASSAGE
Simon Glass9fe06462021-01-13 20:29:43 -0700898 help
899 Sets the size of the bloblist in bytes after relocation. Since U-Boot
900 has a lot more memory available then, it is possible to use a larger
901 size than the one set up by SPL. This bloblist is set up during the
902 relocation process.
903
Simon Glassd5b6e912021-11-03 21:09:20 -0600904endif # BLOBLIST
905
Simon Glass99047f52022-01-12 19:26:22 -0700906if SPL_BLOBLIST
907
908choice
909 prompt "Bloblist location in SPL"
910 help
911 Select the location of the bloblist, via various means. Typically
912 you should use the same value for SPL as for U-Boot, since they need
913 to look in the same place. But if BLOBLIST_ALLOC is used, then a
914 fresh bloblist will be created each time, since there is no shared
915 address (between phases) for the bloblist.
916
917config SPL_BLOBLIST_FIXED
918 bool "Place bloblist at a fixed address in memory"
919 help
920 Select this to used a fixed memory address for the bloblist. If the
921 bloblist exists at this address from a previous phase, it used as is.
922 If not it is created at this address in SPL.
923
924config SPL_BLOBLIST_ALLOC
925 bool "Allocate bloblist"
926 help
927 Allocate the bloblist using malloc(). This avoids the need to
928 specify a fixed address on systems where this is unknown or can
929 change at runtime.
930
931endchoice
932
933endif # SPL_BLOBLIST
934
935if TPL_BLOBLIST
936
937choice
938 prompt "Bloblist location in TPL"
939 help
940 Select the location of the bloblist, via various means. Typically
941 you should use the same value for SPL as for U-Boot, since they need
942 to look in the same place. But if BLOBLIST_ALLOC is used, then a
943 fresh bloblist will be created each time, since there is no shared
944 address (between phases) for the bloblist.
945
946config TPL_BLOBLIST_FIXED
947 bool "Place bloblist at a fixed address in memory"
948 help
949 Select this to used a fixed memory address for the bloblist. If the
950 bloblist exists at this address from a previous phase, it used as is.
951 If not it is created at this address in TPL.
952
953config TPL_BLOBLIST_ALLOC
954 bool "Allocate bloblist"
955 help
956 Allocate the bloblist using malloc(). This avoids the need to
957 specify a fixed address on systems where this is unknown or can
958 change at runtime.
959
960endchoice
961
962endif # TPL_BLOBLIST
963
Simon Glass9f407d42018-11-15 18:43:50 -0700964endmenu
965
Simon Glassc2ae7d82016-09-12 23:18:22 -0600966source "common/spl/Kconfig"
AKASHI Takahirob983cc22020-02-21 15:12:55 +0900967
968config IMAGE_SIGN_INFO
969 bool
970 select SHA1
971 select SHA256
972 help
973 Enable image_sign_info helper functions.
Heinrich Schuchardt64411642020-04-15 18:46:21 +0200974
975if IMAGE_SIGN_INFO
976
977config SPL_IMAGE_SIGN_INFO
978 bool
979 select SHA1
980 select SHA256
981 help
982 Enable image_sign_info helper functions in SPL.
983
984endif
Patrick Delaunayd71587c2021-11-15 16:32:17 +0100985
986config FDT_SIMPLEFB
987 bool "FDT tools for simplefb support"
988 depends on OF_LIBFDT
989 help
990 Enable the fdt tools to manage the simple fb nodes in device tree.
991 These functions can be used by board to indicate to the OS
992 the presence of the simple frame buffer with associated reserved
993 memory