Merge branch '2020-04-17-master-imports'
[oweals/u-boot.git] / lib / Kconfig
1 menu "Library routines"
2
3 config BCH
4         bool "Enable Software based BCH ECC"
5         help
6           Enables software based BCH ECC algorithm present in lib/bch.c
7           This is used by SoC platforms which do not have built-in ELM
8           hardware engine required for BCH ECC correction.
9
10 config BINMAN_FDT
11         bool "Allow access to binman information in the device tree"
12         depends on BINMAN && OF_CONTROL
13         default y
14         help
15           This enables U-Boot to access information about binman entries,
16           stored in the device tree in a binman node. Typical uses are to
17           locate entries in the firmware image. See binman.h for the available
18           functionality.
19
20 config CC_OPTIMIZE_LIBS_FOR_SPEED
21         bool "Optimize libraries for speed"
22         help
23           Enabling this option will pass "-O2" to gcc when compiling
24           under "lib" directory.
25
26           If unsure, say N.
27
28 config DYNAMIC_CRC_TABLE
29         bool "Enable Dynamic tables for CRC"
30         help
31           Enable this option to calculate entries for CRC tables at runtime.
32           This can be helpful when reducing the size of the build image
33
34 config HAVE_ARCH_IOMAP
35         bool
36         help
37           Enable this option if architecture provides io{read,write}{8,16,32}
38           I/O accessor functions.
39
40 config HAVE_PRIVATE_LIBGCC
41         bool
42
43 config LIB_UUID
44         bool
45
46 config PRINTF
47         bool
48         default y
49
50 config SPL_PRINTF
51         bool
52         select SPL_SPRINTF
53         select SPL_STRTO if !SPL_USE_TINY_PRINTF
54
55 config TPL_PRINTF
56         bool
57         select TPL_SPRINTF
58         select TPL_STRTO if !TPL_USE_TINY_PRINTF
59
60 config SPRINTF
61         bool
62         default y
63
64 config SPL_SPRINTF
65         bool
66
67 config TPL_SPRINTF
68         bool
69
70 config STRTO
71         bool
72         default y
73
74 config SPL_STRTO
75         bool
76
77 config TPL_STRTO
78         bool
79
80 config IMAGE_SPARSE
81         bool
82
83 config IMAGE_SPARSE_FILLBUF_SIZE
84         hex "Android sparse image CHUNK_TYPE_FILL buffer size"
85         default 0x80000
86         depends on IMAGE_SPARSE
87         help
88           Set the size of the fill buffer used when processing CHUNK_TYPE_FILL
89           chunks.
90
91 config USE_PRIVATE_LIBGCC
92         bool "Use private libgcc"
93         depends on HAVE_PRIVATE_LIBGCC
94         default y if HAVE_PRIVATE_LIBGCC && ((ARM && !ARM64) || MIPS)
95         help
96           This option allows you to use the built-in libgcc implementation
97           of U-Boot instead of the one provided by the compiler.
98           If unsure, say N.
99
100 config SYS_HZ
101         int
102         default 1000
103         help
104           The frequency of the timer returned by get_timer().
105           get_timer() must operate in milliseconds and this option must be
106           set to 1000.
107
108 config SPL_USE_TINY_PRINTF
109         bool "Enable tiny printf() version in SPL"
110         depends on SPL
111         default y
112         help
113           This option enables a tiny, stripped down printf version.
114           This should only be used in space limited environments,
115           like SPL versions with hard memory limits. This version
116           reduces the code size by about 2.5KiB on armv7.
117
118           The supported format specifiers are %c, %s, %u/%d and %x.
119
120 config TPL_USE_TINY_PRINTF
121         bool "Enable tiny printf() version in TPL"
122         depends on TPL
123         default y if SPL_USE_TINY_PRINTF
124         help
125           This option enables a tiny, stripped down printf version.
126           This should only be used in space limited environments,
127           like SPL versions with hard memory limits. This version
128           reduces the code size by about 2.5KiB on armv7.
129
130           The supported format specifiers are %c, %s, %u/%d and %x.
131
132 config PANIC_HANG
133         bool "Do not reset the system on fatal error"
134         help
135           Define this option to stop the system in case of a fatal error,
136           so that you have to reset it manually. This is probably NOT a good
137           idea for an embedded system where you want the system to reboot
138           automatically as fast as possible, but it may be useful during
139           development since you can try to debug the conditions that lead to
140           the situation.
141
142 config REGEX
143         bool "Enable regular expression support"
144         default y if NET
145         help
146           If this variable is defined, U-Boot is linked against the
147           SLRE (Super Light Regular Expression) library, which adds
148           regex support to some commands, for example "env grep" and
149           "setexpr".
150
151 choice
152         prompt "Pseudo-random library support type"
153         depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID || \
154                    RNG_SANDBOX || UT_LIB && AES
155         default LIB_RAND
156         help
157           Select the library to provide pseudo-random number generator
158           functions.  LIB_HW_RAND supports certain hardware engines that
159           provide this functionality.  If in doubt, select LIB_RAND.
160
161 config LIB_RAND
162         bool "Pseudo-random library support"
163
164 config LIB_HW_RAND
165         bool "HW Engine for random libray support"
166
167 endchoice
168
169 config SPL_TINY_MEMSET
170         bool "Use a very small memset() in SPL"
171         help
172           The faster memset() is the arch-specific one (if available) enabled
173           by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
174           better performance by writing a word at a time. But in very
175           size-constrained environments even this may be too big. Enable this
176           option to reduce code size slightly at the cost of some speed.
177
178 config TPL_TINY_MEMSET
179         bool "Use a very small memset() in TPL"
180         help
181           The faster memset() is the arch-specific one (if available) enabled
182           by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
183           better performance by writing a word at a time. But in very
184           size-constrained environments even this may be too big. Enable this
185           option to reduce code size slightly at the cost of some speed.
186
187 config RBTREE
188         bool
189
190 config BITREVERSE
191         bool "Bit reverse library from Linux"
192
193 config TRACE
194         bool "Support for tracing of function calls and timing"
195         imply CMD_TRACE
196         help
197           Enables function tracing within U-Boot. This allows recording of call
198           traces including timing information. The command can write data to
199           memory for exporting for analysis (e.g. using bootchart).
200           See doc/README.trace for full details.
201
202 config TRACE_BUFFER_SIZE
203         hex "Size of trace buffer in U-Boot"
204         depends on TRACE
205         default 0x01000000
206         help
207           Sets the size of the trace buffer in U-Boot. This is allocated from
208           memory during relocation. If this buffer is too small, the trace
209           history will be truncated, with later records omitted.
210
211           If early trace is enabled (i.e. before relocation), this buffer must
212           be large enough to include all the data from the early trace buffer as
213           well, since this is copied over to the main buffer during relocation.
214
215           A trace record is emitted for each function call and each record is
216           12 bytes (see struct trace_call). A suggested minimum size is 1MB. If
217           the size is too small then 'trace stats' will show a message saying
218           how many records were dropped due to buffer overflow.
219
220 config TRACE_CALL_DEPTH_LIMIT
221         int "Trace call depth limit"
222         depends on TRACE
223         default 15
224         help
225           Sets the maximum call depth up to which function calls are recorded.
226
227 config TRACE_EARLY
228         bool "Enable tracing before relocation"
229         depends on TRACE
230         help
231           Sometimes it is helpful to trace execution of U-Boot before
232           relocation. This is possible by using a arch-specific, fixed buffer
233           position in memory. Enable this option to start tracing as early as
234           possible after U-Boot starts.
235
236 config TRACE_EARLY_SIZE
237         hex "Size of early trace buffer in U-Boot"
238         depends on TRACE_EARLY
239         default 0x00100000
240         help
241           Sets the size of the early trace buffer in bytes. This is used to hold
242           tracing information before relocation.
243
244 config TRACE_EARLY_CALL_DEPTH_LIMIT
245         int "Early trace call depth limit"
246         depends on TRACE_EARLY
247         default 200
248         help
249           Sets the maximum call depth up to which function calls are recorded
250           during early tracing.
251
252 config TRACE_EARLY_ADDR
253         hex "Address of early trace buffer in U-Boot"
254         depends on TRACE_EARLY
255         default 0x00100000
256         help
257           Sets the address of the early trace buffer in U-Boot. This memory
258           must be accessible before relocation.
259
260           A trace record is emitted for each function call and each record is
261           12 bytes (see struct trace_call). A suggested minimum size is 1MB. If
262           the size is too small then the message which says the amount of early
263           data being coped will the the same as the
264
265 source lib/dhry/Kconfig
266
267 menu "Security support"
268
269 config AES
270         bool "Support the AES algorithm"
271         help
272           This provides a means to encrypt and decrypt data using the AES
273           (Advanced Encryption Standard). This algorithm uses a symetric key
274           and is widely used as a streaming cipher. Different key lengths are
275           supported by the algorithm but only a 128-bit key is supported at
276           present.
277
278 source lib/rsa/Kconfig
279 source lib/crypto/Kconfig
280
281 config TPM
282         bool "Trusted Platform Module (TPM) Support"
283         depends on DM
284         help
285           This enables support for TPMs which can be used to provide security
286           features for your board. The TPM can be connected via LPC or I2C
287           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
288           command to interactive the TPM. Driver model support is provided
289           for the low-level TPM interface, but only one TPM is supported at
290           a time by the TPM library.
291
292 config SPL_TPM
293         bool "Trusted Platform Module (TPM) Support in SPL"
294         depends on SPL_DM
295         help
296           This enables support for TPMs which can be used to provide security
297           features for your board. The TPM can be connected via LPC or I2C
298           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
299           command to interactive the TPM. Driver model support is provided
300           for the low-level TPM interface, but only one TPM is supported at
301           a time by the TPM library.
302
303 config TPL_TPM
304         bool "Trusted Platform Module (TPM) Support in TPL"
305         depends on TPL_DM
306         help
307           This enables support for TPMs which can be used to provide security
308           features for your board. The TPM can be connected via LPC or I2C
309           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
310           command to interactive the TPM. Driver model support is provided
311           for the low-level TPM interface, but only one TPM is supported at
312           a time by the TPM library.
313
314 endmenu
315
316 menu "Android Verified Boot"
317
318 config LIBAVB
319         bool "Android Verified Boot 2.0 support"
320         depends on ANDROID_BOOT_IMAGE
321         default n
322         help
323           This enables support of Android Verified Boot 2.0 which can be used
324           to assure the end user of the integrity of the software running on a
325           device. Introduces such features as boot chain of trust, rollback
326           protection etc.
327
328 endmenu
329
330 menu "Hashing Support"
331
332 config SHA1
333         bool "Enable SHA1 support"
334         help
335           This option enables support of hashing using SHA1 algorithm.
336           The hash is calculated in software.
337           The SHA1 algorithm produces a 160-bit (20-byte) hash value
338           (digest).
339
340 config SHA256
341         bool "Enable SHA256 support"
342         help
343           This option enables support of hashing using SHA256 algorithm.
344           The hash is calculated in software.
345           The SHA256 algorithm produces a 256-bit (32-byte) hash value
346           (digest).
347
348 config SHA_HW_ACCEL
349         bool "Enable hashing using hardware"
350         help
351           This option enables hardware acceleration
352           for SHA1/SHA256 hashing.
353           This affects the 'hash' command and also the
354           hash_lookup_algo() function.
355
356 config SHA_PROG_HW_ACCEL
357         bool "Enable Progressive hashing support using hardware"
358         depends on SHA_HW_ACCEL
359         help
360           This option enables hardware-acceleration for
361           SHA1/SHA256 progressive hashing.
362           Data can be streamed in a block at a time and the hashing
363           is performed in hardware.
364
365 config MD5
366         bool
367
368 config CRC32C
369         bool
370
371 config XXHASH
372         bool
373
374 endmenu
375
376 menu "Compression Support"
377
378 config LZ4
379         bool "Enable LZ4 decompression support"
380         help
381           If this option is set, support for LZ4 compressed images
382           is included. The LZ4 algorithm can run in-place as long as the
383           compressed image is loaded to the end of the output buffer, and
384           trades lower compression ratios for much faster decompression.
385           
386           NOTE: This implements the release version of the LZ4 frame
387           format as generated by default by the 'lz4' command line tool.
388           This is not the same as the outdated, less efficient legacy
389           frame format currently (2015) implemented in the Linux kernel
390           (generated by 'lz4 -l'). The two formats are incompatible.
391
392 config LZMA
393         bool "Enable LZMA decompression support"
394         help
395           This enables support for LZMA (Lempel-Ziv-Markov chain algorithm),
396           a dictionary compression algorithm that provides a high compression
397           ratio and fairly fast decompression speed. See also
398           CONFIG_CMD_LZMADEC which provides a decode command.
399
400 config LZO
401         bool "Enable LZO decompression support"
402         help
403           This enables support for LZO compression algorithm.r
404
405 config GZIP
406         bool "Enable gzip decompression support"
407         select ZLIB
408         default y
409         help
410           This enables support for GZIP compression algorithm.
411
412 config BZIP2
413         bool "Enable bzip2 decompression support"
414         help
415           This enables support for BZIP2 compression algorithm.
416
417 config ZLIB
418         bool
419         default y
420         help
421           This enables ZLIB compression lib.
422
423 config ZSTD
424         bool "Enable Zstandard decompression support"
425         select XXHASH
426         help
427           This enables Zstandard decompression library.
428
429 config SPL_LZ4
430         bool "Enable LZ4 decompression support in SPL"
431         help
432           This enables support for tge LZ4 decompression algorithm in SPL. LZ4
433           is a lossless data compression algorithm that is focused on
434           fast compression and decompression speed. It belongs to the LZ77
435           family of byte-oriented compression schemes.
436
437 config SPL_LZO
438         bool "Enable LZO decompression support in SPL"
439         help
440           This enables support for LZO compression algorithm in the SPL.
441
442 config SPL_GZIP
443         bool "Enable gzip decompression support for SPL build"
444         select SPL_ZLIB
445         help
446           This enables support for GZIP compression altorithm for SPL boot.
447
448 config SPL_ZLIB
449         bool
450         help
451           This enables compression lib for SPL boot.
452
453 config SPL_ZSTD
454         bool "Enable Zstandard decompression support in SPL"
455         select XXHASH
456         help
457           This enables Zstandard decompression library in the SPL.
458
459 endmenu
460
461 config ERRNO_STR
462         bool "Enable function for getting errno-related string message"
463         help
464           The function errno_str(int errno), returns a pointer to the errno
465           corresponding text message:
466           - if errno is null or positive number - a pointer to "Success" message
467           - if errno is negative - a pointer to errno related message
468
469 config HEXDUMP
470         bool "Enable hexdump"
471         help
472           This enables functions for printing dumps of binary data.
473
474 config OF_LIBFDT
475         bool "Enable the FDT library"
476         default y if OF_CONTROL
477         help
478           This enables the FDT library (libfdt). It provides functions for
479           accessing binary device tree images in memory, such as adding and
480           removing nodes and properties, scanning through the tree and finding
481           particular compatible nodes. The library operates on a flattened
482           version of the device tree.
483
484 config OF_LIBFDT_ASSUME_MASK
485         hex "Mask of conditions to assume for libfdt"
486         depends on OF_LIBFDT || FIT
487         default 0
488         help
489           Use this to change the assumptions made by libfdt about the
490           device tree it is working with. A value of 0 means that no assumptions
491           are made, and libfdt is able to deal with malicious data. A value of
492           0xff means all assumptions are made and any invalid data may cause
493           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
494
495 config OF_LIBFDT_OVERLAY
496         bool "Enable the FDT library overlay support"
497         depends on OF_LIBFDT
498         default y if ARCH_OMAP2PLUS || ARCH_KEYSTONE
499         help
500           This enables the FDT library (libfdt) overlay support.
501
502 config SPL_OF_LIBFDT
503         bool "Enable the FDT library for SPL"
504         default y if SPL_OF_CONTROL
505         help
506           This enables the FDT library (libfdt). It provides functions for
507           accessing binary device tree images in memory, such as adding and
508           removing nodes and properties, scanning through the tree and finding
509           particular compatible nodes. The library operates on a flattened
510           version of the device tree.
511
512 config SPL_OF_LIBFDT_ASSUME_MASK
513         hex "Mask of conditions to assume for libfdt"
514         depends on SPL_OF_LIBFDT || FIT
515         default 0xff
516         help
517           Use this to change the assumptions made by libfdt in SPL about the
518           device tree it is working with. A value of 0 means that no assumptions
519           are made, and libfdt is able to deal with malicious data. A value of
520           0xff means all assumptions are made and any invalid data may cause
521           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
522
523 config TPL_OF_LIBFDT
524         bool "Enable the FDT library for TPL"
525         default y if TPL_OF_CONTROL
526         help
527           This enables the FDT library (libfdt). It provides functions for
528           accessing binary device tree images in memory, such as adding and
529           removing nodes and properties, scanning through the tree and finding
530           particular compatible nodes. The library operates on a flattened
531           version of the device tree.
532
533 config TPL_OF_LIBFDT_ASSUME_MASK
534         hex "Mask of conditions to assume for libfdt"
535         depends on TPL_OF_LIBFDT || FIT
536         default 0xff
537         help
538           Use this to change the assumptions made by libfdt in TPL about the
539           device tree it is working with. A value of 0 means that no assumptions
540           are made, and libfdt is able to deal with malicious data. A value of
541           0xff means all assumptions are made and any invalid data may cause
542           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
543
544 config FDT_FIXUP_PARTITIONS
545         bool "overwrite MTD partitions in DTS through defined in 'mtdparts'"
546         depends on OF_LIBFDT
547         depends on CMD_MTDPARTS
548         help
549           Allow overwriting defined partitions in the device tree blob
550           using partition info defined in the 'mtdparts' environment
551           variable.
552
553 menu "System tables"
554         depends on (!EFI && !SYS_COREBOOT) || (ARM && EFI_LOADER)
555
556 config GENERATE_SMBIOS_TABLE
557         bool "Generate an SMBIOS (System Management BIOS) table"
558         default y
559         depends on X86 || EFI_LOADER
560         help
561           The System Management BIOS (SMBIOS) specification addresses how
562           motherboard and system vendors present management information about
563           their products in a standard format by extending the BIOS interface
564           on Intel architecture systems.
565
566           Check http://www.dmtf.org/standards/smbios for details.
567
568 config SMBIOS_MANUFACTURER
569         string "SMBIOS Manufacturer"
570         depends on GENERATE_SMBIOS_TABLE
571         default SYS_VENDOR
572         help
573           The board manufacturer to store in SMBIOS structures.
574           Change this to override the default one (CONFIG_SYS_VENDOR).
575
576 config SMBIOS_PRODUCT_NAME
577         string "SMBIOS Product Name"
578         depends on GENERATE_SMBIOS_TABLE
579         default SYS_BOARD
580         help
581           The product name to store in SMBIOS structures.
582           Change this to override the default one (CONFIG_SYS_BOARD).
583
584 endmenu
585
586 config ASN1_COMPILER
587         bool
588
589 config ASN1_DECODER
590         bool
591         help
592           Enable asn1 decoder library.
593
594 config OID_REGISTRY
595         bool
596         help
597           Enable fast lookup object identifier registry.
598
599 source lib/efi/Kconfig
600 source lib/efi_loader/Kconfig
601 source lib/optee/Kconfig
602
603 config TEST_FDTDEC
604         bool "enable fdtdec test"
605         depends on OF_LIBFDT
606
607 config LIB_DATE
608         bool
609
610 config LIB_ELF
611         bool
612         help
613           Supoort basic elf loading/validating functions.
614           This supports fir 32 bit and 64 bit versions.
615
616 endmenu