ata: dwc_ahsata: Remove legacy non-CONFIG_AHCI code
[platform/kernel/u-boot.git] / common / Kconfig
1 menu "Console"
2
3 config 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
9 config CONSOLE_RECORD
10         bool "Console recording"
11         help
12           This provides a way to record console output (and provide console
13           input) through circular buffers. This is mostly useful for testing.
14           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
18 config 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
26 config 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
35 config 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
45 config 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.
54
55 config DISABLE_CONSOLE
56         bool "Add functionality to disable console completely"
57         help
58                 Disable console (in & out).
59
60 config 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
65 config LOGLEVEL
66         int "loglevel"
67         default 4
68         range 0 10
69         help
70           All Messages with a loglevel smaller than the console loglevel will
71           be compiled in. The loglevels are defined as follows:
72
73             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
83
84 config SPL_LOGLEVEL
85         int
86         default LOGLEVEL
87
88 config TPL_LOGLEVEL
89         int
90         depends on TPL
91         default LOGLEVEL
92
93 config VPL_LOGLEVEL
94         int "loglevel for VPL"
95         depends on VPL
96         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
103 config 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
108           setting the environment variable 'silent' to a non-empty value.
109           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
115 config 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
124 config 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
136 config SILENT_CONSOLE_UPDATE_ON_RELOC
137         bool "Allow flags to take effect on relocation"
138         depends on SILENT_CONSOLE
139         help
140           In some cases the environment is not available until relocation
141           (e.g. NAND). This option makes the value of the 'silent'
142           environment variable take effect at relocation.
143
144 config 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
157 config 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
172 config 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
177         default 0x0f000000 if ROCKCHIP_RK3288
178         default 0x0f200000 if ROCKCHIP_RK3399
179         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
188 config 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
199 config 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.
204           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
206           environment variables can be updated after boot to change the
207           input/output devices.
208
209 config 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
218 config 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
227 config 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.
232           Enable this option to suppress this output. It can be obtained by
233           calling stdio_print_current_devices() from board code.
234
235 config 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
244 config 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
253 config SYS_DEVICE_NULLDEV
254         bool "Enable a null device for stdio"
255         default y if SPLASH_SCREEN || SYS_STDIO_DEREGISTER
256         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
261 endmenu
262
263 menu "Logging"
264
265 config LOG
266         bool "Enable logging support"
267         depends on DM
268         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
274 if LOG
275
276 config LOG_MAX_LEVEL
277         int "Maximum log level to record"
278         default 6
279         range 0 9
280         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
285             0 - emergency
286             1 - alert
287             2 - critical
288             3 - error
289             4 - warning
290             5 - note
291             6 - info
292             7 - debug
293             8 - debug content
294             9 - debug hardware I/O
295
296 config LOG_DEFAULT_LEVEL
297         int "Default logging level to display"
298         default LOG_MAX_LEVEL
299         range 0 LOG_MAX_LEVEL
300         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
303           this to a value above LOG_MAX_LEVEL will be ineffective, since the
304           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
317 config LOG_CONSOLE
318         bool "Allow log output to the console"
319         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
326 config 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
332 config 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
338 config 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
344 config 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
352 config LOG_SYSLOG
353         bool "Log output to syslog server"
354         depends on NET
355         help
356           Enables a log driver which broadcasts log records via UDP port 514
357           to syslog servers.
358
359 config SPL_LOG
360         bool "Enable logging support in SPL"
361         depends on LOG
362         help
363           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
368 if SPL_LOG
369
370 config 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
391 config 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
400 endif
401
402 config TPL_LOG
403         bool "Enable logging support in TPL"
404         depends on LOG && TPL
405         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
411 if TPL_LOG
412
413 config 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
434 config 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
443 endif
444
445 config VPL_LOG
446         bool "Enable logging support in VPL"
447         depends on LOG && VPL
448         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
454 if VPL_LOG
455
456 config 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
475 config 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
484 endif
485
486 config LOG_ERROR_RETURN
487         bool "Log all functions which return an error"
488         help
489           When an error is returned in U-Boot it is sometimes difficult to
490           figure out the root cause. For example, reading from SPI flash may
491           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
498 config 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
508 endif
509
510 endmenu
511
512 menu "Init options"
513
514 config 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
522 config DISPLAY_CPUINFO
523         bool "Display information about the CPU during start up"
524         default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K
525         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
530 config DISPLAY_BOARDINFO
531         bool "Display information about the board during early start up"
532         default y if ARC || ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
533         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
538 config 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
545 menu "Start-up hooks"
546
547 config 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
558 if EVENT
559
560 config 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
568 config 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
576 endif # EVENT
577
578 config ARCH_EARLY_INIT_R
579         bool "Call arch-specific init soon after relocation"
580         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
586 config 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
592           and will be called after the console is set up, after relocation.
593
594 config BOARD_EARLY_INIT_F
595         bool "Call board-specific init before relocation"
596         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
603 config 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
610 config 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
616 config 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
626 config CLOCKS
627         bool "Call set_cpu_clk_info"
628         depends on ARM
629
630 config 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
639 config 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
648 config 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
655 config 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
661 config 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
667 config 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
673 config PCI_INIT_R
674         bool "Enumerate PCI buses during init"
675         depends on PCI
676         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
682 config 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
688 endmenu
689
690 endmenu         # Init options
691
692 menu "Security support"
693
694 config 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
702 config AVB_VERIFY
703         bool "Build Android Verified Boot operations"
704         depends on LIBAVB
705         depends on MMC
706         depends on PARTITION_UUIDS
707         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
714 if AVB_VERIFY
715
716 config 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
723 config 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
730 endif # AVB_VERIFY
731
732 config 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
740 config 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
748 config 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
756 config STACKPROTECTOR
757         bool "Stack Protector buffer overflow detection"
758         help
759           Enable stack smash detection through compiler's stack-protector
760           canary logic
761
762 config SPL_STACKPROTECTOR
763         bool "Stack Protector buffer overflow detection for SPL"
764         depends on STACKPROTECTOR && SPL
765
766 config TPL_STACKPROTECTOR
767         bool "Stack Protector buffer overflow detection for TPL"
768         depends on STACKPROTECTOR && TPL
769
770 endmenu
771
772 menu "Update support"
773
774 config UPDATE_COMMON
775         bool
776         select DFU_WRITE_ALT
777
778 config UPDATE_TFTP
779         bool "Auto-update using fitImage via TFTP"
780         depends on FIT
781         select UPDATE_COMMON
782         help
783           This option allows performing update of NOR with data in fitImage
784           sent via TFTP boot.
785
786 config UPDATE_TFTP_CNT_MAX
787         int "The number of connection retries during auto-update"
788         default 0
789         depends on UPDATE_TFTP
790
791 config 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
796 config 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
805 config ANDROID_AB
806         bool "Android A/B updates"
807         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
814 endmenu
815
816 menu "Blob list"
817
818 config 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
825           through to the next phase of the boot.
826
827 config SPL_BLOBLIST
828         bool "Support for a bloblist in SPL"
829         depends on BLOBLIST && SPL_LIBGENERIC_SUPPORT && SPL_LIBCOMMON_SUPPORT
830         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
836 config TPL_BLOBLIST
837         bool "Support for a bloblist in TPL"
838         depends on BLOBLIST && TPL_LIBGENERIC_SUPPORT && TPL_LIBCOMMON_SUPPORT
839         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
844 config 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
852 if BLOBLIST
853
854 choice
855         prompt "Bloblist location"
856         help
857           Select the location of the bloblist, via various means.
858
859 config 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.
865
866 config 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
873 endchoice
874
875 config BLOBLIST_ADDR
876         hex "Address of bloblist"
877         default 0xc000 if SANDBOX
878         depends on BLOBLIST_FIXED
879         help
880           Sets the address of the bloblist, set up by the first part of U-Boot
881           which runs. Subsequent U-Boot phases typically use the same address.
882
883           This is not used if BLOBLIST_ALLOC is selected.
884
885 config 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
894 config BLOBLIST_SIZE_RELOC
895         hex "Size of bloblist after relocation"
896         default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
897         default 0 if BLOBLIST_PASSAGE
898         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
904 endif # BLOBLIST
905
906 if SPL_BLOBLIST
907
908 choice
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
917 config 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
924 config 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
931 endchoice
932
933 endif # SPL_BLOBLIST
934
935 if TPL_BLOBLIST
936
937 choice
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
946 config 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
953 config 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
960 endchoice
961
962 endif # TPL_BLOBLIST
963
964 endmenu
965
966 source "common/spl/Kconfig"
967
968 config IMAGE_SIGN_INFO
969         bool
970         select SHA1
971         select SHA256
972         help
973           Enable image_sign_info helper functions.
974
975 if IMAGE_SIGN_INFO
976
977 config SPL_IMAGE_SIGN_INFO
978         bool
979         select SHA1
980         select SHA256
981         help
982           Enable image_sign_info helper functions in SPL.
983
984 endif
985
986 config 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