Kconfig: Move boot menu into common/
[platform/kernel/u-boot.git] / common / Kconfig
1 source "common/Kconfig.boot"
2
3 menu "Boot timing"
4
5 config BOOTSTAGE
6         bool "Boot timing and reporting"
7         help
8           Enable recording of boot time while booting. To use it, insert
9           calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
10           bootstage.h. Only a single entry is recorded for each ID. You can
11           give the entry a name with bootstage_mark_name(). You can also
12           record elapsed time in a particular stage using bootstage_start()
13           before starting and bootstage_accum() when finished. Bootstage will
14           add up all the accumulated time and report it.
15
16           Normally, IDs are defined in bootstage.h but a small number of
17           additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
18           as the ID.
19
20           Calls to show_boot_progress() will also result in log entries but
21           these will not have names.
22
23 config SPL_BOOTSTAGE
24         bool "Boot timing and reported in SPL"
25         depends on BOOTSTAGE
26         help
27           Enable recording of boot time in SPL. To make this visible to U-Boot
28           proper, enable BOOTSTAGE_STASH as well. This will stash the timing
29           information when SPL finishes and load it when U-Boot proper starts
30           up.
31
32 config TPL_BOOTSTAGE
33         bool "Boot timing and reported in TPL"
34         depends on BOOTSTAGE
35         help
36           Enable recording of boot time in SPL. To make this visible to U-Boot
37           proper, enable BOOTSTAGE_STASH as well. This will stash the timing
38           information when TPL finishes and load it when U-Boot proper starts
39           up.
40
41 config BOOTSTAGE_REPORT
42         bool "Display a detailed boot timing report before booting the OS"
43         depends on BOOTSTAGE
44         help
45           Enable output of a boot time report just before the OS is booted.
46           This shows how long it took U-Boot to go through each stage of the
47           boot process. The report looks something like this:
48
49                 Timer summary in microseconds:
50                        Mark    Elapsed  Stage
51                           0          0  reset
52                   3,575,678  3,575,678  board_init_f start
53                   3,575,695         17  arch_cpu_init A9
54                   3,575,777         82  arch_cpu_init done
55                   3,659,598     83,821  board_init_r start
56                   3,910,375    250,777  main_loop
57                  29,916,167 26,005,792  bootm_start
58                  30,361,327    445,160  start_kernel
59
60 config BOOTSTAGE_RECORD_COUNT
61         int "Number of boot stage records to store"
62         default 30
63         help
64           This is the size of the bootstage record list and is the maximum
65           number of bootstage records that can be recorded.
66
67 config SPL_BOOTSTAGE_RECORD_COUNT
68         int "Number of boot stage records to store for SPL"
69         default 5
70         help
71           This is the size of the bootstage record list and is the maximum
72           number of bootstage records that can be recorded.
73
74 config TPL_BOOTSTAGE_RECORD_COUNT
75         int "Number of boot stage records to store for TPL"
76         default 5
77         help
78           This is the size of the bootstage record list and is the maximum
79           number of bootstage records that can be recorded.
80
81 config BOOTSTAGE_FDT
82         bool "Store boot timing information in the OS device tree"
83         depends on BOOTSTAGE
84         help
85           Stash the bootstage information in the FDT. A root 'bootstage'
86           node is created with each bootstage id as a child. Each child
87           has a 'name' property and either 'mark' containing the
88           mark time in microseconds, or 'accum' containing the
89           accumulated time for that bootstage id in microseconds.
90           For example:
91
92                 bootstage {
93                         154 {
94                                 name = "board_init_f";
95                                 mark = <3575678>;
96                         };
97                         170 {
98                                 name = "lcd";
99                                 accum = <33482>;
100                         };
101                 };
102
103           Code in the Linux kernel can find this in /proc/devicetree.
104
105 config BOOTSTAGE_STASH
106         bool "Stash the boot timing information in memory before booting OS"
107         depends on BOOTSTAGE
108         help
109           Some OSes do not support device tree. Bootstage can instead write
110           the boot timing information in a binary format at a given address.
111           This happens through a call to bootstage_stash(), typically in
112           the CPU's cleanup_before_linux() function. You can use the
113           'bootstage stash' and 'bootstage unstash' commands to do this on
114           the command line.
115
116 config BOOTSTAGE_STASH_ADDR
117         hex "Address to stash boot timing information"
118         default 0
119         help
120           Provide an address which will not be overwritten by the OS when it
121           starts, so that it can read this information when ready.
122
123 config BOOTSTAGE_STASH_SIZE
124         hex "Size of boot timing stash region"
125         default 0x1000
126         help
127           This should be large enough to hold the bootstage stash. A value of
128           4096 (4KiB) is normally plenty.
129
130 config SHOW_BOOT_PROGRESS
131         bool "Show boot progress in a board-specific manner"
132         help
133           Defining this option allows to add some board-specific code (calling
134           a user-provided function show_boot_progress(int) that enables you to
135           show the system's boot progress on some display (for example, some
136           LEDs) on your board. At the moment, the following checkpoints are
137           implemented:
138
139           Legacy uImage format:
140
141           Arg   Where                   When
142             1   common/cmd_bootm.c      before attempting to boot an image
143            -1   common/cmd_bootm.c      Image header has bad     magic number
144             2   common/cmd_bootm.c      Image header has correct magic number
145            -2   common/cmd_bootm.c      Image header has bad     checksum
146             3   common/cmd_bootm.c      Image header has correct checksum
147            -3   common/cmd_bootm.c      Image data   has bad     checksum
148             4   common/cmd_bootm.c      Image data   has correct checksum
149            -4   common/cmd_bootm.c      Image is for unsupported architecture
150             5   common/cmd_bootm.c      Architecture check OK
151            -5   common/cmd_bootm.c      Wrong Image Type (not kernel, multi)
152             6   common/cmd_bootm.c      Image Type check OK
153            -6   common/cmd_bootm.c      gunzip uncompression error
154            -7   common/cmd_bootm.c      Unimplemented compression type
155             7   common/cmd_bootm.c      Uncompression OK
156             8   common/cmd_bootm.c      No uncompress/copy overwrite error
157            -9   common/cmd_bootm.c      Unsupported OS (not Linux, BSD, VxWorks, QNX)
158
159             9   common/image.c          Start initial ramdisk verification
160           -10   common/image.c          Ramdisk header has bad     magic number
161           -11   common/image.c          Ramdisk header has bad     checksum
162            10   common/image.c          Ramdisk header is OK
163           -12   common/image.c          Ramdisk data   has bad     checksum
164            11   common/image.c          Ramdisk data   has correct checksum
165            12   common/image.c          Ramdisk verification complete, start loading
166           -13   common/image.c          Wrong Image Type (not PPC Linux ramdisk)
167            13   common/image.c          Start multifile image verification
168            14   common/image.c          No initial ramdisk, no multifile, continue.
169
170            15   arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
171
172           -30   arch/powerpc/lib/board.c        Fatal error, hang the system
173           -31   post/post.c             POST test failed, detected by post_output_backlog()
174           -32   post/post.c             POST test failed, detected by post_run_single()
175
176            34   common/cmd_doc.c        before loading a Image from a DOC device
177           -35   common/cmd_doc.c        Bad usage of "doc" command
178            35   common/cmd_doc.c        correct usage of "doc" command
179           -36   common/cmd_doc.c        No boot device
180            36   common/cmd_doc.c        correct boot device
181           -37   common/cmd_doc.c        Unknown Chip ID on boot device
182            37   common/cmd_doc.c        correct chip ID found, device available
183           -38   common/cmd_doc.c        Read Error on boot device
184            38   common/cmd_doc.c        reading Image header from DOC device OK
185           -39   common/cmd_doc.c        Image header has bad magic number
186            39   common/cmd_doc.c        Image header has correct magic number
187           -40   common/cmd_doc.c        Error reading Image from DOC device
188            40   common/cmd_doc.c        Image header has correct magic number
189            41   common/cmd_ide.c        before loading a Image from a IDE device
190           -42   common/cmd_ide.c        Bad usage of "ide" command
191            42   common/cmd_ide.c        correct usage of "ide" command
192           -43   common/cmd_ide.c        No boot device
193            43   common/cmd_ide.c        boot device found
194           -44   common/cmd_ide.c        Device not available
195            44   common/cmd_ide.c        Device available
196           -45   common/cmd_ide.c        wrong partition selected
197            45   common/cmd_ide.c        partition selected
198           -46   common/cmd_ide.c        Unknown partition table
199            46   common/cmd_ide.c        valid partition table found
200           -47   common/cmd_ide.c        Invalid partition type
201            47   common/cmd_ide.c        correct partition type
202           -48   common/cmd_ide.c        Error reading Image Header on boot device
203            48   common/cmd_ide.c        reading Image Header from IDE device OK
204           -49   common/cmd_ide.c        Image header has bad magic number
205            49   common/cmd_ide.c        Image header has correct magic number
206           -50   common/cmd_ide.c        Image header has bad     checksum
207            50   common/cmd_ide.c        Image header has correct checksum
208           -51   common/cmd_ide.c        Error reading Image from IDE device
209            51   common/cmd_ide.c        reading Image from IDE device OK
210            52   common/cmd_nand.c       before loading a Image from a NAND device
211           -53   common/cmd_nand.c       Bad usage of "nand" command
212            53   common/cmd_nand.c       correct usage of "nand" command
213           -54   common/cmd_nand.c       No boot device
214            54   common/cmd_nand.c       boot device found
215           -55   common/cmd_nand.c       Unknown Chip ID on boot device
216            55   common/cmd_nand.c       correct chip ID found, device available
217           -56   common/cmd_nand.c       Error reading Image Header on boot device
218            56   common/cmd_nand.c       reading Image Header from NAND device OK
219           -57   common/cmd_nand.c       Image header has bad magic number
220            57   common/cmd_nand.c       Image header has correct magic number
221           -58   common/cmd_nand.c       Error reading Image from NAND device
222            58   common/cmd_nand.c       reading Image from NAND device OK
223
224           -60   common/env_common.c     Environment has a bad CRC, using default
225
226            64   net/eth.c               starting with Ethernet configuration.
227           -64   net/eth.c               no Ethernet found.
228            65   net/eth.c               Ethernet found.
229
230           -80   common/cmd_net.c        usage wrong
231            80   common/cmd_net.c        before calling net_loop()
232           -81   common/cmd_net.c        some error in net_loop() occurred
233            81   common/cmd_net.c        net_loop() back without error
234           -82   common/cmd_net.c        size == 0 (File with size 0 loaded)
235            82   common/cmd_net.c        trying automatic boot
236            83   common/cmd_net.c        running "source" command
237           -83   common/cmd_net.c        some error in automatic boot or "source" command
238            84   common/cmd_net.c        end without errors
239
240           FIT uImage format:
241
242           Arg   Where                   When
243           100   common/cmd_bootm.c      Kernel FIT Image has correct format
244           -100  common/cmd_bootm.c      Kernel FIT Image has incorrect format
245           101   common/cmd_bootm.c      No Kernel subimage unit name, using configuration
246           -101  common/cmd_bootm.c      Can't get configuration for kernel subimage
247           102   common/cmd_bootm.c      Kernel unit name specified
248           -103  common/cmd_bootm.c      Can't get kernel subimage node offset
249           103   common/cmd_bootm.c      Found configuration node
250           104   common/cmd_bootm.c      Got kernel subimage node offset
251           -104  common/cmd_bootm.c      Kernel subimage hash verification failed
252           105   common/cmd_bootm.c      Kernel subimage hash verification OK
253           -105  common/cmd_bootm.c      Kernel subimage is for unsupported architecture
254           106   common/cmd_bootm.c      Architecture check OK
255           -106  common/cmd_bootm.c      Kernel subimage has wrong type
256           107   common/cmd_bootm.c      Kernel subimage type OK
257           -107  common/cmd_bootm.c      Can't get kernel subimage data/size
258           108   common/cmd_bootm.c      Got kernel subimage data/size
259           -108  common/cmd_bootm.c      Wrong image type (not legacy, FIT)
260           -109  common/cmd_bootm.c      Can't get kernel subimage type
261           -110  common/cmd_bootm.c      Can't get kernel subimage comp
262           -111  common/cmd_bootm.c      Can't get kernel subimage os
263           -112  common/cmd_bootm.c      Can't get kernel subimage load address
264           -113  common/cmd_bootm.c      Image uncompress/copy overwrite error
265
266           120   common/image.c          Start initial ramdisk verification
267           -120  common/image.c          Ramdisk FIT image has incorrect format
268           121   common/image.c          Ramdisk FIT image has correct format
269           122   common/image.c          No ramdisk subimage unit name, using configuration
270           -122  common/image.c          Can't get configuration for ramdisk subimage
271           123   common/image.c          Ramdisk unit name specified
272           -124  common/image.c          Can't get ramdisk subimage node offset
273           125   common/image.c          Got ramdisk subimage node offset
274           -125  common/image.c          Ramdisk subimage hash verification failed
275           126   common/image.c          Ramdisk subimage hash verification OK
276           -126  common/image.c          Ramdisk subimage for unsupported architecture
277           127   common/image.c          Architecture check OK
278           -127  common/image.c          Can't get ramdisk subimage data/size
279           128   common/image.c          Got ramdisk subimage data/size
280           129   common/image.c          Can't get ramdisk load address
281           -129  common/image.c          Got ramdisk load address
282
283           -130  common/cmd_doc.c        Incorrect FIT image format
284           131   common/cmd_doc.c        FIT image format OK
285
286           -140  common/cmd_ide.c        Incorrect FIT image format
287           141   common/cmd_ide.c        FIT image format OK
288
289           -150  common/cmd_nand.c       Incorrect FIT image format
290           151   common/cmd_nand.c       FIT image format OK
291
292 endmenu
293
294 menu "Boot media"
295
296 config NOR_BOOT
297         bool "Support for booting from NOR flash"
298         depends on NOR
299         help
300           Enabling this will make a U-Boot binary that is capable of being
301           booted via NOR.  In this case we will enable certain pinmux early
302           as the ROM only partially sets up pinmux.  We also default to using
303           NOR for environment.
304
305 config NAND_BOOT
306         bool "Support for booting from NAND flash"
307         default n
308         imply MTD_RAW_NAND
309         help
310           Enabling this will make a U-Boot binary that is capable of being
311           booted via NAND flash. This is not a must, some SoCs need this,
312           some not.
313
314 config ONENAND_BOOT
315         bool "Support for booting from ONENAND"
316         default n
317         imply MTD_RAW_NAND
318         help
319           Enabling this will make a U-Boot binary that is capable of being
320           booted via ONENAND. This is not a must, some SoCs need this,
321           some not.
322
323 config QSPI_BOOT
324         bool "Support for booting from QSPI flash"
325         default n
326         help
327           Enabling this will make a U-Boot binary that is capable of being
328           booted via QSPI flash. This is not a must, some SoCs need this,
329           some not.
330
331 config SATA_BOOT
332         bool "Support for booting from SATA"
333         default n
334         help
335           Enabling this will make a U-Boot binary that is capable of being
336           booted via SATA. This is not a must, some SoCs need this,
337           some not.
338
339 config SD_BOOT
340         bool "Support for booting from SD/EMMC"
341         default n
342         help
343           Enabling this will make a U-Boot binary that is capable of being
344           booted via SD/EMMC. This is not a must, some SoCs need this,
345           some not.
346
347 config SPI_BOOT
348         bool "Support for booting from SPI flash"
349         default n
350         help
351           Enabling this will make a U-Boot binary that is capable of being
352           booted via SPI flash. This is not a must, some SoCs need this,
353           some not.
354
355 endmenu
356
357 config BOOTDELAY
358         int "delay in seconds before automatically booting"
359         default 2
360         depends on AUTOBOOT
361         help
362           Delay before automatically running bootcmd;
363           set to 0 to autoboot with no delay, but you can stop it by key input.
364           set to -1 to disable autoboot.
365           set to -2 to autoboot with no delay and not check for abort
366
367           If this value is >= 0 then it is also used for the default delay
368           before starting the default entry in bootmenu. If it is < 0 then
369           a default value of 10s is used.
370
371           See doc/README.autoboot for details.
372
373 config USE_BOOTARGS
374         bool "Enable boot arguments"
375         help
376           Provide boot arguments to bootm command. Boot arguments are specified
377           in CONFIG_BOOTARGS option. Enable this option to be able to specify
378           CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
379           will be undefined and won't take any space in U-Boot image.
380
381 config BOOTARGS
382         string "Boot arguments"
383         depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE
384         help
385           This can be used to pass arguments to the bootm command. The value of
386           CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
387           this value will also override the "chosen" node in FDT blob.
388
389 config USE_BOOTCOMMAND
390         bool "Enable a default value for bootcmd"
391         help
392           Provide a default value for the bootcmd entry in the environment.  If
393           autoboot is enabled this is what will be run automatically.  Enable
394           this option to be able to specify CONFIG_BOOTCOMMAND as a string.  If
395           this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
396           won't take any space in U-Boot image.
397
398 config BOOTCOMMAND
399         string "bootcmd value"
400         depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
401         default "run distro_bootcmd" if DISTRO_DEFAULTS
402         help
403           This is the string of commands that will be used as bootcmd and if
404           AUTOBOOT is set, automatically run.
405
406 config USE_PREBOOT
407         bool "Enable preboot"
408         help
409           When this option is enabled, the existence of the environment
410           variable "preboot" will be checked immediately before starting the
411           CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
412           entering interactive mode.
413
414           This feature is especially useful when "preboot" is automatically
415           generated or modified. For example, the boot code can modify the
416           "preboot" when a user holds down a certain combination of keys.
417
418 config PREBOOT
419         string "preboot default value"
420         depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE
421         default "usb start" if USB_KEYBOARD || USB_STORAGE
422         default ""
423         help
424           This is the default of "preboot" environment variable.
425
426 menu "Console"
427
428 config MENU
429         bool
430         help
431           This is the library functionality to provide a text-based menu of
432           choices for the user to make choices with.
433
434 config CONSOLE_RECORD
435         bool "Console recording"
436         help
437           This provides a way to record console output (and provide console
438           input) through circular buffers. This is mostly useful for testing.
439           Console output is recorded even when the console is silent.
440           To enable console recording, call console_record_reset_enable()
441           from your code.
442
443 config CONSOLE_RECORD_OUT_SIZE
444         hex "Output buffer size"
445         depends on CONSOLE_RECORD
446         default 0x400 if CONSOLE_RECORD
447         help
448           Set the size of the console output buffer. When this fills up, no
449           more data will be recorded until some is removed. The buffer is
450           allocated immediately after the malloc() region is ready.
451
452 config CONSOLE_RECORD_IN_SIZE
453         hex "Input buffer size"
454         depends on CONSOLE_RECORD
455         default 0x100 if CONSOLE_RECORD
456         help
457           Set the size of the console input buffer. When this contains data,
458           tstc() and getc() will use this in preference to real device input.
459           The buffer is allocated immediately after the malloc() region is
460           ready.
461
462 config DISABLE_CONSOLE
463         bool "Add functionality to disable console completely"
464         help
465                 Disable console (in & out).
466
467 config IDENT_STRING
468         string "Board specific string to be added to uboot version string"
469         help
470           This options adds the board specific name to u-boot version.
471
472 config LOGLEVEL
473         int "loglevel"
474         default 4
475         range 0 10
476         help
477           All Messages with a loglevel smaller than the console loglevel will
478           be compiled in. The loglevels are defined as follows:
479
480             0 - emergency
481             1 - alert
482             2 - critical
483             3 - error
484             4 - warning
485             5 - note
486             6 - info
487             7 - debug
488             8 - debug content
489             9 - debug hardware I/O
490
491 config SPL_LOGLEVEL
492         int
493         default LOGLEVEL
494
495 config TPL_LOGLEVEL
496         int
497         default LOGLEVEL
498
499 config SILENT_CONSOLE
500         bool "Support a silent console"
501         help
502           This option allows the console to be silenced, meaning that no
503           output will appear on the console devices. This is controlled by
504           setting the environment variable 'silent' to a non-empty value.
505           Note this also silences the console when booting Linux.
506
507           When the console is set up, the variable is checked, and the
508           GD_FLG_SILENT flag is set. Changing the environment variable later
509           will update the flag.
510
511 config SILENT_U_BOOT_ONLY
512         bool "Only silence the U-Boot console"
513         depends on SILENT_CONSOLE
514         help
515           Normally when the U-Boot console is silenced, Linux's console is
516           also silenced (assuming the board boots into Linux). This option
517           allows the linux console to operate normally, even if U-Boot's
518           is silenced.
519
520 config SILENT_CONSOLE_UPDATE_ON_SET
521         bool "Changes to the 'silent' environment variable update immediately"
522         depends on SILENT_CONSOLE
523         default y if SILENT_CONSOLE
524         help
525           When the 'silent' environment variable is changed, update the
526           console silence flag immediately. This allows 'setenv' to be used
527           to silence or un-silence the console.
528
529           The effect is that any change to the variable will affect the
530           GD_FLG_SILENT flag.
531
532 config SILENT_CONSOLE_UPDATE_ON_RELOC
533         bool "Allow flags to take effect on relocation"
534         depends on SILENT_CONSOLE
535         help
536           In some cases the environment is not available until relocation
537           (e.g. NAND). This option makes the value of the 'silent'
538           environment variable take effect at relocation.
539
540 config PRE_CONSOLE_BUFFER
541         bool "Buffer characters before the console is available"
542         help
543           Prior to the console being initialised (i.e. serial UART
544           initialised etc) all console output is silently discarded.
545           Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
546           buffer any console messages prior to the console being
547           initialised to a buffer. The buffer is a circular buffer, so
548           if it overflows, earlier output is discarded.
549
550           Note that this is not currently supported in SPL. It would be
551           useful to be able to share the pre-console buffer with SPL.
552
553 config PRE_CON_BUF_SZ
554         int "Sets the size of the pre-console buffer"
555         depends on PRE_CONSOLE_BUFFER
556         default 4096
557         help
558           The size of the pre-console buffer affects how much console output
559           can be held before it overflows and starts discarding earlier
560           output. Normally there is very little output at this early stage,
561           unless debugging is enabled, so allow enough for ~10 lines of
562           text.
563
564           This is a useful feature if you are using a video console and
565           want to see the full boot output on the console. Without this
566           option only the post-relocation output will be displayed.
567
568 config PRE_CON_BUF_ADDR
569         hex "Address of the pre-console buffer"
570         depends on PRE_CONSOLE_BUFFER
571         default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
572         default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
573         default 0x0f000000 if ROCKCHIP_RK3288
574         default 0x0f200000 if ROCKCHIP_RK3399
575         help
576           This sets the start address of the pre-console buffer. This must
577           be in available memory and is accessed before relocation and
578           possibly before DRAM is set up. Therefore choose an address
579           carefully.
580
581           We should consider removing this option and allocating the memory
582           in board_init_f_init_reserve() instead.
583
584 config CONSOLE_MUX
585         bool "Enable console multiplexing"
586         default y if DM_VIDEO || VIDEO || LCD
587         help
588           This allows multiple devices to be used for each console 'file'.
589           For example, stdout can be set to go to serial and video.
590           Similarly, stdin can be set to come from serial and keyboard.
591           Input can be provided from either source. Console multiplexing
592           adds a small amount of size to U-Boot.  Changes to the environment
593           variables stdout, stdin and stderr will take effect immediately.
594
595 config SYS_CONSOLE_IS_IN_ENV
596         bool "Select console devices from the environment"
597         default y if CONSOLE_MUX
598         help
599           This allows multiple input/output devices to be set at boot time.
600           For example, if stdout is set to "serial,video" then output will
601           be sent to both the serial and video devices on boot. The
602           environment variables can be updated after boot to change the
603           input/output devices.
604
605 config SYS_CONSOLE_OVERWRITE_ROUTINE
606         bool "Allow board control over console overwriting"
607         help
608           If this is enabled, and the board-specific function
609           overwrite_console() returns 1, the stdin, stderr and stdout are
610           switched to the serial port, else the settings in the environment
611           are used. If this is not enabled, the console will not be switched
612           to serial.
613
614 config SYS_CONSOLE_ENV_OVERWRITE
615         bool "Update environment variables during console init"
616         help
617           The console environment variables (stdout, stdin, stderr) can be
618           used to determine the correct console devices on start-up. This
619           option writes the console devices to these variables on console
620           start-up (after relocation). This causes the environment to be
621           updated to match the console devices actually chosen.
622
623 config SYS_CONSOLE_INFO_QUIET
624         bool "Don't display the console devices on boot"
625         help
626           Normally U-Boot displays the current settings for stdout, stdin
627           and stderr on boot when the post-relocation console is set up.
628           Enable this option to suppress this output. It can be obtained by
629           calling stdio_print_current_devices() from board code.
630
631 config SYS_STDIO_DEREGISTER
632         bool "Allow deregistering stdio devices"
633         default y if USB_KEYBOARD
634         help
635           Generally there is no need to deregister stdio devices since they
636           are never deactivated. But if a stdio device is used which can be
637           removed (for example a USB keyboard) then this option can be
638           enabled to ensure this is handled correctly.
639
640 config SPL_SYS_STDIO_DEREGISTER
641         bool "Allow deregistering stdio devices in SPL"
642         help
643           Generally there is no need to deregister stdio devices since they
644           are never deactivated. But if a stdio device is used which can be
645           removed (for example a USB keyboard) then this option can be
646           enabled to ensure this is handled correctly. This is very rarely
647           needed in SPL.
648
649 config SYS_DEVICE_NULLDEV
650         bool "Enable a null device for stdio"
651         default y if SPLASH_SCREEN || SYS_STDIO_DEREGISTER
652         help
653           Enable creation of a "nulldev" stdio device. This allows silent
654           operation of the console by setting stdout to "nulldev". Enable
655           this to use a serial console under board control.
656
657 endmenu
658
659 menu "Logging"
660
661 config LOG
662         bool "Enable logging support"
663         depends on DM
664         help
665           This enables support for logging of status and debug messages. These
666           can be displayed on the console, recorded in a memory buffer, or
667           discarded if not needed. Logging supports various categories and
668           levels of severity.
669
670 if LOG
671
672 config LOG_MAX_LEVEL
673         int "Maximum log level to record"
674         default 6
675         range 0 9
676         help
677           This selects the maximum log level that will be recorded. Any value
678           higher than this will be ignored. If possible log statements below
679           this level will be discarded at build time. Levels:
680
681             0 - emergency
682             1 - alert
683             2 - critical
684             3 - error
685             4 - warning
686             5 - note
687             6 - info
688             7 - debug
689             8 - debug content
690             9 - debug hardware I/O
691
692 config LOG_DEFAULT_LEVEL
693         int "Default logging level to display"
694         default LOG_MAX_LEVEL
695         range 0 LOG_MAX_LEVEL
696         help
697           This is the default logging level set when U-Boot starts. It can
698           be adjusted later using the 'log level' command. Note that setting
699           this to a value above LOG_MAX_LEVEL will be ineffective, since the
700           higher levels are not compiled in to U-Boot.
701
702             0 - emergency
703             1 - alert
704             2 - critical
705             3 - error
706             4 - warning
707             5 - note
708             6 - info
709             7 - debug
710             8 - debug content
711             9 - debug hardware I/O
712
713 config LOG_CONSOLE
714         bool "Allow log output to the console"
715         default y
716         help
717           Enables a log driver which writes log records to the console.
718           Generally the console is the serial port or LCD display. Only the
719           log message is shown - other details like level, category, file and
720           line number are omitted.
721
722 config LOGF_FILE
723         bool "Show source file name in log messages by default"
724         help
725           Show the source file name in log messages by default. This value
726           can be overridden using the 'log format' command.
727
728 config LOGF_LINE
729         bool "Show source line number in log messages by default"
730         help
731           Show the source line number in log messages by default. This value
732           can be overridden using the 'log format' command.
733
734 config LOGF_FUNC
735         bool "Show function name in log messages by default"
736         help
737           Show the function name in log messages by default. This value can
738           be overridden using the 'log format' command.
739
740 config LOG_SYSLOG
741         bool "Log output to syslog server"
742         depends on NET
743         help
744           Enables a log driver which broadcasts log records via UDP port 514
745           to syslog servers.
746
747 config SPL_LOG
748         bool "Enable logging support in SPL"
749         depends on LOG
750         help
751           This enables support for logging of status and debug messages. These
752           can be displayed on the console, recorded in a memory buffer, or
753           discarded if not needed. Logging supports various categories and
754           levels of severity.
755
756 if SPL_LOG
757
758 config SPL_LOG_MAX_LEVEL
759         int "Maximum log level to record in SPL"
760         depends on SPL_LOG
761         default 3
762         range 0 9
763         help
764           This selects the maximum log level that will be recorded. Any value
765           higher than this will be ignored. If possible log statements below
766           this level will be discarded at build time. Levels:
767
768             0 - emergency
769             1 - alert
770             2 - critical
771             3 - error
772             4 - warning
773             5 - note
774             6 - info
775             7 - debug
776             8 - debug content
777             9 - debug hardware I/O
778
779 config SPL_LOG_CONSOLE
780         bool "Allow log output to the console in SPL"
781         default y
782         help
783           Enables a log driver which writes log records to the console.
784           Generally the console is the serial port or LCD display. Only the
785           log message is shown - other details like level, category, file and
786           line number are omitted.
787
788 endif
789
790 config TPL_LOG
791         bool "Enable logging support in TPL"
792         depends on LOG
793         help
794           This enables support for logging of status and debug messages. These
795           can be displayed on the console, recorded in a memory buffer, or
796           discarded if not needed. Logging supports various categories and
797           levels of severity.
798
799 if TPL_LOG
800
801 config TPL_LOG_MAX_LEVEL
802         int "Maximum log level to record in TPL"
803         depends on TPL_LOG
804         default 3
805         range 0 9
806         help
807           This selects the maximum log level that will be recorded. Any value
808           higher than this will be ignored. If possible log statements below
809           this level will be discarded at build time. Levels:
810
811             0 - emergency
812             1 - alert
813             2 - critical
814             3 - error
815             4 - warning
816             5 - note
817             6 - info
818             7 - debug
819             8 - debug content
820             9 - debug hardware I/O
821
822 config TPL_LOG_CONSOLE
823         bool "Allow log output to the console in TPL"
824         default y
825         help
826           Enables a log driver which writes log records to the console.
827           Generally the console is the serial port or LCD display. Only the
828           log message is shown - other details like level, category, file and
829           line number are omitted.
830
831 endif
832
833 config LOG_ERROR_RETURN
834         bool "Log all functions which return an error"
835         help
836           When an error is returned in U-Boot it is sometimes difficult to
837           figure out the root cause. For example, reading from SPI flash may
838           fail due to a problem in the SPI controller or due to the flash part
839           not returning the expected information. This option changes
840           log_ret() to log any errors it sees. With this option disabled,
841           log_ret() is a nop.
842
843           You can add log_ret() to all functions which return an error code.
844
845 config LOG_TEST
846         bool "Provide a test for logging"
847         depends on UNIT_TEST
848         default y if SANDBOX
849         help
850           This enables a 'log test' command to test logging. It is normally
851           executed from a pytest and simply outputs logging information
852           in various different ways to test that the logging system works
853           correctly with various settings.
854
855 endif
856
857 endmenu
858
859 config SUPPORT_RAW_INITRD
860         bool "Enable raw initrd images"
861         help
862           Note, defining the SUPPORT_RAW_INITRD allows user to supply
863           kernel with raw initrd images. The syntax is slightly different, the
864           address of the initrd must be augmented by it's size, in the following
865           format: "<initrd address>:<initrd size>".
866
867 config DEFAULT_FDT_FILE
868         string "Default fdt file"
869         help
870           This option is used to set the default fdt file to boot OS.
871
872 config MISC_INIT_R
873         bool "Execute Misc Init"
874         default y if ARCH_KEYSTONE || ARCH_SUNXI || MPC85xx
875         default y if ARCH_OMAP2PLUS && !AM33XX
876         help
877           Enabling this option calls 'misc_init_r' function
878
879 config VERSION_VARIABLE
880         bool "add U-Boot environment variable vers"
881         default n
882         help
883           If this variable is defined, an environment variable
884           named "ver" is created by U-Boot showing the U-Boot
885           version as printed by the "version" command.
886           Any change to this variable will be reverted at the
887           next reset.
888
889 config BOARD_LATE_INIT
890         bool "Execute Board late init"
891         help
892           Sometimes board require some initialization code that might
893           require once the actual init done, example saving board specific env,
894           boot-modes etc. which eventually done at late.
895
896           So this config enable the late init code with the help of board_late_init
897           function which should defined on respective boards.
898
899 config DISPLAY_CPUINFO
900         bool "Display information about the CPU during start up"
901         default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K
902         help
903           Display information about the CPU that U-Boot is running on
904           when U-Boot starts up. The function print_cpuinfo() is called
905           to do this.
906
907 config DISPLAY_BOARDINFO
908         bool "Display information about the board during early start up"
909         default y if ARC || ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
910         help
911           Display information about the board that U-Boot is running on
912           when U-Boot starts up. The board function checkboard() is called
913           to do this.
914
915 config DISPLAY_BOARDINFO_LATE
916         bool "Display information about the board during late start up"
917         help
918           Display information about the board that U-Boot is running on after
919           the relocation phase. The board function checkboard() is called to do
920           this.
921
922 config BOUNCE_BUFFER
923         bool "Include bounce buffer API"
924         help
925           Some peripherals support DMA from a subset of physically
926           addressable memory only.  To support such peripherals, the
927           bounce buffer API uses a temporary buffer: it copies data
928           to/from DMA regions while managing cache operations.
929
930           A second possible use of bounce buffers is their ability to
931           provide aligned buffers for DMA operations.
932
933 config BOARD_TYPES
934         bool "Call get_board_type() to get and display the board type"
935         help
936           If this option is enabled, checkboard() will call get_board_type()
937           to get a string containing the board type and this will be
938           displayed immediately after the model is shown on the console
939           early in boot.
940
941 menu "Start-up hooks"
942
943 config ARCH_EARLY_INIT_R
944         bool "Call arch-specific init soon after relocation"
945         help
946           With this option U-Boot will call arch_early_init_r() soon after
947           relocation. Driver model is running by this point, and the cache
948           is on. Note that board_early_init_r() is called first, if
949           enabled. This can be used to set up architecture-specific devices.
950
951 config ARCH_MISC_INIT
952         bool "Call arch-specific init after relocation, when console is ready"
953         help
954           With this option U-Boot will call arch_misc_init() after
955           relocation to allow miscellaneous arch-dependent initialisation
956           to be performed. This function should be defined by the board
957           and will be called after the console is set up, after relocation.
958
959 config BOARD_EARLY_INIT_F
960         bool "Call board-specific init before relocation"
961         help
962           Some boards need to perform initialisation as soon as possible
963           after boot. With this option, U-Boot calls board_early_init_f()
964           after driver model is ready in the pre-relocation init sequence.
965           Note that the normal serial console is not yet set up, but the
966           debug UART will be available if enabled.
967
968 config BOARD_EARLY_INIT_R
969         bool "Call board-specific init after relocation"
970         help
971           Some boards need to perform initialisation as directly after
972           relocation. With this option, U-Boot calls board_early_init_r()
973           in the post-relocation init sequence.
974
975 config LAST_STAGE_INIT
976         bool "Call board-specific as last setup step"
977         help
978           Some boards need to perform initialisation immediately before control
979           is passed to the command-line interpreter (e.g. for initializations
980           that depend on later phases in the init sequence). With this option,
981           U-Boot calls last_stage_init() before the command-line interpreter is
982           started.
983
984 config PCI_INIT_R
985         bool "Enumerate PCI buses during init"
986         depends on PCI
987         default y if !DM_PCI
988         help
989           With this option U-Boot will call pci_init() soon after relocation,
990           which will enumerate PCI buses. This is needed, for instance, in the
991           case of DM PCI-based Ethernet devices, which will not be detected
992           without having the enumeration performed earlier.
993
994 endmenu
995
996 menu "Security support"
997
998 config HASH
999         bool # "Support hashing API (SHA1, SHA256, etc.)"
1000         help
1001           This provides a way to hash data in memory using various supported
1002           algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
1003           and the algorithms it supports are defined in common/hash.c. See
1004           also CMD_HASH for command-line access.
1005
1006 config AVB_VERIFY
1007         bool "Build Android Verified Boot operations"
1008         depends on LIBAVB
1009         depends on PARTITION_UUIDS
1010         help
1011           This option enables compilation of bootloader-dependent operations,
1012           used by Android Verified Boot 2.0 library (libavb). Includes:
1013             * Helpers to process strings in order to build OS bootargs.
1014             * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
1015             * Helpers to alloc/init/free avb ops.
1016
1017 if AVB_VERIFY
1018
1019 config AVB_BUF_ADDR
1020         hex "Define AVB buffer address"
1021         default FASTBOOT_BUF_ADDR
1022         help
1023           AVB requires a buffer for memory transactions. This variable defines the
1024           buffer address.
1025
1026 config AVB_BUF_SIZE
1027         hex "Define AVB buffer SIZE"
1028         default FASTBOOT_BUF_SIZE
1029         help
1030           AVB requires a buffer for memory transactions. This variable defines the
1031           buffer size.
1032
1033 endif # AVB_VERIFY
1034
1035 config SPL_HASH
1036         bool # "Support hashing API (SHA1, SHA256, etc.)"
1037         help
1038           This provides a way to hash data in memory using various supported
1039           algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
1040           and the algorithms it supports are defined in common/hash.c. See
1041           also CMD_HASH for command-line access.
1042
1043 config TPL_HASH
1044         bool # "Support hashing API (SHA1, SHA256, etc.)"
1045         help
1046           This provides a way to hash data in memory using various supported
1047           algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
1048           and the algorithms it supports are defined in common/hash.c. See
1049           also CMD_HASH for command-line access.
1050
1051 endmenu
1052
1053 menu "Update support"
1054
1055 config UPDATE_TFTP
1056         bool "Auto-update using fitImage via TFTP"
1057         depends on FIT
1058         help
1059           This option allows performing update of NOR with data in fitImage
1060           sent via TFTP boot.
1061
1062 config UPDATE_TFTP_CNT_MAX
1063         int "The number of connection retries during auto-update"
1064         default 0
1065         depends on UPDATE_TFTP
1066
1067 config UPDATE_TFTP_MSEC_MAX
1068         int "Delay in mSec to wait for the TFTP server during auto-update"
1069         default 100
1070         depends on UPDATE_TFTP
1071
1072 config ANDROID_AB
1073         bool "Android A/B updates"
1074         default n
1075         help
1076           If enabled, adds support for the new Android A/B update model. This
1077           allows the bootloader to select which slot to boot from based on the
1078           information provided by userspace via the Android boot_ctrl HAL. This
1079           allows a bootloader to try a new version of the system but roll back
1080           to previous version if the new one didn't boot all the way.
1081
1082 endmenu
1083
1084 menu "Blob list"
1085
1086 config BLOBLIST
1087         bool "Support for a bloblist"
1088         help
1089           This enables support for a bloblist in U-Boot, which can be passed
1090           from TPL to SPL to U-Boot proper (and potentially to Linux). The
1091           blob list supports multiple binary blobs of data, each with a tag,
1092           so that different U-Boot components can store data which can survive
1093           through to the next stage of the boot.
1094
1095 config SPL_BLOBLIST
1096         bool "Support for a bloblist in SPL"
1097         depends on BLOBLIST
1098         default y if SPL
1099         help
1100           This enables a bloblist in SPL. If this is the first part of U-Boot
1101           to run, then the bloblist is set up in SPL and passed to U-Boot
1102           proper. If TPL also has a bloblist, then SPL uses the one from there.
1103
1104 config TPL_BLOBLIST
1105         bool "Support for a bloblist in TPL"
1106         depends on BLOBLIST
1107         default y if TPL
1108         help
1109           This enables a bloblist in TPL. The bloblist is set up in TPL and
1110           passed to SPL and U-Boot proper.
1111
1112 config BLOBLIST_SIZE
1113         hex "Size of bloblist"
1114         depends on BLOBLIST
1115         default 0x400
1116         help
1117           Sets the size of the bloblist in bytes. This must include all
1118           overhead (alignment, bloblist header, record header). The bloblist
1119           is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
1120           proper), and this sane bloblist is used for subsequent stages.
1121
1122 config BLOBLIST_ADDR
1123         hex "Address of bloblist"
1124         depends on BLOBLIST
1125         default 0xe000 if SANDBOX
1126         help
1127           Sets the address of the bloblist, set up by the first part of U-Boot
1128           which runs. Subsequent U-Boot stages typically use the same address.
1129
1130 endmenu
1131
1132 source "common/spl/Kconfig"
1133
1134 config IMAGE_SIGN_INFO
1135         bool
1136         select SHA1
1137         select SHA256
1138         help
1139           Enable image_sign_info helper functions.
1140
1141 if IMAGE_SIGN_INFO
1142
1143 config SPL_IMAGE_SIGN_INFO
1144         bool
1145         select SHA1
1146         select SHA256
1147         help
1148           Enable image_sign_info helper functions in SPL.
1149
1150 endif