env: ti: ti_common.env: Fix get_overlaystring for FIT Image
[platform/kernel/u-boot.git] / lib / Kconfig
1 menu "Library routines"
2
3 config ADDR_MAP
4         bool "Enable support for non-identity virtual-physical mappings"
5         help
6           Enables helper code for implementing non-identity virtual-physical
7           memory mappings for 32bit CPUs.
8
9           This library only works in the post-relocation phase.
10
11 config SYS_NUM_ADDR_MAP
12         int "Size of the address-map table"
13         depends on ADDR_MAP
14         default 16
15         help
16           Sets the number of entries in the virtual-physical mapping table.
17
18 config SYS_TIMER_COUNTS_DOWN
19         bool "System timer counts down rather than up"
20
21 config PHYSMEM
22         bool "Access to physical memory region (> 4G)"
23         help
24           Some basic support is provided for operations on memory not
25           normally accessible to 32-bit U-Boot - e.g. some architectures
26           support access to more than 4G of memory on 32-bit
27           machines using physical address extension or similar.
28           Enable this to access this basic support, which only supports clearing
29           the memory.
30
31 config BCH
32         bool "Enable Software based BCH ECC"
33         help
34           Enables software based BCH ECC algorithm present in lib/bch.c
35           This is used by SoC platforms which do not have built-in ELM
36           hardware engine required for BCH ECC correction.
37
38 config BINMAN_FDT
39         bool "Allow access to binman information in the device tree"
40         depends on BINMAN && DM && OF_CONTROL
41         default y if OF_SEPARATE || OF_EMBED
42         help
43           This enables U-Boot to access information about binman entries,
44           stored in the device tree in a binman node. Typical uses are to
45           locate entries in the firmware image. See binman.h for the available
46           functionality.
47
48 config CC_OPTIMIZE_LIBS_FOR_SPEED
49         bool "Optimize libraries for speed"
50         help
51           Enabling this option will pass "-O2" to gcc when compiling
52           under "lib" directory.
53
54           If unsure, say N.
55
56 config CHARSET
57         bool
58
59 config DYNAMIC_CRC_TABLE
60         bool "Enable Dynamic tables for CRC"
61         help
62           Enable this option to calculate entries for CRC tables at runtime.
63           This can be helpful when reducing the size of the build image
64
65 config HAVE_ARCH_IOMAP
66         bool
67         help
68           Enable this option if architecture provides io{read,write}{8,16,32}
69           I/O accessor functions.
70
71 config HAVE_PRIVATE_LIBGCC
72         bool
73
74 config LIB_UUID
75         bool
76
77 config SPL_LIB_UUID
78         depends on SPL
79         bool
80
81 config SEMIHOSTING
82         bool "Support semihosting"
83         depends on ARM || RISCV
84         help
85           Semihosting is a method for a target to communicate with a host
86           debugger. It uses special instructions which the debugger will trap
87           on and interpret. This allows U-Boot to read/write files, print to
88           the console, and execute arbitrary commands on the host system.
89
90           Enabling this option will add support for reading and writing files
91           on the host system. If you don't have a debugger attached then trying
92           to do this will likely cause U-Boot to hang. Say 'n' if you are unsure.
93
94 config SEMIHOSTING_FALLBACK
95         bool "Recover gracefully when semihosting fails"
96         depends on SEMIHOSTING && (ARM64 || RISCV)
97         default y
98         help
99           Normally, if U-Boot makes a semihosting call and no debugger is
100           attached, then it will panic due to a synchronous abort
101           exception. This config adds an exception handler which will allow
102           U-Boot to recover. Say 'y' if unsure.
103
104 config SPL_SEMIHOSTING
105         bool "Support semihosting in SPL"
106         depends on SPL && (ARM || RISCV)
107         help
108           Semihosting is a method for a target to communicate with a host
109           debugger. It uses special instructions which the debugger will trap
110           on and interpret. This allows U-Boot to read/write files, print to
111           the console, and execute arbitrary commands on the host system.
112
113           Enabling this option will add support for reading and writing files
114           on the host system. If you don't have a debugger attached then trying
115           to do this will likely cause U-Boot to hang. Say 'n' if you are unsure.
116
117 config SPL_SEMIHOSTING_FALLBACK
118         bool "Recover gracefully when semihosting fails in SPL"
119         depends on SPL_SEMIHOSTING && (ARM64 || RISCV)
120         select ARMV8_SPL_EXCEPTION_VECTORS if ARM64
121         default y
122         help
123           Normally, if U-Boot makes a semihosting call and no debugger is
124           attached, then it will panic due to a synchronous abort
125           exception. This config adds an exception handler which will allow
126           U-Boot to recover. Say 'y' if unsure.
127
128 config PRINTF
129         bool
130         default y
131
132 config SPL_PRINTF
133         bool
134         select SPL_SPRINTF
135         select SPL_STRTO if !SPL_USE_TINY_PRINTF
136
137 config TPL_PRINTF
138         bool
139         select TPL_SPRINTF
140         select TPL_STRTO if !TPL_USE_TINY_PRINTF
141
142 config VPL_PRINTF
143         bool
144         select VPL_SPRINTF
145         select VPL_STRTO if !VPL_USE_TINY_PRINTF
146
147 config SPRINTF
148         bool
149         default y
150
151 config SPL_SPRINTF
152         bool
153
154 config TPL_SPRINTF
155         bool
156
157 config VPL_SPRINTF
158         bool
159
160 config SSCANF
161         bool
162
163 config STRTO
164         bool
165         default y
166
167 config SPL_STRTO
168         bool
169
170 config TPL_STRTO
171         bool
172
173 config VPL_STRTO
174         bool
175
176 config IMAGE_SPARSE
177         bool
178
179 config IMAGE_SPARSE_FILLBUF_SIZE
180         hex "Android sparse image CHUNK_TYPE_FILL buffer size"
181         default 0x80000
182         depends on IMAGE_SPARSE
183         help
184           Set the size of the fill buffer used when processing CHUNK_TYPE_FILL
185           chunks.
186
187 config USE_PRIVATE_LIBGCC
188         bool "Use private libgcc"
189         depends on HAVE_PRIVATE_LIBGCC
190         default y if HAVE_PRIVATE_LIBGCC && ((ARM && !ARM64) || MIPS)
191         help
192           This option allows you to use the built-in libgcc implementation
193           of U-Boot instead of the one provided by the compiler.
194           If unsure, say N.
195
196 config SYS_HZ
197         int
198         default 1000
199         help
200           The frequency of the timer returned by get_timer().
201           get_timer() must operate in milliseconds and this option must be
202           set to 1000.
203
204 config SPL_USE_TINY_PRINTF
205         bool "Enable tiny printf() version in SPL"
206         depends on SPL
207         default y
208         help
209           This option enables a tiny, stripped down printf version.
210           This should only be used in space limited environments,
211           like SPL versions with hard memory limits. This version
212           reduces the code size by about 2.5KiB on armv7.
213
214           The supported format specifiers are %c, %s, %u/%d and %x.
215
216 config TPL_USE_TINY_PRINTF
217         bool "Enable tiny printf() version in TPL"
218         depends on TPL
219         default y if SPL_USE_TINY_PRINTF
220         help
221           This option enables a tiny, stripped down printf version.
222           This should only be used in space limited environments,
223           like SPL versions with hard memory limits. This version
224           reduces the code size by about 2.5KiB on armv7.
225
226           The supported format specifiers are %c, %s, %u/%d and %x.
227
228 config VPL_USE_TINY_PRINTF
229         bool "Enable tiny printf() version for VPL"
230         depends on VPL
231         help
232           This option enables a tiny, stripped down printf version.
233           This should only be used in space limited environments,
234           like SPL versions with hard memory limits. This version
235           reduces the code size by about 2.5KiB on armv7.
236
237           The supported format specifiers are %c, %s, %u/%d and %x.
238
239 config PANIC_HANG
240         bool "Do not reset the system on fatal error"
241         help
242           Define this option to stop the system in case of a fatal error,
243           so that you have to reset it manually. This is probably NOT a good
244           idea for an embedded system where you want the system to reboot
245           automatically as fast as possible, but it may be useful during
246           development since you can try to debug the conditions that lead to
247           the situation.
248
249 config REGEX
250         bool "Enable regular expression support"
251         default y if NET
252         help
253           If this variable is defined, U-Boot is linked against the
254           SLRE (Super Light Regular Expression) library, which adds
255           regex support to some commands, for example "env grep" and
256           "setexpr".
257
258 choice
259         prompt "Pseudo-random library support type"
260         depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID || \
261                    RNG_SANDBOX || UT_LIB && AES || FAT_WRITE
262         default LIB_RAND
263         help
264           Select the library to provide pseudo-random number generator
265           functions.  LIB_HW_RAND supports certain hardware engines that
266           provide this functionality.  If in doubt, select LIB_RAND.
267
268 config LIB_RAND
269         bool "Pseudo-random library support"
270
271 config LIB_HW_RAND
272         bool "HW Engine for random library support"
273
274 endchoice
275
276 config SUPPORT_ACPI
277         bool
278         help
279           Enable this if your arch or board can support generating ACPI
280           (Advanced Configuration and Power Interface) tables. In this case
281           U-Boot can generate these tables and pass them to the Operating
282           System.
283
284 config ACPI
285         bool "Enable support for ACPI libraries"
286         depends on SUPPORT_ACPI
287         help
288           Provides library functions for dealing with ACPI tables. This does
289           not necessarily include generation of tables
290           (see GENERATE_ACPI_TABLE), but allows for tables to be located.
291
292 config GENERATE_ACPI_TABLE
293         bool "Generate an ACPI (Advanced Configuration and Power Interface) table"
294         depends on ACPI
295         select QFW if QEMU
296         help
297           The Advanced Configuration and Power Interface (ACPI) specification
298           provides an open standard for device configuration and management
299           by the operating system. It defines platform-independent interfaces
300           for configuration and power management monitoring.
301
302 config SPL_TINY_MEMSET
303         bool "Use a very small memset() in SPL"
304         depends on SPL
305         help
306           The faster memset() is the arch-specific one (if available) enabled
307           by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
308           better performance by writing a word at a time. But in very
309           size-constrained environments even this may be too big. Enable this
310           option to reduce code size slightly at the cost of some speed.
311
312 config TPL_TINY_MEMSET
313         bool "Use a very small memset() in TPL"
314         depends on TPL
315         help
316           The faster memset() is the arch-specific one (if available) enabled
317           by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
318           better performance by writing a word at a time. But in very
319           size-constrained environments even this may be too big. Enable this
320           option to reduce code size slightly at the cost of some speed.
321
322 config RBTREE
323         bool
324
325 config BITREVERSE
326         bool "Bit reverse library from Linux"
327
328 config TRACE
329         bool "Support for tracing of function calls and timing"
330         imply CMD_TRACE
331         imply TIMER_EARLY
332         help
333           Enables function tracing within U-Boot. This allows recording of call
334           traces including timing information. The command can write data to
335           memory for exporting for analysis (e.g. using bootchart).
336           See doc/README.trace for full details.
337
338 config TRACE_BUFFER_SIZE
339         hex "Size of trace buffer in U-Boot"
340         depends on TRACE
341         default 0x01000000
342         help
343           Sets the size of the trace buffer in U-Boot. This is allocated from
344           memory during relocation. If this buffer is too small, the trace
345           history will be truncated, with later records omitted.
346
347           If early trace is enabled (i.e. before relocation), this buffer must
348           be large enough to include all the data from the early trace buffer as
349           well, since this is copied over to the main buffer during relocation.
350
351           A trace record is emitted for each function call and each record is
352           12 bytes (see struct trace_call). A suggested minimum size is 1MB. If
353           the size is too small then 'trace stats' will show a message saying
354           how many records were dropped due to buffer overflow.
355
356 config TRACE_CALL_DEPTH_LIMIT
357         int "Trace call depth limit"
358         depends on TRACE
359         default 15
360         help
361           Sets the maximum call depth up to which function calls are recorded.
362
363 config TRACE_EARLY
364         bool "Enable tracing before relocation"
365         depends on TRACE
366         help
367           Sometimes it is helpful to trace execution of U-Boot before
368           relocation. This is possible by using a arch-specific, fixed buffer
369           position in memory. Enable this option to start tracing as early as
370           possible after U-Boot starts.
371
372 config TRACE_EARLY_SIZE
373         hex "Size of early trace buffer in U-Boot"
374         depends on TRACE_EARLY
375         default 0x00100000
376         help
377           Sets the size of the early trace buffer in bytes. This is used to hold
378           tracing information before relocation.
379
380 config TRACE_EARLY_CALL_DEPTH_LIMIT
381         int "Early trace call depth limit"
382         depends on TRACE_EARLY
383         default 15
384         help
385           Sets the maximum call depth up to which function calls are recorded
386           during early tracing.
387
388 config TRACE_EARLY_ADDR
389         hex "Address of early trace buffer in U-Boot"
390         depends on TRACE_EARLY
391         default 0x00100000
392         help
393           Sets the address of the early trace buffer in U-Boot. This memory
394           must be accessible before relocation.
395
396           A trace record is emitted for each function call and each record is
397           12 bytes (see struct trace_call). A suggested minimum size is 1MB. If
398           the size is too small then the message which says the amount of early
399           data being coped will the the same as the
400
401 config CIRCBUF
402         bool "Enable circular buffer support"
403
404 source lib/dhry/Kconfig
405
406 menu "Security support"
407
408 config AES
409         bool "Support the AES algorithm"
410         help
411           This provides a means to encrypt and decrypt data using the AES
412           (Advanced Encryption Standard). This algorithm uses a symetric key
413           and is widely used as a streaming cipher. Different key lengths are
414           supported by the algorithm but only a 128-bit key is supported at
415           present.
416
417 source lib/ecdsa/Kconfig
418 source lib/rsa/Kconfig
419 source lib/crypto/Kconfig
420 source lib/crypt/Kconfig
421
422 config TPM
423         bool "Trusted Platform Module (TPM) Support"
424         depends on DM
425         imply DM_RNG
426         help
427           This enables support for TPMs which can be used to provide security
428           features for your board. The TPM can be connected via LPC or I2C
429           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
430           command to interactive the TPM. Driver model support is provided
431           for the low-level TPM interface, but only one TPM is supported at
432           a time by the TPM library.
433
434 config SPL_TPM
435         bool "Trusted Platform Module (TPM) Support in SPL"
436         depends on SPL_DM
437         imply SPL_CRC8
438         help
439           This enables support for TPMs which can be used to provide security
440           features for your board. The TPM can be connected via LPC or I2C
441           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
442           command to interactive the TPM. Driver model support is provided
443           for the low-level TPM interface, but only one TPM is supported at
444           a time by the TPM library.
445
446 config TPL_TPM
447         bool "Trusted Platform Module (TPM) Support in TPL"
448         depends on TPL_DM
449         help
450           This enables support for TPMs which can be used to provide security
451           features for your board. The TPM can be connected via LPC or I2C
452           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
453           command to interactive the TPM. Driver model support is provided
454           for the low-level TPM interface, but only one TPM is supported at
455           a time by the TPM library.
456
457 config VPL_TPM
458         bool "Trusted Platform Module (TPM) Support in VPL"
459         depends on VPL_DM
460         help
461           This enables support for TPMs which can be used to provide security
462           features for your board. The TPM can be connected via LPC or I2C
463           and a sandbox TPM is provided for testing purposes. Use the 'tpm'
464           command to interactive the TPM. Driver model support is provided
465           for the low-level TPM interface, but only one TPM is supported at
466           a time by the TPM library.
467
468 endmenu
469
470 menu "Android Verified Boot"
471
472 config LIBAVB
473         bool "Android Verified Boot 2.0 support"
474         depends on ANDROID_BOOT_IMAGE
475         help
476           This enables support of Android Verified Boot 2.0 which can be used
477           to assure the end user of the integrity of the software running on a
478           device. Introduces such features as boot chain of trust, rollback
479           protection etc.
480
481 endmenu
482
483 menu "Hashing Support"
484
485 config BLAKE2
486         bool "Enable BLAKE2 support"
487         help
488           This option enables support of hashing using BLAKE2B algorithm.
489           The hash is calculated in software.
490           The BLAKE2 algorithm produces a hash value (digest) between 1 and
491           64 bytes.
492
493 config SHA1
494         bool "Enable SHA1 support"
495         help
496           This option enables support of hashing using SHA1 algorithm.
497           The hash is calculated in software.
498           The SHA1 algorithm produces a 160-bit (20-byte) hash value
499           (digest).
500
501 config SHA256
502         bool "Enable SHA256 support"
503         help
504           This option enables support of hashing using SHA256 algorithm.
505           The hash is calculated in software.
506           The SHA256 algorithm produces a 256-bit (32-byte) hash value
507           (digest).
508
509 config SHA512
510         bool "Enable SHA512 support"
511         default y if TI_SECURE_DEVICE && FIT_SIGNATURE
512         help
513           This option enables support of hashing using SHA512 algorithm.
514           The hash is calculated in software.
515           The SHA512 algorithm produces a 512-bit (64-byte) hash value
516           (digest).
517
518 config SHA384
519         bool "Enable SHA384 support"
520         select SHA512
521         help
522           This option enables support of hashing using SHA384 algorithm.
523           The hash is calculated in software. This is also selects SHA512,
524           because these implementations share the bulk of the code..
525           The SHA384 algorithm produces a 384-bit (48-byte) hash value
526           (digest).
527
528 config SHA_HW_ACCEL
529         bool "Enable hardware acceleration for SHA hash functions"
530         help
531           This option enables hardware acceleration for the SHA1 and SHA256
532           hashing algorithms. This affects the 'hash' command and also the
533           hash_lookup_algo() function.
534
535 if SPL
536
537 config SPL_CRC32
538         bool "Enable CRC32 support in SPL"
539         default y if SPL_LEGACY_IMAGE_SUPPORT || SPL_EFI_PARTITION
540         default y if SPL_ENV_SUPPORT || TPL_BLOBLIST
541         help
542           This option enables support of hashing using CRC32 algorithm.
543           The CRC32 algorithm produces 32-bit checksum value. For FIT
544           images, this is the least secure type of checksum, suitable for
545           detected accidental image corruption. For secure applications you
546           should consider SHA256 or SHA384.
547
548 config SPL_SHA1
549         bool "Enable SHA1 support in SPL"
550         default y if SHA1
551         help
552           This option enables support of hashing using SHA1 algorithm.
553           The hash is calculated in software.
554           The SHA1 algorithm produces a 160-bit (20-byte) hash value
555           (digest).
556
557 config SPL_SHA256
558         bool "Enable SHA256 support in SPL"
559         default y if SHA256
560         help
561           This option enables support of hashing using SHA256 algorithm.
562           The hash is calculated in software.
563           The SHA256 algorithm produces a 256-bit (32-byte) hash value
564           (digest).
565
566 config SPL_SHA512
567         bool "Enable SHA512 support in SPL"
568         default y if SHA512
569         help
570           This option enables support of hashing using SHA512 algorithm.
571           The hash is calculated in software.
572           The SHA512 algorithm produces a 512-bit (64-byte) hash value
573           (digest).
574
575 config SPL_SHA384
576         bool "Enable SHA384 support in SPL"
577         default y if SHA384
578         select SPL_SHA512
579         help
580           This option enables support of hashing using SHA384 algorithm.
581           The hash is calculated in software. This is also selects SHA512,
582           because these implementations share the bulk of the code..
583           The SHA384 algorithm produces a 384-bit (48-byte) hash value
584           (digest).
585
586 config SPL_SHA_HW_ACCEL
587         bool "Enable hardware acceleration for SHA hash functions"
588         default y if SHA_HW_ACCEL
589         help
590           This option enables hardware acceleration for the SHA1 and SHA256
591           hashing algorithms. This affects the 'hash' command and also the
592           hash_lookup_algo() function.
593
594 config SPL_SHA_PROG_HW_ACCEL
595         bool "Enable Progressive hashing support using hardware in SPL"
596         depends on SHA_PROG_HW_ACCEL
597         default y
598         help
599           This option enables hardware-acceleration for SHA progressive
600           hashing.
601           Data can be streamed in a block at a time and the hashing is
602           performed in hardware.
603
604 endif
605
606 config VPL_SHA1
607         bool "Enable SHA1 support in VPL"
608         depends on VPL
609         default y if SHA1
610         help
611           This option enables support of hashing using SHA1 algorithm.
612           The hash is calculated in software.
613           The SHA1 algorithm produces a 160-bit (20-byte) hash value
614           (digest).
615
616 config VPL_SHA256
617         bool "Enable SHA256 support in VPL"
618         depends on VPL
619         default y if SHA256
620         help
621           This option enables support of hashing using SHA256 algorithm.
622           The hash is calculated in software.
623           The SHA256 algorithm produces a 256-bit (32-byte) hash value
624           (digest).
625
626 if SHA_HW_ACCEL
627
628 config SHA512_HW_ACCEL
629         bool "Enable hardware acceleration for SHA512"
630         depends on SHA512
631         help
632           This option enables hardware acceleration for the SHA384 and SHA512
633           hashing algorithms. This affects the 'hash' command and also the
634           hash_lookup_algo() function.
635
636 config SHA_PROG_HW_ACCEL
637         bool "Enable Progressive hashing support using hardware"
638         help
639           This option enables hardware-acceleration for SHA progressive
640           hashing.
641           Data can be streamed in a block at a time and the hashing is
642           performed in hardware.
643
644 endif
645
646 config MD5
647         bool "Support MD5 algorithm"
648         help
649           This option enables MD5 support. MD5 is an algorithm designed
650           in 1991 that produces a 16-byte digest (or checksum) from its input
651           data. It has a number of vulnerabilities which preclude its use in
652           security applications, but it can be useful for providing a quick
653           checksum of a block of data.
654
655 config SPL_MD5
656         bool "Support MD5 algorithm in SPL"
657         depends on SPL
658         help
659           This option enables MD5 support in SPL. MD5 is an algorithm designed
660           in 1991 that produces a 16-byte digest (or checksum) from its input
661           data. It has a number of vulnerabilities which preclude its use in
662           security applications, but it can be useful for providing a quick
663           checksum of a block of data.
664
665 config CRC8
666         def_bool y
667         help
668           Enables CRC8 support in U-Boot. This is normally required. CRC8 is
669           a simple and fast checksumming algorithm which does a bytewise
670           checksum with feedback to produce an 8-bit result. The code is small
671           and it does not require a lookup table (unlike CRC32).
672
673 config SPL_CRC8
674         bool "Support CRC8 in SPL"
675         depends on SPL
676         help
677           Enables CRC8 support in SPL. This is not normally required. CRC8 is
678           a simple and fast checksumming algorithm which does a bytewise
679           checksum with feedback to produce an 8-bit result. The code is small
680           and it does not require a lookup table (unlike CRC32).
681
682 config CRC32
683         def_bool y
684         help
685           Enables CRC32 support in U-Boot. This is normally required.
686
687 config CRC32C
688         bool
689
690 config XXHASH
691         bool
692
693 endmenu
694
695 menu "Compression Support"
696
697 config LZ4
698         bool "Enable LZ4 decompression support"
699         help
700           If this option is set, support for LZ4 compressed images
701           is included. The LZ4 algorithm can run in-place as long as the
702           compressed image is loaded to the end of the output buffer, and
703           trades lower compression ratios for much faster decompression.
704
705           NOTE: This implements the release version of the LZ4 frame
706           format as generated by default by the 'lz4' command line tool.
707           This is not the same as the outdated, less efficient legacy
708           frame format currently (2015) implemented in the Linux kernel
709           (generated by 'lz4 -l'). The two formats are incompatible.
710
711 config LZMA
712         bool "Enable LZMA decompression support"
713         help
714           This enables support for LZMA (Lempel-Ziv-Markov chain algorithm),
715           a dictionary compression algorithm that provides a high compression
716           ratio and fairly fast decompression speed. See also
717           CONFIG_CMD_LZMADEC which provides a decode command.
718
719 config LZO
720         bool "Enable LZO decompression support"
721         help
722           This enables support for the LZO compression algorithm.
723
724 config GZIP
725         bool "Enable gzip decompression support"
726         select ZLIB
727         default y
728         help
729           This enables support for GZIP compression algorithm.
730
731 config ZLIB_UNCOMPRESS
732         bool "Enables zlib's uncompress() functionality"
733         help
734           This enables an extra zlib functionality: the uncompress() function,
735           which decompresses data from a buffer into another, knowing their
736           sizes. Unlike gunzip(), there is no header parsing.
737
738 config GZIP_COMPRESSED
739         bool
740         select ZLIB
741
742 config BZIP2
743         bool "Enable bzip2 decompression support"
744         help
745           This enables support for BZIP2 compression algorithm.
746
747 config ZLIB
748         bool
749         default y
750         help
751           This enables ZLIB compression lib.
752
753 config ZSTD
754         bool "Enable Zstandard decompression support"
755         select XXHASH
756         help
757           This enables Zstandard decompression library.
758
759 if ZSTD
760
761 config ZSTD_LIB_MINIFY
762         bool "Minify Zstandard code"
763         default y
764         help
765           This disables various optional components and changes the
766           compilation flags to prioritize space-saving.
767
768           For detailed info, see zstd's lib/README.md
769
770           https://github.com/facebook/zstd/blob/dev/lib/README.md
771
772 endif
773
774 config SPL_BZIP2
775         bool "Enable bzip2 decompression support for SPL build"
776         depends on SPL
777         help
778           This enables support for bzip2 compression algorithm for SPL boot.
779
780 config SPL_LZ4
781         bool "Enable LZ4 decompression support in SPL"
782         depends on SPL
783         help
784           This enables support for the LZ4 decompression algorithm in SPL. LZ4
785           is a lossless data compression algorithm that is focused on
786           fast compression and decompression speed. It belongs to the LZ77
787           family of byte-oriented compression schemes.
788
789 config SPL_LZMA
790         bool "Enable LZMA decompression support for SPL build"
791         depends on SPL
792         help
793           This enables support for LZMA compression algorithm for SPL boot.
794
795 config VPL_LZMA
796         bool "Enable LZMA decompression support for VPL build"
797         default y if LZMA
798         help
799           This enables support for LZMA compression algorithm for VPL boot.
800
801 config SPL_LZO
802         bool "Enable LZO decompression support in SPL"
803         depends on SPL
804         help
805           This enables support for LZO compression algorithm in the SPL.
806
807 config SPL_GZIP
808         bool "Enable gzip decompression support for SPL build"
809         select SPL_ZLIB
810         help
811           This enables support for the GZIP compression algorithm for SPL boot.
812
813 config SPL_ZLIB
814         bool
815         help
816           This enables compression lib for SPL boot.
817
818 config SPL_ZSTD
819         bool "Enable Zstandard decompression support in SPL"
820         depends on SPL
821         select XXHASH
822         help
823           This enables Zstandard decompression library in the SPL.
824
825 endmenu
826
827 config ERRNO_STR
828         bool "Enable function for getting errno-related string message"
829         help
830           The function errno_str(int errno), returns a pointer to the errno
831           corresponding text message:
832           - if errno is null or positive number - a pointer to "Success" message
833           - if errno is negative - a pointer to errno related message
834
835 config HEXDUMP
836         bool "Enable hexdump"
837         help
838           This enables functions for printing dumps of binary data.
839
840 config SPL_HEXDUMP
841         bool "Enable hexdump in SPL"
842         depends on SPL && HEXDUMP
843         help
844           This enables functions for printing dumps of binary data in
845           SPL.
846
847 config GETOPT
848         bool "Enable getopt"
849         help
850           This enables functions for parsing command-line options.
851
852 config OF_LIBFDT
853         bool "Enable the FDT library"
854         default y if OF_CONTROL
855         help
856           This enables the FDT library (libfdt). It provides functions for
857           accessing binary device tree images in memory, such as adding and
858           removing nodes and properties, scanning through the tree and finding
859           particular compatible nodes. The library operates on a flattened
860           version of the device tree.
861
862 config OF_LIBFDT_ASSUME_MASK
863         hex "Mask of conditions to assume for libfdt"
864         depends on OF_LIBFDT || FIT
865         default 0
866         help
867           Use this to change the assumptions made by libfdt about the
868           device tree it is working with. A value of 0 means that no assumptions
869           are made, and libfdt is able to deal with malicious data. A value of
870           0xff means all assumptions are made and any invalid data may cause
871           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
872
873 config OF_LIBFDT_OVERLAY
874         bool "Enable the FDT library overlay support"
875         depends on OF_LIBFDT
876         default y if ARCH_OMAP2PLUS || ARCH_KEYSTONE
877         help
878           This enables the FDT library (libfdt) overlay support.
879
880 config SYS_FDT_PAD
881         hex "Maximum size of the FDT memory area passeed to the OS"
882         depends on OF_LIBFDT
883         default 0x13000 if FMAN_ENET || QE || U_QE
884         default 0x3000
885         help
886           During OS boot, we allocate a region of memory within the bootmap
887           for the FDT. This is the size that we will expand the FDT that we
888           are using will be extended to be, in bytes.
889
890 config SPL_OF_LIBFDT
891         bool "Enable the FDT library for SPL"
892         depends on SPL_LIBGENERIC_SUPPORT
893         default y if SPL_OF_CONTROL
894         help
895           This enables the FDT library (libfdt). It provides functions for
896           accessing binary device tree images in memory, such as adding and
897           removing nodes and properties, scanning through the tree and finding
898           particular compatible nodes. The library operates on a flattened
899           version of the device tree.
900
901 config SPL_OF_LIBFDT_ASSUME_MASK
902         hex "Mask of conditions to assume for libfdt"
903         depends on SPL_OF_LIBFDT || (FIT && SPL)
904         default 0xff
905         help
906           Use this to change the assumptions made by libfdt in SPL about the
907           device tree it is working with. A value of 0 means that no assumptions
908           are made, and libfdt is able to deal with malicious data. A value of
909           0xff means all assumptions are made and any invalid data may cause
910           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
911
912 config TPL_OF_LIBFDT
913         bool "Enable the FDT library for TPL"
914         depends on TPL_LIBGENERIC_SUPPORT
915         default y if TPL_OF_CONTROL
916         help
917           This enables the FDT library (libfdt). It provides functions for
918           accessing binary device tree images in memory, such as adding and
919           removing nodes and properties, scanning through the tree and finding
920           particular compatible nodes. The library operates on a flattened
921           version of the device tree.
922
923 config TPL_OF_LIBFDT_ASSUME_MASK
924         hex "Mask of conditions to assume for libfdt"
925         depends on TPL_OF_LIBFDT || (FIT && TPL)
926         default 0xff
927         help
928           Use this to change the assumptions made by libfdt in TPL about the
929           device tree it is working with. A value of 0 means that no assumptions
930           are made, and libfdt is able to deal with malicious data. A value of
931           0xff means all assumptions are made and any invalid data may cause
932           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
933
934 config VPL_OF_LIBFDT
935         bool "Enable the FDT library for VPL"
936         depends on VPL
937         default y if VPL_OF_CONTROL && !VPL_OF_PLATDATA
938         help
939           This enables the FDT library (libfdt). It provides functions for
940           accessing binary device tree images in memory, such as adding and
941           removing nodes and properties, scanning through the tree and finding
942           particular compatible nodes. The library operates on a flattened
943           version of the device tree.
944
945 config VPL_OF_LIBFDT_ASSUME_MASK
946         hex "Mask of conditions to assume for libfdt"
947         depends on VPL_OF_LIBFDT || (FIT && VPL)
948         default 0xff
949         help
950           Use this to change the assumptions made by libfdt in SPL about the
951           device tree it is working with. A value of 0 means that no assumptions
952           are made, and libfdt is able to deal with malicious data. A value of
953           0xff means all assumptions are made and any invalid data may cause
954           unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
955
956 config FDT_FIXUP_PARTITIONS
957         bool "overwrite MTD partitions in DTS through defined in 'mtdparts'"
958         depends on OF_LIBFDT
959         depends on CMD_MTDPARTS
960         help
961           Allow overwriting defined partitions in the device tree blob
962           using partition info defined in the 'mtdparts' environment
963           variable.
964
965 menu "System tables"
966         depends on (!EFI && !SYS_COREBOOT) || (ARM && EFI_LOADER)
967
968 config BLOBLIST_TABLES
969         bool "Put tables in a bloblist"
970         depends on X86 && BLOBLIST
971         help
972           Normally tables are placed at address 0xf0000 and can be up to 64KB
973           long. With this option, tables are instead placed in the bloblist
974           with a pointer from 0xf0000. The size can then be larger and the
975           tables can be placed high in memory.
976
977 config GENERATE_SMBIOS_TABLE
978         bool "Generate an SMBIOS (System Management BIOS) table"
979         default y
980         depends on X86 || EFI_LOADER
981         help
982           The System Management BIOS (SMBIOS) specification addresses how
983           motherboard and system vendors present management information about
984           their products in a standard format by extending the BIOS interface
985           on Intel architecture systems.
986
987           Check http://www.dmtf.org/standards/smbios for details.
988
989           See also SMBIOS_SYSINFO which allows SMBIOS values to be provided in
990           the devicetree.
991
992 config LIB_RATIONAL
993         bool "enable continued fraction calculation routines"
994
995 config SPL_LIB_RATIONAL
996         bool "enable continued fraction calculation routines for SPL"
997         depends on SPL
998
999 endmenu
1000
1001 config ASN1_COMPILER
1002         bool
1003         help
1004           ASN.1 (Abstract Syntax Notation One) is a standard interface
1005           description language for defining data structures that can be
1006           serialized and deserialized in a cross-platform way. It is
1007           broadly used in telecommunications and computer networking,
1008           and especially in cryptography (https://en.wikipedia.org/wiki/ASN.1).
1009           This option enables the support of the asn1 compiler.
1010
1011 config ASN1_DECODER
1012         bool
1013         help
1014           ASN.1 (Abstract Syntax Notation One) is a standard interface
1015           description language for defining data structures that can be
1016           serialized and deserialized in a cross-platform way. It is
1017           broadly used in telecommunications and computer networking,
1018           and especially in cryptography (https://en.wikipedia.org/wiki/ASN.1).
1019           This option enables the support of the asn1 decoder.
1020
1021 config SPL_ASN1_DECODER
1022         bool
1023         help
1024           ASN.1 (Abstract Syntax Notation One) is a standard interface
1025           description language for defining data structures that can be
1026           serialized and deserialized in a cross-platform way. It is
1027           broadly used in telecommunications and computer networking,
1028           and especially in cryptography (https://en.wikipedia.org/wiki/ASN.1).
1029           This option enables the support of the asn1 decoder in the SPL.
1030
1031 config OID_REGISTRY
1032         bool
1033         help
1034           In computing, object identifiers or OIDs are an identifier mechanism
1035           standardized by the International Telecommunication Union (ITU) and
1036           ISO/IEC for naming any object, concept, or "thing" with a globally
1037           unambiguous persistent name (https://en.wikipedia.org/wiki/Object_identifier).
1038           Enable fast lookup object identifier registry.
1039
1040 config SPL_OID_REGISTRY
1041         bool
1042         help
1043           In computing, object identifiers or OIDs are an identifier mechanism
1044           standardized by the International Telecommunication Union (ITU) and
1045           ISO/IEC for naming any object, concept, or "thing" with a globally
1046           unambiguous persistent name (https://en.wikipedia.org/wiki/Object_identifier).
1047           Enable fast lookup object identifier registry in the SPL.
1048
1049 config SMBIOS_PARSER
1050         bool "SMBIOS parser"
1051         help
1052           A simple parser for SMBIOS data.
1053
1054 source lib/efi/Kconfig
1055 source lib/efi_loader/Kconfig
1056 source lib/optee/Kconfig
1057
1058 config TEST_FDTDEC
1059         bool "enable fdtdec test"
1060         depends on OF_LIBFDT
1061
1062 config LIB_DATE
1063         bool
1064
1065 config LIB_ELF
1066         bool
1067         help
1068           Support basic elf loading/validating functions.
1069           This supports for 32 bit and 64 bit versions.
1070
1071 config LMB
1072         bool "Enable the logical memory blocks library (lmb)"
1073         default y if ARC || ARM || M68K || MICROBLAZE || MIPS || \
1074                      NIOS2 || PPC || RISCV || SANDBOX || SH || X86 || XTENSA
1075         help
1076           Support the library logical memory blocks.
1077
1078 config LMB_USE_MAX_REGIONS
1079         bool "Use a common number of memory and reserved regions in lmb lib"
1080         default y
1081         help
1082           Define the number of supported memory regions in the library logical
1083           memory blocks.
1084           This feature allow to reduce the lmb library size by using compiler
1085           optimization when LMB_MEMORY_REGIONS == LMB_RESERVED_REGIONS.
1086
1087 config LMB_MAX_REGIONS
1088         int "Number of memory and reserved regions in lmb lib"
1089         depends on LMB_USE_MAX_REGIONS
1090         default 16
1091         help
1092           Define the number of supported regions, memory and reserved, in the
1093           library logical memory blocks.
1094
1095 config LMB_MEMORY_REGIONS
1096         int "Number of memory regions in lmb lib"
1097         depends on !LMB_USE_MAX_REGIONS
1098         default 8
1099         help
1100           Define the number of supported memory regions in the library logical
1101           memory blocks.
1102           The minimal value is CONFIG_NR_DRAM_BANKS.
1103
1104 config LMB_RESERVED_REGIONS
1105         int "Number of reserved regions in lmb lib"
1106         depends on !LMB_USE_MAX_REGIONS
1107         default 8
1108         help
1109           Define the number of supported reserved regions in the library logical
1110           memory blocks.
1111
1112 config PHANDLE_CHECK_SEQ
1113         bool "Enable phandle check while getting sequence number"
1114         help
1115           When there are multiple device tree nodes with same name,
1116           enable this config option to distinguish them using
1117           phandles in fdtdec_get_alias_seq() function.
1118
1119 endmenu
1120
1121 menu "FWU Multi Bank Updates"
1122
1123 source lib/fwu_updates/Kconfig
1124
1125 endmenu