72aacab52cbe6a8dcf34552cb2491fb0d632c8a2
[platform/kernel/u-boot.git] / common / spl / Kconfig
1 menu "SPL / TPL"
2
3 config SUPPORT_SPL
4         bool
5
6 config SUPPORT_TPL
7         bool
8
9 config SPL
10         bool
11         depends on SUPPORT_SPL
12         prompt "Enable SPL"
13         help
14           If you want to build SPL as well as the normal image, say Y.
15
16 config SPL_SYS_MALLOC_SIMPLE
17         bool
18         depends on SPL
19         prompt "Only use malloc_simple functions in the SPL"
20         help
21           Say Y here to only use the *_simple malloc functions from
22           malloc_simple.c, rather then using the versions from dlmalloc.c;
23           this will make the SPL binary smaller at the cost of more heap
24           usage as the *_simple malloc functions do not re-use free-ed mem.
25
26 config SPL_STACK_R
27         depends on SPL
28         bool "Enable SDRAM location for SPL stack"
29         help
30           SPL starts off execution in SRAM and thus typically has only a small
31           stack available. Since SPL sets up DRAM while in its board_init_f()
32           function, it is possible for the stack to move there before
33           board_init_r() is reached. This option enables a special SDRAM
34           location for the SPL stack. U-Boot SPL switches to this after
35           board_init_f() completes, and before board_init_r() starts.
36
37 config SPL_STACK_R_ADDR
38         depends on SPL_STACK_R
39         hex "SDRAM location for SPL stack"
40         help
41           Specify the address in SDRAM for the SPL stack. This will be set up
42           before board_init_r() is called.
43
44 config SPL_STACK_R_MALLOC_SIMPLE_LEN
45         depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
46         hex "Size of malloc_simple heap after switching to DRAM SPL stack"
47         default 0x100000
48         help
49           Specify the amount of the stack to use as memory pool for
50           malloc_simple after switching the stack to DRAM. This may be set
51           to give board_init_r() a larger heap then the initial heap in
52           SRAM which is limited to SYS_MALLOC_F_LEN bytes.
53
54 config SPL_SEPARATE_BSS
55         depends on SPL
56         bool "BSS section is in a different memory region from text"
57         help
58           Some platforms need a large BSS region in SPL and can provide this
59           because RAM is already set up. In this case BSS can be moved to RAM.
60           This option should then be enabled so that the correct device tree
61           location is used. Normally we put the device tree at the end of BSS
62           but with this option enabled, it goes at _image_binary_end.
63
64 config SPL_DISPLAY_PRINT
65         depends on SPL
66         bool "Display a board-specific message in SPL"
67         help
68           If this option is enabled, U-Boot will call the function
69           spl_display_print() immediately after displaying the SPL console
70           banner ("U-Boot SPL ..."). This function should be provided by
71           the board.
72
73 config TPL
74         bool
75         depends on SPL && SUPPORT_TPL
76         prompt "Enable TPL"
77         help
78           If you want to build TPL as well as the normal image and SPL, say Y.
79
80 config SPL_CRC32_SUPPORT
81         bool "Support CRC32"
82         depends on SPL_FIT
83         help
84           Enable this to support CRC32 in FIT images within SPL. This is a
85           32-bit checksum value that can be used to verify images. This is
86           the least secure type of checksum, suitable for detected
87           accidental image corruption. For secure applications you should
88           consider SHA1 or SHA256.
89
90 config SPL_MD5_SUPPORT
91         bool "Support MD5"
92         depends on SPL_FIT
93         help
94           Enable this to support MD5 in FIT images within SPL. An MD5
95           checksum is a 128-bit hash value used to check that the image
96           contents have not been corrupted. Note that MD5 is not considered
97           secure as it is possible (with a brute-force attack) to adjust the
98           image while still retaining the same MD5 hash value. For secure
99           applications where images may be changed maliciously, you should
100           consider SHA1 or SHA256.
101
102 config SPL_SHA1_SUPPORT
103         bool "Support SHA1"
104         depends on SPL_FIT
105         help
106           Enable this to support SHA1 in FIT images within SPL. A SHA1
107           checksum is a 160-bit (20-byte) hash value used to check that the
108           image contents have not been corrupted or maliciously altered.
109           While SHA1 is fairly secure it is coming to the end of its life
110           due to the expanding computing power avaiable to brute-force
111           attacks. For more security, consider SHA256.
112
113 config SPL_SHA256_SUPPORT
114         bool "Support SHA256"
115         depends on SPL_FIT
116         help
117           Enable this to support SHA256 in FIT images within SPL. A SHA256
118           checksum is a 256-bit (32-byte) hash value used to check that the
119           image contents have not been corrupted. SHA256 is recommended for
120           use in secure applications since (as at 2016) there is no known
121           feasible attack that could produce a 'collision' with differing
122           input data. Use this for the highest security. Note that only the
123           SHA256 variant is supported: SHA512 and others are not currently
124           supported in U-Boot.
125
126 config SPL_CRYPTO_SUPPORT
127         bool "Support crypto drivers"
128         depends on SPL
129         help
130           Enable crypto drivers in SPL. These drivers can be used to
131           accelerate secure boot processing in secure applications. Enable
132           this option to build the drivers in drivers/crypto as part of an
133           SPL build.
134
135 config SPL_HASH_SUPPORT
136         bool "Support hashing drivers"
137         depends on SPL
138         help
139           Enable hashing drivers in SPL. These drivers can be used to
140           accelerate secure boot processing in secure applications. Enable
141           this option to build system-specific drivers for hash acceleration
142           as part of an SPL build.
143
144 config SPL_DMA_SUPPORT
145         bool "Support DMA drivers"
146         depends on SPL
147         help
148           Enable DMA (direct-memory-access) drivers in SPL. These drivers
149           can be used to handle memory-to-peripheral data transfer without
150           the CPU moving the data. Enable this option to build the drivers
151           in drivers/dma as part of an SPL build.
152
153 config SPL_DRIVERS_MISC_SUPPORT
154         bool "Support misc drivers"
155         depends on SPL
156         help
157           Enable miscellaneous drivers in SPL. These drivers perform various
158           tasks that don't fall nicely into other categories, Enable this
159           option to build the drivers in drivers/misc as part of an SPL
160           build, for those that support building in SPL (not all drivers do).
161
162 config SPL_ENV_SUPPORT
163         bool "Support an environment"
164         depends on SPL
165         help
166           Enable environment support in SPL. The U-Boot environment provides
167           a number of settings (essentially name/value pairs) which can
168           control many aspects of U-Boot's operation. Normally this is not
169           needed in SPL as it has a much simpler task with less
170           configuration. But some boards use this to support 'Falcon' boot
171           on EXT2 and FAT, where SPL boots directly into Linux without
172           starting U-Boot first. Enabling this option will make getenv()
173           and setenv() available in SPL.
174
175 config SPL_SAVEENV
176         bool "Support save environment"
177         depends on SPL && SPL_ENV_SUPPORT
178         help
179           Enable save environment support in SPL after setenv. By default
180           the saveenv option is not provided in SPL, but some boards need
181           this support in 'Falcon' boot, where SPL need to boot from
182           different images based on environment variable set by OS. For
183           example OS may set "reboot_image" environment variable to
184           "recovery" inorder to boot recovery image by SPL. The SPL read
185           "reboot_image" and act accordingly and change the reboot_image
186           to default mode using setenv and save the environemnt.
187
188 config SPL_ETH_SUPPORT
189         bool "Support Ethernet"
190         depends on SPL_ENV_SUPPORT
191         help
192           Enable access to the network subsystem and associated Ethernet
193           drivers in SPL. This permits SPL to load U-Boot over an Ethernet
194           link rather than from an on-board peripheral. Environment support
195           is required since the network stack uses a number of environment
196           variables. See also SPL_NET_SUPPORT.
197
198 config SPL_EXT_SUPPORT
199         bool "Support EXT filesystems"
200         depends on SPL
201         help
202           Enable support for EXT2/3/4 filesystems with SPL. This permits
203           U-Boot (or Linux in Falcon mode) to be loaded from an EXT
204           filesystem from within SPL. Support for the underlying block
205           device (e.g. MMC or USB) must be enabled separately.
206
207 config SPL_FAT_SUPPORT
208         bool "Support FAT filesystems"
209         depends on SPL
210         help
211           Enable support for FAT and VFAT filesystems with SPL. This
212           permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
213           filesystem from within SPL. Support for the underlying block
214           device (e.g. MMC or USB) must be enabled separately.
215
216 config SPL_FPGA_SUPPORT
217         bool "Support FPGAs"
218         depends on SPL
219         help
220           Enable support for FPGAs in SPL. Field-programmable Gate Arrays
221           provide software-configurable hardware which is typically used to
222           implement peripherals (such as UARTs, LCD displays, MMC) or
223           accelerate custom processing functions, such as image processing
224           or machine learning. Sometimes it is useful to program the FPGA
225           as early as possible during boot, and this option can enable that
226           within SPL.
227
228 config SPL_GPIO_SUPPORT
229         bool "Support GPIO"
230         depends on SPL
231         help
232           Enable support for GPIOs (General-purpose Input/Output) in SPL.
233           GPIOs allow U-Boot to read the state of an input line (high or
234           low) and set the state of an output line. This can be used to
235           drive LEDs, control power to various system parts and read user
236           input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED,
237           for example. Enable this option to build the drivers in
238           drivers/gpio as part of an SPL build.
239
240 config SPL_I2C_SUPPORT
241         bool "Support I2C"
242         depends on SPL
243         help
244           Enable support for the I2C (Inter-Integrated Circuit) bus in SPL.
245           I2C works with a clock and data line which can be driven by a
246           one or more masters or slaves. It is a fairly complex bus but is
247           widely used as it only needs two lines for communication. Speeds of
248           400kbps are typical but up to 3.4Mbps is supported by some
249           hardware. I2C can be useful in SPL to configure power management
250           ICs (PMICs) before raising the CPU clock speed, for example.
251           Enable this option to build the drivers in drivers/i2c as part of
252           an SPL build.
253
254 config SPL_LIBCOMMON_SUPPORT
255         bool "Support common libraries"
256         depends on SPL
257         help
258           Enable support for common U-Boot libraries within SPL. These
259           libraries include common code to deal with U-Boot images,
260           environment and USB, for example. This option is enabled on many
261           boards. Enable this option to build the code in common/ as part of
262           an SPL build.
263
264 config SPL_LIBDISK_SUPPORT
265         bool "Support disk paritions"
266         depends on SPL
267         help
268           Enable support for disk partitions within SPL. 'Disk' is something
269           of a misnomer as it includes non-spinning media such as flash (as
270           used in MMC and USB sticks). Partitions provide a way for a disk
271           to be split up into separate regions, with a partition table placed
272           at the start or end which describes the location and size of each
273           'partition'. These partitions are typically uses as individual block
274           devices, typically with an EXT2 or FAT filesystem in each. This
275           option enables whatever partition support has been enabled in
276           U-Boot to also be used in SPL. It brings in the code in disk/.
277
278 config SPL_LIBGENERIC_SUPPORT
279         bool "Support generic libraries"
280         depends on SPL
281         help
282           Enable support for generic U-Boot libraries within SPL. These
283           libraries include generic code to deal with device tree, hashing,
284           printf(), compression and the like. This option is enabled on many
285           boards. Enable this option to build the code in lib/ as part of an
286           SPL build.
287
288 config SPL_MMC_SUPPORT
289         bool "Support MMC"
290         depends on SPL
291         help
292           Enable support for MMC (Multimedia Card) within SPL. This enables
293           the MMC protocol implementation and allows any enabled drivers to
294           be used within SPL. MMC can be used with or without disk partition
295           support depending on the application (SPL_LIBDISK_SUPPORT). Enable
296           this option to build the drivers in drivers/mmc as part of an SPL
297           build.
298
299 config SPL_MPC8XXX_INIT_DDR_SUPPORT
300         bool "Support MPC8XXX DDR init"
301         depends on SPL
302         help
303           Enable support for DDR-SDRAM (double-data-rate synchronous dynamic
304           random-access memory) on the MPC8XXX family within SPL. This
305           allows DRAM to be set up before loading U-Boot into that DRAM,
306           where it can run.
307
308 config SPL_MTD_SUPPORT
309         bool "Support MTD drivers"
310         depends on SPL
311         help
312           Enable support for MTD (Memory Technology Device) within SPL. MTD
313           provides a block interface over raw NAND and can also be used with
314           SPI flash. This allows SPL to load U-Boot from supported MTD
315           devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how
316           to enable specific MTD drivers.
317
318 config SPL_MUSB_NEW_SUPPORT
319         bool "Support new Mentor Graphics USB"
320         depends on SPL
321         help
322           Enable support for Mentor Graphics USB in SPL. This is a new
323           driver used by some boards. Enable this option to build
324           the drivers in drivers/usb/musb-new as part of an SPL build. The
325           old drivers are in drivers/usb/musb.
326
327 config SPL_NAND_SUPPORT
328         bool "Support NAND flash"
329         depends on SPL
330         help
331           Enable support for NAND (Negative AND) flash in SPL. NAND flash
332           can be used to allow SPL to load U-Boot from supported devices.
333           This enables the drivers in drivers/mtd/nand as part of an SPL
334           build.
335
336 config SPL_NET_SUPPORT
337         bool "Support networking"
338         depends on SPL
339         help
340           Enable support for network devices (such as Ethernet) in SPL.
341           This permits SPL to load U-Boot over a network link rather than
342           from an on-board peripheral. Environment support is required since
343           the network stack uses a number of environment variables. See also
344           SPL_ETH_SUPPORT.
345
346 if SPL_NET_SUPPORT
347 config SPL_NET_VCI_STRING
348         string "BOOTP Vendor Class Identifier string sent by SPL"
349         help
350           As defined by RFC 2132 the vendor class identifier field can be
351           sent by the client to identify the vendor type and configuration
352           of a client.  This is often used in practice to allow for the DHCP
353           server to specify different files to load depending on if the ROM,
354           SPL or U-Boot itself makes the request
355 endif   # if SPL_NET_SUPPORT
356
357 config SPL_NO_CPU_SUPPORT
358         bool "Drop CPU code in SPL"
359         depends on SPL
360         help
361           This is specific to the ARM926EJ-S CPU. It disables the standard
362           start.S start-up code, presumably so that a replacement can be
363           used on that CPU. You should not enable it unless you know what
364           you are doing.
365
366 config SPL_NOR_SUPPORT
367         bool "Support NOR flash"
368         depends on SPL
369         help
370           Enable support for loading U-Boot from memory-mapped NOR (Negative
371           OR) flash in SPL. NOR flash is slow to write but fast to read, and
372           a memory-mapped device makes it very easy to access. Loading from
373           NOR is typically achieved with just a memcpy().
374
375 config SPL_ONENAND_SUPPORT
376         bool "Support OneNAND flash"
377         depends on SPL
378         help
379           Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
380           a type of NAND flash and therefore can be used to allow SPL to
381           load U-Boot from supported devices. This enables the drivers in
382           drivers/mtd/onenand as part of an SPL build.
383
384 config SPL_POST_MEM_SUPPORT
385         bool "Support POST drivers"
386         depends on SPL
387         help
388           Enable support for POST (Power-on Self Test) in SPL. POST is a
389           procedure that checks that the hardware (CPU or board) appears to
390           be functionally correctly. It is a sanity check that can be
391           performed before booting. This enables the drivers in post/drivers
392           as part of an SPL build.
393
394 config SPL_POWER_SUPPORT
395         bool "Support power drivers"
396         depends on SPL
397         help
398           Enable support for power control in SPL. This includes support
399           for PMICs (Power-management Integrated Circuits) and some of the
400           features provided by PMICs. In particular, voltage regulators can
401           be used to enable/disable power and vary its voltage. That can be
402           useful in SPL to turn on boot peripherals and adjust CPU voltage
403           so that the clock speed can be increased. This enables the drivers
404           in drivers/power, drivers/power/pmic and drivers/power/regulator
405           as part of an SPL build.
406
407 config SPL_SATA_SUPPORT
408         bool "Support loading from SATA"
409         depends on SPL
410         help
411           Enable support for SATA (Serial AT attachment) in SPL. This allows
412           use of SATA devices such as hard drives and flash drivers for
413           loading U-Boot. SATA is used in higher-end embedded systems and
414           can provide higher performance than MMC , at somewhat higher
415           expense and power consumption. This enables loading from SATA
416           using a configured device.
417
418 config SPL_SERIAL_SUPPORT
419         bool "Support serial"
420         depends on SPL
421         help
422           Enable support for serial in SPL. This allows use of a serial UART
423           for displaying messages while SPL is running. It also brings in
424           printf() and panic() functions. This should normally be enabled
425           unless there are space reasons not to. Even then, consider
426           enabling USE_TINY_PRINTF which is a small printf() version.
427
428 config SPL_SPI_FLASH_SUPPORT
429         bool "Support SPI flash drivers"
430         depends on SPL
431         help
432           Enable support for using SPI flash in SPL, and loading U-Boot from
433           SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
434           the SPI bus that is used to connect it to a system. It is a simple
435           but fast bidirectional 4-wire bus (clock, chip select and two data
436           lines). This enables the drivers in drivers/mtd/spi as part of an
437           SPL build. This normally requires SPL_SPI_SUPPORT.
438
439 config SPL_SPI_SUPPORT
440         bool "Support SPI drivers"
441         depends on SPL
442         help
443           Enable support for using SPI in SPL. This is used for connecting
444           to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
445           more details on that. The SPI driver provides the transport for
446           data between the SPI flash and the CPU. This option can be used to
447           enable SPI drivers that are needed for other purposes also, such
448           as a SPI PMIC.
449
450 config SPL_USBETH_SUPPORT
451         bool "Support USB Ethernet drivers"
452         depends on SPL
453         help
454           Enable access to the USB network subsystem and associated
455           drivers in SPL. This permits SPL to load U-Boot over a
456           USB-connected Ethernet link (such as a USB Ethernet dongle) rather
457           than from an onboard peripheral. Environment support is required
458           since the network stack uses a number of environment variables.
459           See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
460
461 config SPL_USB_HOST_SUPPORT
462         bool "Support USB host drivers"
463         depends on SPL
464         help
465           Enable access to USB (Universal Serial Bus) host devices so that
466           SPL can load U-Boot from a connected USB peripheral, such as a USB
467           flash stick. While USB takes a little longer to start up than most
468           buses, it is very flexible since many different types of storage
469           device can be attached. This option enables the drivers in
470           drivers/usb/host as part of an SPL build.
471
472 config SPL_USB_SUPPORT
473         bool "Support loading from USB"
474         depends on SPL_USB_HOST_SUPPORT
475         help
476           Enable support for USB devices in SPL. This allows use of USB
477           devices such as hard drives and flash drivers for loading U-Boot.
478           The actual drivers are enabled separately using the normal U-Boot
479           config options. This enables loading from USB using a configured
480           device.
481
482 config SPL_WATCHDOG_SUPPORT
483         bool "Support watchdog drivers"
484         depends on SPL
485         help
486           Enable support for watchdog drivers in SPL. A watchdog is
487           typically a hardware peripheral which can reset the system when it
488           detects no activity for a while (such as a software crash). This
489           enables the drivers in drivers/watchdog as part of an SPL build.
490
491 config SPL_YMODEM_SUPPORT
492         bool "Support loading using Ymodem"
493         depends on SPL
494         help
495           While loading from serial is slow it can be a useful backup when
496           there is no other option. The Ymodem protocol provides a reliable
497           means of transmitting U-Boot over a serial line for using in SPL,
498           with a checksum to ensure correctness.
499
500 config TPL_ENV_SUPPORT
501         bool "Support an environment"
502         depends on TPL
503         help
504           Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
505
506 config TPL_I2C_SUPPORT
507         bool "Support I2C"
508         depends on TPL
509         help
510           Enable support for the I2C bus in SPL. See SPL_I2C_SUPPORT for
511           details.
512
513 config TPL_LIBCOMMON_SUPPORT
514         bool "Support common libraries"
515         depends on TPL
516         help
517           Enable support for common U-Boot libraries within TPL. See
518           SPL_LIBCOMMON_SUPPORT for details.
519
520 config TPL_LIBGENERIC_SUPPORT
521         bool "Support generic libraries"
522         depends on TPL
523         help
524           Enable support for generic U-Boot libraries within TPL. See
525           SPL_LIBGENERIC_SUPPORT for details.
526
527 config TPL_MPC8XXX_INIT_DDR_SUPPORT
528         bool "Support MPC8XXX DDR init"
529         depends on TPL
530         help
531           Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
532           SPL_MPC8XXX_INIT_DDR_SUPPORT for details.
533
534 config TPL_MMC_SUPPORT
535         bool "Support MMC"
536         depends on TPL
537         help
538           Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
539
540 config TPL_NAND_SUPPORT
541         bool "Support NAND flash"
542         depends on TPL
543         help
544           Enable support for NAND in SPL. See SPL_NAND_SUPPORT for details.
545
546 config TPL_SERIAL_SUPPORT
547         bool "Support serial"
548         depends on TPL
549         help
550           Enable support for serial in SPL. See SPL_SERIAL_SUPPORT for
551           details.
552
553 config TPL_SPI_FLASH_SUPPORT
554         bool "Support SPI flash drivers"
555         depends on TPL
556         help
557           Enable support for using SPI flash in SPL. See SPL_SPI_FLASH_SUPPORT
558           for details.
559
560 config TPL_SPI_SUPPORT
561         bool "Support SPI drivers"
562         depends on TPL
563         help
564           Enable support for using SPI in SPL. See SPL_SPI_SUPPORT for
565           details.
566
567 endmenu