1menu "Boot options"
2
3menu "Boot images"
4
5config ANDROID_BOOT_IMAGE
6	bool "Android Boot Images"
7	default y if FASTBOOT
8	help
9	  This enables support for booting images which use the Android
10	  image format header.
11
12config TIMESTAMP
13	bool "Show image date and time when displaying image information"
14	default y if CMD_DATE
15	help
16	  When CONFIG_TIMESTAMP is selected, the timestamp (date and time) of
17	  an image is printed by image commands like bootm or iminfo. This
18	  is shown as 'Timestamp: xxx' and 'Created: xxx'. If this option is
19	  enabled, then U-Boot requires FITs to have a timestamp. If a FIT is
20	  loaded that does not, the message 'Wrong FIT format: no timestamp'
21	  is shown.
22
23config BUTTON_CMD
24	bool "Support for running a command if a button is held during boot"
25	depends on CMDLINE
26	depends on BUTTON
27	help
28	  For many embedded devices it's useful to enter a special flashing mode
29	  such as fastboot mode when a button is held during boot. This option
30	  allows arbitrary commands to be assigned to specific buttons. These will
31	  be run after "preboot" if the button is held. Configuration is done via
32	  the environment variables "button_cmd_N_name" and "button_cmd_N" where n is
33	  the button number (starting from 0). e.g:
34
35	    "button_cmd_0_name=vol_down"
36	    "button_cmd_0=fastboot usb 0"
37
38menuconfig FIT
39	bool "Flattened Image Tree (FIT)"
40	select HASH
41	select MD5
42	select SHA1
43	imply SHA256
44	help
45	  This option allows you to boot the new uImage structure,
46	  Flattened Image Tree.  FIT is formally a FDT, which can include
47	  images of various types (kernel, FDT blob, ramdisk, etc.)
48	  in a single blob.  To boot this new uImage structure,
49	  pass the address of the blob to the "bootm" command.
50	  FIT is very flexible, supporting compression, multiple images,
51	  multiple configurations, verification through hashing and also
52	  verified boot (secure boot using RSA).
53
54if FIT
55
56config FIT_EXTERNAL_OFFSET
57	hex "FIT external data offset"
58	default 0x0
59	help
60	  This specifies a data offset in fit image.
61	  The offset is from data payload offset to the beginning of
62	  fit image header. When specifies a offset, specific data
63	  could be put in the hole between data payload and fit image
64	  header, such as CSF data on i.MX platform.
65
66config FIT_FULL_CHECK
67	bool "Do a full check of the FIT before using it"
68	default y
69	help
70	  Enable this do a full check of the FIT to make sure it is valid. This
71	  helps to protect against carefully crafted FITs which take advantage
72	  of bugs or omissions in the code. This includes a bad structure,
73	  multiple root nodes and the like.
74
75config FIT_SIGNATURE
76	bool "Enable signature verification of FIT uImages"
77	depends on DM
78	select HASH
79	imply RSA
80	imply RSA_VERIFY
81	select IMAGE_SIGN_INFO
82	select FIT_FULL_CHECK
83	help
84	  This option enables signature verification of FIT uImages,
85	  using a hash signed and verified using RSA. If
86	  CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
87	  hashing is available using hardware, then the RSA library will use
88	  it. See doc/uImage.FIT/signature.txt for more details.
89
90	  WARNING: When relying on signed FIT images with a required signature
91	  check the legacy image format is disabled by default, so that
92	  unsigned images cannot be loaded. If a board needs the legacy image
93	  format support in this case, enable it using
94	  CONFIG_LEGACY_IMAGE_FORMAT.
95
96config FIT_SIGNATURE_MAX_SIZE
97	hex "Max size of signed FIT structures"
98	depends on FIT_SIGNATURE
99	default 0x10000000
100	help
101	  This option sets a max size in bytes for verified FIT uImages.
102	  A sane value of 256MB protects corrupted DTB structures from overlapping
103	  device memory. Assure this size does not extend past expected storage
104	  space.
105
106config FIT_RSASSA_PSS
107	bool "Support rsassa-pss signature scheme of FIT image contents"
108	depends on FIT_SIGNATURE
109	help
110	  Enable this to support the pss padding algorithm as described
111	  in the rfc8017 (https://tools.ietf.org/html/rfc8017).
112
113config FIT_CIPHER
114	bool "Enable ciphering data in a FIT uImages"
115	depends on DM
116	select AES
117	help
118	  Enable the feature of data ciphering/unciphering in the tool mkimage
119	  and in the u-boot support of the FIT image.
120
121config FIT_VERBOSE
122	bool "Show verbose messages when FIT images fail"
123	help
124	  Generally a system will have valid FIT images so debug messages
125	  are a waste of code space. If you are debugging your images then
126	  you can enable this option to get more verbose information about
127	  failures.
128
129config FIT_BEST_MATCH
130	bool "Select the best match for the kernel device tree"
131	help
132	  When no configuration is explicitly selected, default to the
133	  one whose fdt's compatibility field best matches that of
134	  U-Boot itself. A match is considered "best" if it matches the
135	  most specific compatibility entry of U-Boot's fdt's root node.
136	  The order of entries in the configuration's fdt is ignored.
137
138config FIT_IMAGE_POST_PROCESS
139	bool "Enable post-processing of FIT artifacts after loading by U-Boot"
140	depends on SOCFPGA_SECURE_VAB_AUTH
141	help
142	  Allows doing any sort of manipulation to blobs after they got extracted
143	  from FIT images like stripping off headers or modifying the size of the
144	  blob, verification, authentication, decryption etc. in a platform or
145	  board specific way. In order to use this feature a platform or board-
146	  specific implementation of board_fit_image_post_process() must be
147	  provided. Also, anything done during this post-processing step would
148	  need to be comprehended in how the images were prepared before being
149	  injected into the FIT creation (i.e. the blobs would have been pre-
150	  processed before being added to the FIT image).
151
152config FIT_PRINT
153        bool "Support FIT printing"
154        default y
155        help
156          Support printing the content of the fitImage in a verbose manner.
157
158config SPL_FIT
159	bool "Support Flattened Image Tree within SPL"
160	depends on SPL
161	select SPL_HASH
162	select SPL_OF_LIBFDT
163
164config SPL_FIT_PRINT
165	bool "Support FIT printing within SPL"
166	depends on SPL_FIT
167	help
168	  Support printing the content of the fitImage in a verbose manner in SPL.
169
170config SPL_FIT_FULL_CHECK
171	bool "Do a full check of the FIT before using it"
172	depends on SPL_FIT
173	help
174	  Enable this do a full check of the FIT to make sure it is valid. This
175	  helps to protect against carefully crafted FITs which take advantage
176	  of bugs or omissions in the code. This includes a bad structure,
177	  multiple root nodes and the like.
178
179config SPL_FIT_SIGNATURE
180	bool "Enable signature verification of FIT firmware within SPL"
181	depends on SPL_DM
182	depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
183	select FIT_SIGNATURE
184	select SPL_FIT
185	select SPL_CRYPTO
186	select SPL_HASH
187	imply SPL_RSA
188	imply SPL_RSA_VERIFY
189	select SPL_IMAGE_SIGN_INFO
190	select SPL_FIT_FULL_CHECK
191
192config SPL_FIT_SIGNATURE_MAX_SIZE
193	hex "Max size of signed FIT structures in SPL"
194	depends on SPL_FIT_SIGNATURE
195	default 0x10000000
196	help
197	  This option sets a max size in bytes for verified FIT uImages.
198	  A sane value of 256MB protects corrupted DTB structures from overlapping
199	  device memory. Assure this size does not extend past expected storage
200	  space.
201
202config SPL_FIT_RSASSA_PSS
203	bool "Support rsassa-pss signature scheme of FIT image contents in SPL"
204	depends on SPL_FIT_SIGNATURE
205	help
206	  Enable this to support the pss padding algorithm as described
207	  in the rfc8017 (https://tools.ietf.org/html/rfc8017) in SPL.
208
209config SPL_LOAD_FIT
210	bool "Enable SPL loading U-Boot as a FIT (basic fitImage features)"
211	depends on SPL
212	select SPL_FIT
213	help
214	  Normally with the SPL framework a legacy image is generated as part
215	  of the build. This contains U-Boot along with information as to
216	  where it should be loaded. This option instead enables generation
217	  of a FIT (Flat Image Tree) which provides more flexibility. In
218	  particular it can handle selecting from multiple device tree
219	  and passing the correct one to U-Boot.
220
221	  This path has the following limitations:
222
223	  1. "loadables" images, other than FDTs, which do not have a "load"
224	     property will not be loaded. This limitation also applies to FPGA
225	     images with the correct "compatible" string.
226	  2. For FPGA images, the supported "compatible" list is in the
227	     doc/uImage.FIT/source_file_format.txt.
228	  3. FDTs are only loaded for images with an "os" property of "u-boot".
229	     "linux" images are also supported with Falcon boot mode.
230
231config SPL_LOAD_FIT_ADDRESS
232	hex "load address of fit image"
233	depends on SPL_LOAD_FIT
234	default 0x0
235	help
236	  Specify the load address of the fit image that will be loaded
237	  by SPL.
238
239config SPL_LOAD_FIT_APPLY_OVERLAY
240	bool "Enable SPL applying DT overlays from FIT"
241	depends on SPL_LOAD_FIT
242	select OF_LIBFDT_OVERLAY
243	help
244	  The device tree is loaded from the FIT image. Allow the SPL to
245	  also load device-tree overlays from the FIT image an apply them
246	  over the device tree.
247
248config SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ
249	depends on SPL_LOAD_FIT_APPLY_OVERLAY
250	default 0x10000
251	hex "size of temporary buffer used to load the overlays"
252	help
253	  The size of the area where the overlays will be loaded and
254	  uncompress. Must be at least as large as biggest overlay
255	  (uncompressed)
256
257config SPL_LOAD_FIT_FULL
258	bool "Enable SPL loading U-Boot as a FIT (full fitImage features)"
259	select SPL_FIT
260	help
261	  Normally with the SPL framework a legacy image is generated as part
262	  of the build. This contains U-Boot along with information as to
263	  where it should be loaded. This option instead enables generation
264	  of a FIT (Flat Image Tree) which provides more flexibility. In
265	  particular it can handle selecting from multiple device tree
266	  and passing the correct one to U-Boot.
267
268config SPL_FIT_IMAGE_POST_PROCESS
269	bool "Enable post-processing of FIT artifacts after loading by the SPL"
270	depends on SPL_LOAD_FIT
271	default y if TI_SECURE_DEVICE
272	help
273	  Allows doing any sort of manipulation to blobs after they got extracted
274	  from the U-Boot FIT image like stripping off headers or modifying the
275	  size of the blob, verification, authentication, decryption etc. in a
276	  platform or board specific way. In order to use this feature a platform
277	  or board-specific implementation of board_fit_image_post_process() must
278	  be provided. Also, anything done during this post-processing step would
279	  need to be comprehended in how the images were prepared before being
280	  injected into the FIT creation (i.e. the blobs would have been pre-
281	  processed before being added to the FIT image).
282
283config SPL_FIT_SOURCE
284	string ".its source file for U-Boot FIT image"
285	depends on SPL_FIT
286	help
287	  Specifies a (platform specific) FIT source file to generate the
288	  U-Boot FIT image. This could specify further image to load and/or
289	  execute.
290
291config USE_SPL_FIT_GENERATOR
292	bool "Use a script to generate the .its script"
293	depends on SPL_FIT
294	default y if SPL_FIT && ARCH_ZYNQMP
295
296config SPL_FIT_GENERATOR
297	string ".its file generator script for U-Boot FIT image"
298	depends on USE_SPL_FIT_GENERATOR
299	default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
300	help
301	  Specifies a (platform specific) script file to generate the FIT
302	  source file used to build the U-Boot FIT image file. This gets
303	  passed a list of supported device tree file stub names to
304	  include in the generated image.
305
306if VPL
307
308config VPL_FIT
309	bool "Support Flattened Image Tree within VPL"
310	depends on VPL
311	default y
312	select VPL_HASH
313	select VPL_OF_LIBFDT
314
315config VPL_FIT_PRINT
316	bool "Support FIT printing within VPL"
317	depends on VPL_FIT
318	default y
319	help
320	  Support printing the content of the fitImage in a verbose manner in VPL.
321
322config VPL_FIT_FULL_CHECK
323	bool "Do a full check of the FIT before using it"
324	default y
325	help
326	  Enable this do a full check of the FIT to make sure it is valid. This
327	  helps to protect against carefully crafted FITs which take advantage
328	  of bugs or omissions in the code. This includes a bad structure,
329	  multiple root nodes and the like.
330
331config VPL_FIT_SIGNATURE
332	bool "Enable signature verification of FIT firmware within VPL"
333	depends on VPL_DM
334	default y
335	select FIT_SIGNATURE
336	select VPL_FIT
337	select VPL_CRYPTO
338	select VPL_HASH
339	imply VPL_RSA
340	imply VPL_RSA_VERIFY
341	select VPL_IMAGE_SIGN_INFO
342	select VPL_FIT_FULL_CHECK
343
344config VPL_FIT_SIGNATURE_MAX_SIZE
345	hex "Max size of signed FIT structures in VPL"
346	depends on VPL_FIT_SIGNATURE
347	default 0x10000000
348	help
349	  This option sets a max size in bytes for verified FIT uImages.
350	  A sane value of 256MB protects corrupted DTB structures from overlapping
351	  device memory. Assure this size does not extend past expected storage
352	  space.
353
354endif # VPL
355
356endif # FIT
357
358config PXE_UTILS
359	bool
360	select MENU
361	help
362	  Utilities for parsing PXE file formats.
363
364config BOOT_DEFAULTS_FEATURES
365	bool
366	select SUPPORT_RAW_INITRD
367	select ENV_VARS_UBOOT_CONFIG
368	imply USB_STORAGE
369	imply EFI_PARTITION
370	imply ISO_PARTITION
371
372config BOOT_DEFAULTS_CMDS
373	bool
374	imply USE_BOOTCOMMAND
375	select CMD_ENV_EXISTS
376	select CMD_EXT2
377	select CMD_EXT4
378	select CMD_FAT
379	select CMD_FS_GENERIC
380	select CMD_PART if PARTITIONS
381	select CMD_DHCP if CMD_NET
382	select CMD_PING if CMD_NET
383	select CMD_PXE if CMD_NET
384	select CMD_BOOTI if ARM64
385	select CMD_BOOTZ if ARM && !ARM64
386	imply CMD_MII if NET
387
388config BOOT_DEFAULTS
389	bool  # Common defaults for standard boot and distroboot
390	select BOOT_DEFAULTS_FEATURES
391	select BOOT_DEFAULTS_CMDS if CMDLINE
392	help
393	  These are not required but are commonly needed to support a good
394	  selection of booting methods. Enable this to improve the capability
395	  of U-Boot to boot various images. Currently much functionality is
396	  tied to enabling the command that exercises it.
397
398menuconfig BOOTSTD
399	bool "Standard boot"
400	default y
401	depends on DM && OF_CONTROL && BLK
402	help
403	  U-Boot supports a standard way of locating something to boot,
404	  typically an Operating System such as Linux, provided by a distro such
405	  as Arch Linux or Debian. Enable this to support iterating through
406	  available bootdevs and using bootmeths to find bootflows suitable for
407	  booting.
408
409	  Standard boot is not a standard way of booting, just a framework
410	  within U-Boot for supporting all the different ways that exist.
411
412	  Terminology:
413
414	    - bootdev - a device which can hold a distro (e.g. MMC)
415	    - bootmeth - a method to scan a bootdev to find bootflows (owned by
416	        U-Boot)
417	    - bootflow - a description of how to boot (owned by the distro)
418
419if BOOTSTD
420
421config SPL_BOOTSTD
422	bool "Standard boot support in SPL"
423	depends on SPL && SPL_DM && SPL_OF_CONTROL && SPL_BLK
424	default y if VPL
425	help
426	  This enables standard boot in SPL. This is neeeded so that VBE
427	  (Verified Boot for Embedded) can be used, since it depends on standard
428	  boot. It is enabled by default since the main purpose of VPL is to
429	  handle the firmware part of VBE.
430
431config VPL_BOOTSTD
432	bool "Standard boot support in VPL"
433	depends on VPL && VPL_DM && VPL_OF_CONTROL && VPL_BLK
434	default y
435	help
436	  This enables standard boot in SPL. This is neeeded so that VBE
437	  (Verified Boot for Embedded) can be used, since it depends on standard
438	  boot. It is enabled by default since the main purpose of VPL is to
439	  handle the firmware part of VBE.
440
441config BOOTSTD_FULL
442	bool "Enhanced features for standard boot"
443	default y if SANDBOX
444	imply BOOTSTD_DEFAULTS
445	help
446	  This enables various useful features for standard boot, which are not
447	  essential for operation:
448
449	  - bootdev, bootmeth commands
450	  - extra features in the bootflow command
451	  - support for selecting the ordering of bootmeths ("bootmeth order")
452	  - support for selecting the ordering of bootdevs using the devicetree
453	    as well as the "boot_targets" environment variable
454
455config BOOTSTD_DEFAULTS
456	bool "Select some common defaults for standard boot"
457	depends on BOOTSTD
458	select BOOT_DEFAULTS
459	select BOOTMETH_DISTRO
460	help
461	  These are not required but are commonly needed to support a good
462	  selection of booting methods. Enable this to improve the capability
463	  of U-Boot to boot various images.
464
465config BOOTSTD_BOOTCOMMAND
466	bool "Use bootstd to boot"
467	default y if !DISTRO_DEFAULTS
468	help
469	  Enable this to select a default boot-command suitable for booting
470	  with standard boot. This can be overridden by the board if needed,
471	  but the default command should be enough for most boards which use
472	  standard boot.
473
474	  For now this is only selected if distro boot is NOT used, since
475	  standard boot does not support all of the features of distro boot
476	  yet.
477
478config BOOTSTD_PROG
479	bool "Use programmatic boot"
480	depends on !CMDLINE
481	default y
482	help
483	  Enable this to provide a board_run_command() function which can boot
484	  a systen without using commands. If the boot fails, then U-Boot will
485	  panic.
486
487	  Note: This currently has many limitations and is not a useful booting
488	  solution. Future work will eventually make this a viable option.
489
490config BOOTMETH_GLOBAL
491	bool
492	help
493	  Add support for global bootmeths. This feature is used by VBE and
494	  EFI bootmgr, since they take full control over which bootdevs are
495	  selected to boot.
496
497config BOOTMETH_CROS
498	bool "Bootdev support for Chromium OS"
499	depends on X86 || ARM || SANDBOX
500	default y if !ARM
501	select EFI_PARTITION
502	select PARTITION_TYPE_GUID
503	select PARTITION_UUIDS
504	help
505	  Enables support for booting Chromium OS using bootdevs. This uses the
506	  kernel A slot and obtains the kernel command line from the parameters
507	  provided there.
508
509	  Note that only x86 devices are supported at present.
510
511config BOOTMETH_EXTLINUX
512	bool "Bootdev support for extlinux boot"
513	select PXE_UTILS
514	default y
515	help
516	  Enables support for extlinux boot using bootdevs. This makes the
517	  bootdevs look for a 'extlinux/extlinux.conf' on each filesystem
518	  they scan.
519
520	  The specification for this filed is here:
521
522	    https://uapi-group.org/specifications/specs/boot_loader_specification/
523
524	  This provides a way to try out standard boot on an existing boot flow.
525
526config BOOTMETH_EXTLINUX_PXE
527	bool "Bootdev support for extlinux boot over network"
528	depends on CMD_PXE && CMD_NET && DM_ETH
529	default y
530	help
531	  Enables support for extlinux boot using bootdevs. This makes the
532	  bootdevs look for a 'extlinux/extlinux.conf' on the tftp server.
533
534	  The specification for this file is here:
535
536	    https://uapi-group.org/specifications/specs/boot_loader_specification/
537
538	  This provides a way to try out standard boot on an existing boot flow.
539
540config BOOTMETH_EFILOADER
541	bool "Bootdev support for EFI boot"
542	depends on EFI_BINARY_EXEC
543	default y
544	help
545	  Enables support for EFI boot using bootdevs. This makes the
546	  bootdevs look for a 'boot<arch>.efi' on each filesystem
547	  they scan. The resulting file is booted after enabling U-Boot's
548	  EFI loader support.
549
550	  The <arch> depends on the architecture of the board:
551
552	     aa64      - aarch64 (ARM 64-bit)
553	     arm       - ARM 32-bit
554	     ia32      - x86 32-bit
555	     x64       - x86 64-bit
556	     riscv32   - RISC-V 32-bit
557	     riscv64   - RISC-V 64-bit
558
559	  This provides a way to try out standard boot on an existing boot flow.
560
561config BOOTMETH_EFI_BOOTMGR
562	bool "Bootdev support for EFI boot manager"
563	depends on EFI_BOOTMGR
564	select BOOTMETH_GLOBAL
565	default y
566	help
567	  Enable booting via the UEFI boot manager. Based on the EFI variables
568	  the EFI binary to be launched is determined. To set the EFI variables
569	  use the eficonfig command.
570
571config BOOTMETH_VBE
572	bool "Bootdev support for Verified Boot for Embedded"
573	depends on FIT
574	default y
575	select BOOTMETH_GLOBAL
576	select EVENT
577	help
578	  Enables support for VBE boot. This is a standard boot method which
579	  supports selection of various firmware components, seleciton of an OS to
580	  boot as well as updating these using fwupd.
581
582config BOOTMETH_DISTRO
583	bool  # Options needed to boot any distro
584	select BOOTMETH_SCRIPT if CMDLINE # E.g. Armbian uses scripts
585	select BOOTMETH_EXTLINUX  # E.g. Debian uses these
586	select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH
587	select BOOTMETH_EFILOADER if EFI_BINARY_EXEC # E.g. Ubuntu uses this
588
589config SPL_BOOTMETH_VBE
590	bool "Bootdev support for Verified Boot for Embedded (SPL)"
591	depends on SPL && FIT
592	select EVENT
593	default y if VPL
594	help
595	  Enables support for VBE boot. This is a standard boot method which
596	  supports selection of various firmware components, seleciton of an OS to
597	  boot as well as updating these using fwupd.
598
599config VPL_BOOTMETH_VBE
600	bool "Bootdev support for Verified Boot for Embedded (VPL)"
601	depends on VPL && FIT
602	select EVENT
603	default y
604	help
605	  Enables support for VBE boot. This is a standard boot method which
606	  supports selection of various firmware components, seleciton of an OS to
607	  boot as well as updating these using fwupd.
608
609if BOOTMETH_VBE
610
611config BOOTMETH_VBE_REQUEST
612	bool "Support for serving VBE OS requests"
613	default y
614	help
615	  Enables support for looking that the requests made by the
616	  Operating System being booted. These requests result in additions to
617	  the device tree /chosen node, added during the device tree fixup
618	  phase.
619
620config SPL_BOOTMETH_VBE_REQUEST
621	bool "Support for serving VBE OS requests (SPL)"
622	depends on SPL
623	help
624	  Enables support for looking that the requests made by the
625	  Operating System being booted. These requests result in additions to
626	  the device tree /chosen node, added during the device tree fixup
627	  phase.
628
629	  This is only useful if you are booting an OS direct from SPL.
630
631config BOOTMETH_VBE_SIMPLE
632	bool "Bootdev support for VBE 'simple' method"
633	default y
634	help
635	  Enables support for VBE 'simple' boot. This allows updating a single
636	  firmware image in boot media such as MMC. It does not support any sort
637	  of rollback, recovery or A/B boot.
638
639config BOOTMETH_VBE_SIMPLE_OS
640	bool "Bootdev support for VBE 'simple' method OS phase"
641	default y
642	help
643	  Enables support for the OS parts of VBE 'simple' boot. This includes
644	  fixing up the device tree with the required VBE information, ready
645	  for booting into the OS. This option is only enabled for U-Boot
646	  proper, since it is the phase where device tree fixups happen.
647
648config SPL_BOOTMETH_VBE_SIMPLE
649	bool "Bootdev support for VBE 'simple' method (SPL)"
650	depends on SPL
651	default y if VPL
652	help
653	  Enables support for VBE 'simple' boot. This allows updating a single
654	  firmware image in boot media such as MMC. It does not support any sort
655	  of rollback, recovery or A/B boot.
656
657config VPL_BOOTMETH_VBE_SIMPLE
658	bool "Bootdev support for VBE 'simple' method (VPL)"
659	depends on VPL
660	default y
661	help
662	  Enables support for VBE 'simple' boot. This allows updating a single
663	  firmware image in boot media such as MMC. It does not support any sort
664	  of rollback, recovery or A/B boot.
665
666config SPL_BOOTMETH_VBE_SIMPLE_FW
667	bool "Bootdev support for VBE 'simple' method firmware phase (SPL)"
668	depends on VPL
669	default y
670	help
671	  Enables support for the firmware parts of VBE 'simple' boot. This
672	  includes an SPL loader which locates the correct U-Boot to boot into.
673	  This option should really only be enabled for VPL, since it is the
674	  phase where the SPL + U-Boot decision should be made. But for now,
675	  SPL does its own FIT-configuration selection.
676
677config VPL_BOOTMETH_VBE_SIMPLE_FW
678	bool "Bootdev support for VBE 'simple' method firmware phase (VPL)"
679	depends on VPL
680	default y
681	help
682	  Enables support for the firmware parts of VBE 'simple' boot. This
683	  includes an SPL loader which locates the correct SPL to boot into.
684	  This option enabled for VPL, since it is the phase where the SPL
685	  decision is made.
686
687endif # BOOTMETH_VBE
688
689config EXPO
690	bool "Support for expos - groups of scenes displaying a UI"
691	depends on VIDEO
692	default y if BOOTMETH_VBE
693	help
694	  An expo is a way of presenting and collecting information from the
695	  user. It consists of a collection of 'scenes' of which only one is
696	  presented at a time. An expo is typically used to show a boot menu
697	  and allow settings to be changed.
698
699	  The expo can be presented in graphics form using a vidconsole, or in
700	  text form on a serial console.
701
702config BOOTMETH_SANDBOX
703	def_bool y
704	depends on SANDBOX
705	help
706	  This is a sandbox bootmeth driver used for testing. It always returns
707	  -ENOTSUPP when attempting to boot.
708
709config BOOTMETH_SCRIPT
710	bool "Bootdev support for U-Boot scripts"
711	default y if BOOTSTD_FULL
712	depends on CMDLINE
713	select HUSH_PARSER
714	help
715	  Enables support for booting a distro via a U-Boot script. This makes
716	  the bootdevs look for a 'boot/boot.scr' file which can be used to
717	  boot the distro.
718
719	  This provides a way to try out standard boot on an existing boot flow.
720	  It is not enabled by default to save space.
721
722endif # BOOTSTD
723
724config LEGACY_IMAGE_FORMAT
725	bool "Enable support for the legacy image format"
726	default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE
727	help
728	  This option enables the legacy image format. It is enabled by
729	  default for backward compatibility, unless FIT_SIGNATURE is
730	  set where it is disabled so that unsigned images cannot be
731	  loaded. If a board needs the legacy image format support in this
732	  case, enable it here.
733
734config MEASURED_BOOT
735	bool "Measure boot images and configuration when booting without EFI"
736	depends on HASH && TPM_V2
737	help
738	  This option enables measurement of the boot process when booting
739	  without UEFI . Measurement involves creating cryptographic hashes
740	  of the binary images that are booting and storing them in the TPM.
741	  In addition, a log of these hashes is stored in memory for the OS
742	  to verify the booted images and configuration. Enable this if the
743	  OS has configured some memory area for the event log and you intend
744	  to use some attestation tools on your system.
745
746if MEASURED_BOOT
747	config MEASURE_DEVICETREE
748	bool "Measure the devicetree image"
749	default y if MEASURED_BOOT
750	help
751	  On some platforms, the devicetree is not static as it may contain
752	  random MAC addresses or other such data that changes each boot.
753	  Therefore, it should not be measured into the TPM. In that case,
754	  disable the measurement here.
755
756	config MEASURE_IGNORE_LOG
757	bool "Ignore the existing event log"
758	help
759	  On platforms that use an event log memory region that persists
760	  through system resets and are the first stage bootloader, then
761	  this option should be enabled to ignore any existing data in the
762	  event log memory region.
763endif # MEASURED_BOOT
764
765config SYS_BOOTM_LEN
766	hex "Maximum size of a decompresed OS image"
767	depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \
768		LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT
769	default 0x4000000 if PPC || ARM64
770	default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7
771	default 0x800000
772	help
773	  This is the maximum size of the buffer that is used to decompress the OS
774	  image in to if attempting to boot a compressed image.
775
776config SUPPORT_RAW_INITRD
777	bool "Enable raw initrd images"
778	help
779	  Note, defining the SUPPORT_RAW_INITRD allows user to supply
780	  kernel with raw initrd images. The syntax is slightly different, the
781	  address of the initrd must be augmented by it's size, in the following
782	  format: "<initrd address>:<initrd size>".
783
784config CHROMEOS
785	bool "Support booting Chrome OS"
786	help
787	  Chrome OS requires U-Boot to set up a table indicating the boot mode
788	  (e.g. Developer mode) and a few other things. Enable this if you are
789	  booting on a Chromebook to avoid getting an error about an invalid
790	  firmware ID.
791
792config CHROMEOS_VBOOT
793	bool "Support Chrome OS verified boot"
794	help
795	  This is intended to enable the full Chrome OS verified boot support
796	  in U-Boot. It is not actually implemented in the U-Boot source code
797	  at present, so this option is always set to 'n'. It allows
798	  distinguishing between booting Chrome OS in a basic way (developer
799	  mode) and a full boot.
800
801config SYS_RAMBOOT
802	bool
803
804config RAMBOOT_PBL
805	bool "Freescale PBL(pre-boot loader) image format support"
806	select SYS_RAMBOOT if PPC
807	help
808	  Some SoCs use PBL to load RCW and/or pre-initialization instructions.
809	  For more details refer to doc/README.pblimage
810
811choice
812	prompt "Freescale PBL (or predecessor) load location"
813	depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB \
814		|| TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \
815		&& !CMD_NAND)
816
817config SDCARD
818	bool "Freescale PBL (or similar) is found on SD card"
819
820config SPIFLASH
821	bool "Freescale PBL (or similar) is found on SPI flash"
822
823config NO_PBL
824	bool "Freescale PBL (or similar) is not used in this case"
825
826endchoice
827
828config FSL_FIXED_MMC_LOCATION
829	bool "PBL MMC is at a fixed location"
830	depends on SDCARD && !RAMBOOT_PBL
831
832config ESDHC_HC_BLK_ADDR
833	def_bool y
834	depends on FSL_FIXED_MMC_LOCATION && (ARCH_BSC9131 || ARCH_BSC9132 || ARCH_P1010)
835	help
836	  In High Capacity SD Cards (> 2 GBytes), the 32-bit source address and
837	  code length of these soc specify the memory address in block address
838	  format. Block length is fixed to 512 bytes as per the SD High
839	  Capacity specification.
840
841config SYS_FSL_PBL_PBI
842	string "PBI(pre-boot instructions) commands for the PBL image"
843	depends on RAMBOOT_PBL
844	help
845	  PBI commands can be used to configure SoC before it starts the execution.
846	  Please refer doc/README.pblimage for more details.
847
848config SYS_FSL_PBL_RCW
849	string "Aadditional RCW (Power on reset configuration) for the PBL image"
850	depends on RAMBOOT_PBL
851	help
852	  Enables addition of RCW (Power on reset configuration) in built image.
853	  Please refer doc/README.pblimage for more details.
854
855config SYS_BOOT_RAMDISK_HIGH
856	depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ
857	depends on !(NIOS2 || SANDBOX || SH || XTENSA)
858	def_bool y
859	select LMB
860	help
861	  Enable initrd_high functionality.  If defined then the initrd_high
862	  feature is enabled and the boot* ramdisk subcommand is enabled.
863
864endmenu		# Boot images
865
866config DISTRO_DEFAULTS
867	bool "(deprecated) Script-based booting of Linux distributions"
868	select CMDLINE
869	select BOOT_DEFAULTS
870	select AUTO_COMPLETE
871	select CMDLINE_EDITING
872	select CMD_SYSBOOT
873	select HUSH_PARSER
874	select SYS_LONGHELP
875	help
876	  Note: These scripts have been replaced by Standard Boot. Do not use
877	  them on new boards. See 'Migrating from distro_boot' at
878	  doc/develop/bootstd.rst
879
880	  Select this to enable various options and commands which are suitable
881	  for building u-boot for booting general purpose Linux distributions.
882
883menu "Boot timing"
884
885config BOOTSTAGE
886	bool "Boot timing and reporting"
887	help
888	  Enable recording of boot time while booting. To use it, insert
889	  calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
890	  bootstage.h. Only a single entry is recorded for each ID. You can
891	  give the entry a name with bootstage_mark_name(). You can also
892	  record elapsed time in a particular stage using bootstage_start()
893	  before starting and bootstage_accum() when finished. Bootstage will
894	  add up all the accumulated time and report it.
895
896	  Normally, IDs are defined in bootstage.h but a small number of
897	  additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
898	  as the ID.
899
900	  Calls to show_boot_progress() will also result in log entries but
901	  these will not have names.
902
903config SPL_BOOTSTAGE
904	bool "Boot timing and reported in SPL"
905	depends on BOOTSTAGE && SPL
906	help
907	  Enable recording of boot time in SPL. To make this visible to U-Boot
908	  proper, enable BOOTSTAGE_STASH as well. This will stash the timing
909	  information when SPL finishes and load it when U-Boot proper starts
910	  up.
911
912config TPL_BOOTSTAGE
913	bool "Boot timing and reported in TPL"
914	depends on BOOTSTAGE && TPL
915	help
916	  Enable recording of boot time in SPL. To make this visible to U-Boot
917	  proper, enable BOOTSTAGE_STASH as well. This will stash the timing
918	  information when TPL finishes and load it when U-Boot proper starts
919	  up.
920
921config BOOTSTAGE_REPORT
922	bool "Display a detailed boot timing report before booting the OS"
923	depends on BOOTSTAGE
924	help
925	  Enable output of a boot time report just before the OS is booted.
926	  This shows how long it took U-Boot to go through each stage of the
927	  boot process. The report looks something like this:
928
929		Timer summary in microseconds:
930		       Mark    Elapsed  Stage
931			  0          0  reset
932		  3,575,678  3,575,678  board_init_f start
933		  3,575,695         17  arch_cpu_init A9
934		  3,575,777         82  arch_cpu_init done
935		  3,659,598     83,821  board_init_r start
936		  3,910,375    250,777  main_loop
937		 29,916,167 26,005,792  bootm_start
938		 30,361,327    445,160  start_kernel
939
940config BOOTSTAGE_RECORD_COUNT
941	int "Number of boot stage records to store"
942	depends on BOOTSTAGE
943	default 30
944	help
945	  This is the size of the bootstage record list and is the maximum
946	  number of bootstage records that can be recorded.
947
948config SPL_BOOTSTAGE_RECORD_COUNT
949	int "Number of boot stage records to store for SPL"
950	depends on SPL_BOOTSTAGE
951	default 5
952	help
953	  This is the size of the bootstage record list and is the maximum
954	  number of bootstage records that can be recorded.
955
956config TPL_BOOTSTAGE_RECORD_COUNT
957	int "Number of boot stage records to store for TPL"
958	depends on TPL_BOOTSTAGE
959	default 5
960	help
961	  This is the size of the bootstage record list and is the maximum
962	  number of bootstage records that can be recorded.
963
964config BOOTSTAGE_FDT
965	bool "Store boot timing information in the OS device tree"
966	depends on BOOTSTAGE
967	help
968	  Stash the bootstage information in the FDT. A root 'bootstage'
969	  node is created with each bootstage id as a child. Each child
970	  has a 'name' property and either 'mark' containing the
971	  mark time in microseconds, or 'accum' containing the
972	  accumulated time for that bootstage id in microseconds.
973	  For example:
974
975		bootstage {
976			154 {
977				name = "board_init_f";
978				mark = <3575678>;
979			};
980			170 {
981				name = "lcd";
982				accum = <33482>;
983			};
984		};
985
986	  Code in the Linux kernel can find this in /proc/devicetree.
987
988config BOOTSTAGE_STASH
989	bool "Stash the boot timing information in memory before booting OS"
990	depends on BOOTSTAGE
991	help
992	  Some OSes do not support device tree. Bootstage can instead write
993	  the boot timing information in a binary format at a given address.
994	  This happens through a call to bootstage_stash(), typically in
995	  the CPU's cleanup_before_linux() function. You can use the
996	  'bootstage stash' and 'bootstage unstash' commands to do this on
997	  the command line.
998
999config BOOTSTAGE_STASH_ADDR
1000	hex "Address to stash boot timing information"
1001	default 0x0
1002	help
1003	  Provide an address which will not be overwritten by the OS when it
1004	  starts, so that it can read this information when ready.
1005
1006config BOOTSTAGE_STASH_SIZE
1007	hex "Size of boot timing stash region"
1008	default 0x1000
1009	help
1010	  This should be large enough to hold the bootstage stash. A value of
1011	  4096 (4KiB) is normally plenty.
1012
1013config SHOW_BOOT_PROGRESS
1014	bool "Show boot progress in a board-specific manner"
1015	help
1016	  Defining this option allows to add some board-specific code (calling
1017	  a user-provided function show_boot_progress(int) that enables you to
1018	  show the system's boot progress on some display (for example, some
1019	  LEDs) on your board. At the moment, the following checkpoints are
1020	  implemented:
1021
1022	  Legacy uImage format:
1023
1024	  Arg	Where			When
1025	    1	common/cmd_bootm.c	before attempting to boot an image
1026	   -1	common/cmd_bootm.c	Image header has bad	 magic number
1027	    2	common/cmd_bootm.c	Image header has correct magic number
1028	   -2	common/cmd_bootm.c	Image header has bad	 checksum
1029	    3	common/cmd_bootm.c	Image header has correct checksum
1030	   -3	common/cmd_bootm.c	Image data   has bad	 checksum
1031	    4	common/cmd_bootm.c	Image data   has correct checksum
1032	   -4	common/cmd_bootm.c	Image is for unsupported architecture
1033	    5	common/cmd_bootm.c	Architecture check OK
1034	   -5	common/cmd_bootm.c	Wrong Image Type (not kernel, multi)
1035	    6	common/cmd_bootm.c	Image Type check OK
1036	   -6	common/cmd_bootm.c	gunzip uncompression error
1037	   -7	common/cmd_bootm.c	Unimplemented compression type
1038	    7	common/cmd_bootm.c	Uncompression OK
1039	    8	common/cmd_bootm.c	No uncompress/copy overwrite error
1040	   -9	common/cmd_bootm.c	Unsupported OS (not Linux, BSD, VxWorks, QNX)
1041
1042	    9	common/image.c		Start initial ramdisk verification
1043	  -10	common/image.c		Ramdisk header has bad	   magic number
1044	  -11	common/image.c		Ramdisk header has bad	   checksum
1045	   10	common/image.c		Ramdisk header is OK
1046	  -12	common/image.c		Ramdisk data   has bad	   checksum
1047	   11	common/image.c		Ramdisk data   has correct checksum
1048	   12	common/image.c		Ramdisk verification complete, start loading
1049	  -13	common/image.c		Wrong Image Type (not PPC Linux ramdisk)
1050	   13	common/image.c		Start multifile image verification
1051	   14	common/image.c		No initial ramdisk, no multifile, continue.
1052
1053	   15	arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
1054
1055	  -30	arch/powerpc/lib/board.c	Fatal error, hang the system
1056	  -31	post/post.c		POST test failed, detected by post_output_backlog()
1057	  -32	post/post.c		POST test failed, detected by post_run_single()
1058
1059	   34	common/cmd_doc.c	before loading a Image from a DOC device
1060	  -35	common/cmd_doc.c	Bad usage of "doc" command
1061	   35	common/cmd_doc.c	correct usage of "doc" command
1062	  -36	common/cmd_doc.c	No boot device
1063	   36	common/cmd_doc.c	correct boot device
1064	  -37	common/cmd_doc.c	Unknown Chip ID on boot device
1065	   37	common/cmd_doc.c	correct chip ID found, device available
1066	  -38	common/cmd_doc.c	Read Error on boot device
1067	   38	common/cmd_doc.c	reading Image header from DOC device OK
1068	  -39	common/cmd_doc.c	Image header has bad magic number
1069	   39	common/cmd_doc.c	Image header has correct magic number
1070	  -40	common/cmd_doc.c	Error reading Image from DOC device
1071	   40	common/cmd_doc.c	Image header has correct magic number
1072	   41	common/cmd_ide.c	before loading a Image from a IDE device
1073	  -42	common/cmd_ide.c	Bad usage of "ide" command
1074	   42	common/cmd_ide.c	correct usage of "ide" command
1075	  -43	common/cmd_ide.c	No boot device
1076	   43	common/cmd_ide.c	boot device found
1077	  -44	common/cmd_ide.c	Device not available
1078	   44	common/cmd_ide.c	Device available
1079	  -45	common/cmd_ide.c	wrong partition selected
1080	   45	common/cmd_ide.c	partition selected
1081	  -46	common/cmd_ide.c	Unknown partition table
1082	   46	common/cmd_ide.c	valid partition table found
1083	  -47	common/cmd_ide.c	Invalid partition type
1084	   47	common/cmd_ide.c	correct partition type
1085	  -48	common/cmd_ide.c	Error reading Image Header on boot device
1086	   48	common/cmd_ide.c	reading Image Header from IDE device OK
1087	  -49	common/cmd_ide.c	Image header has bad magic number
1088	   49	common/cmd_ide.c	Image header has correct magic number
1089	  -50	common/cmd_ide.c	Image header has bad	 checksum
1090	   50	common/cmd_ide.c	Image header has correct checksum
1091	  -51	common/cmd_ide.c	Error reading Image from IDE device
1092	   51	common/cmd_ide.c	reading Image from IDE device OK
1093	   52	common/cmd_nand.c	before loading a Image from a NAND device
1094	  -53	common/cmd_nand.c	Bad usage of "nand" command
1095	   53	common/cmd_nand.c	correct usage of "nand" command
1096	  -54	common/cmd_nand.c	No boot device
1097	   54	common/cmd_nand.c	boot device found
1098	  -55	common/cmd_nand.c	Unknown Chip ID on boot device
1099	   55	common/cmd_nand.c	correct chip ID found, device available
1100	  -56	common/cmd_nand.c	Error reading Image Header on boot device
1101	   56	common/cmd_nand.c	reading Image Header from NAND device OK
1102	  -57	common/cmd_nand.c	Image header has bad magic number
1103	   57	common/cmd_nand.c	Image header has correct magic number
1104	  -58	common/cmd_nand.c	Error reading Image from NAND device
1105	   58	common/cmd_nand.c	reading Image from NAND device OK
1106
1107	  -60	common/env_common.c	Environment has a bad CRC, using default
1108
1109	   64	net/eth.c		starting with Ethernet configuration.
1110	  -64	net/eth.c		no Ethernet found.
1111	   65	net/eth.c		Ethernet found.
1112
1113	  -80	common/cmd_net.c	usage wrong
1114	   80	common/cmd_net.c	before calling net_loop()
1115	  -81	common/cmd_net.c	some error in net_loop() occurred
1116	   81	common/cmd_net.c	net_loop() back without error
1117	  -82	common/cmd_net.c	size == 0 (File with size 0 loaded)
1118	   82	common/cmd_net.c	trying automatic boot
1119	   83	common/cmd_net.c	running "source" command
1120	  -83	common/cmd_net.c	some error in automatic boot or "source" command
1121	   84	common/cmd_net.c	end without errors
1122
1123	  FIT uImage format:
1124
1125	  Arg	Where			When
1126	  100	common/cmd_bootm.c	Kernel FIT Image has correct format
1127	  -100	common/cmd_bootm.c	Kernel FIT Image has incorrect format
1128	  101	common/cmd_bootm.c	No Kernel subimage unit name, using configuration
1129	  -101	common/cmd_bootm.c	Can't get configuration for kernel subimage
1130	  102	common/cmd_bootm.c	Kernel unit name specified
1131	  -103	common/cmd_bootm.c	Can't get kernel subimage node offset
1132	  103	common/cmd_bootm.c	Found configuration node
1133	  104	common/cmd_bootm.c	Got kernel subimage node offset
1134	  -104	common/cmd_bootm.c	Kernel subimage hash verification failed
1135	  105	common/cmd_bootm.c	Kernel subimage hash verification OK
1136	  -105	common/cmd_bootm.c	Kernel subimage is for unsupported architecture
1137	  106	common/cmd_bootm.c	Architecture check OK
1138	  -106	common/cmd_bootm.c	Kernel subimage has wrong type
1139	  107	common/cmd_bootm.c	Kernel subimage type OK
1140	  -107	common/cmd_bootm.c	Can't get kernel subimage data/size
1141	  108	common/cmd_bootm.c	Got kernel subimage data/size
1142	  -108	common/cmd_bootm.c	Wrong image type (not legacy, FIT)
1143	  -109	common/cmd_bootm.c	Can't get kernel subimage type
1144	  -110	common/cmd_bootm.c	Can't get kernel subimage comp
1145	  -111	common/cmd_bootm.c	Can't get kernel subimage os
1146	  -112	common/cmd_bootm.c	Can't get kernel subimage load address
1147	  -113	common/cmd_bootm.c	Image uncompress/copy overwrite error
1148
1149	  120	common/image.c		Start initial ramdisk verification
1150	  -120	common/image.c		Ramdisk FIT image has incorrect format
1151	  121	common/image.c		Ramdisk FIT image has correct format
1152	  122	common/image.c		No ramdisk subimage unit name, using configuration
1153	  -122	common/image.c		Can't get configuration for ramdisk subimage
1154	  123	common/image.c		Ramdisk unit name specified
1155	  -124	common/image.c		Can't get ramdisk subimage node offset
1156	  125	common/image.c		Got ramdisk subimage node offset
1157	  -125	common/image.c		Ramdisk subimage hash verification failed
1158	  126	common/image.c		Ramdisk subimage hash verification OK
1159	  -126	common/image.c		Ramdisk subimage for unsupported architecture
1160	  127	common/image.c		Architecture check OK
1161	  -127	common/image.c		Can't get ramdisk subimage data/size
1162	  128	common/image.c		Got ramdisk subimage data/size
1163	  129	common/image.c		Can't get ramdisk load address
1164	  -129	common/image.c		Got ramdisk load address
1165
1166	  -130	common/cmd_doc.c	Incorrect FIT image format
1167	  131	common/cmd_doc.c	FIT image format OK
1168
1169	  -140	common/cmd_ide.c	Incorrect FIT image format
1170	  141	common/cmd_ide.c	FIT image format OK
1171
1172	  -150	common/cmd_nand.c	Incorrect FIT image format
1173	  151	common/cmd_nand.c	FIT image format OK
1174
1175config SPL_SHOW_BOOT_PROGRESS
1176	bool "Show boot progress in a board-specific manner in SPL"
1177	depends on SPL
1178	help
1179	  Defining this option allows to add some board-specific code (calling
1180	  a user-provided function show_boot_progress(int) that enables you to
1181	  show the system's boot progress on some display (for example, some
1182	  LEDs) on your board. For details see SHOW_BOOT_PROGRESS.
1183
1184endmenu
1185
1186menu "Boot media"
1187
1188config NOR_BOOT
1189	bool "Support for booting from NOR flash"
1190	depends on NOR
1191	help
1192	  Enabling this will make a U-Boot binary that is capable of being
1193	  booted via NOR.  In this case we will enable certain pinmux early
1194	  as the ROM only partially sets up pinmux.  We also default to using
1195	  NOR for environment.
1196
1197config NAND_BOOT
1198	bool "Support for booting from NAND flash"
1199	imply MTD_RAW_NAND
1200	help
1201	  Enabling this will make a U-Boot binary that is capable of being
1202	  booted via NAND flash. This is not a must, some SoCs need this,
1203	  some not.
1204
1205config ONENAND_BOOT
1206	bool "Support for booting from ONENAND"
1207	imply MTD_RAW_NAND
1208	help
1209	  Enabling this will make a U-Boot binary that is capable of being
1210	  booted via ONENAND. This is not a must, some SoCs need this,
1211	  some not.
1212
1213config QSPI_BOOT
1214	bool "Support for booting from QSPI flash"
1215	help
1216	  Enabling this will make a U-Boot binary that is capable of being
1217	  booted via QSPI flash. This is not a must, some SoCs need this,
1218	  some not.
1219
1220config SATA_BOOT
1221	bool "Support for booting from SATA"
1222	help
1223	  Enabling this will make a U-Boot binary that is capable of being
1224	  booted via SATA. This is not a must, some SoCs need this,
1225	  some not.
1226
1227config SD_BOOT
1228	bool "Support for booting from SD/EMMC"
1229	help
1230	  Enabling this will make a U-Boot binary that is capable of being
1231	  booted via SD/EMMC. This is not a must, some SoCs need this,
1232	  some not.
1233
1234config SD_BOOT_QSPI
1235	bool "Support for booting from SD/EMMC and enable QSPI"
1236	help
1237	  Enabling this will make a U-Boot binary that is capable of being
1238	  booted via SD/EMMC while enabling QSPI on the platform as well. This
1239	  is not a must, some SoCs need this, some not.
1240
1241config SPI_BOOT
1242	bool "Support for booting from SPI flash"
1243	help
1244	  Enabling this will make a U-Boot binary that is capable of being
1245	  booted via SPI flash. This is not a must, some SoCs need this,
1246	  some not.
1247
1248endmenu
1249
1250menu "Autoboot options"
1251
1252config AUTOBOOT
1253	bool "Autoboot"
1254	depends on CMDLINE
1255	default y
1256	help
1257	  This enables the autoboot.  See doc/README.autoboot for detail.
1258
1259if AUTOBOOT
1260
1261config BOOTDELAY
1262	int "delay in seconds before automatically booting"
1263	default 2
1264	help
1265	  Delay before automatically running bootcmd;
1266	  set to 0 to autoboot with no delay, but you can stop it by key input.
1267	  set to -1 to disable autoboot.
1268	  set to -2 to autoboot with no delay and not check for abort
1269
1270	  If this value is >= 0 then it is also used for the default delay
1271	  before starting the default entry in bootmenu. If it is < 0 then
1272	  a default value of 10s is used.
1273
1274	  See doc/README.autoboot for details.
1275
1276config AUTOBOOT_KEYED
1277	bool "Stop autobooting via specific input key / string"
1278	help
1279	  This option enables stopping (aborting) of the automatic
1280	  boot feature only by issuing a specific input key or
1281	  string. If not enabled, any input key will abort the
1282	  U-Boot automatic booting process and bring the device
1283	  to the U-Boot prompt for user input.
1284
1285if AUTOBOOT_KEYED
1286
1287config AUTOBOOT_FLUSH_STDIN
1288	bool "Enable flushing stdin before starting to read the password"
1289	depends on !SANDBOX
1290	help
1291	  When this option is enabled stdin buffer will be flushed before
1292	  starting to read the password.
1293	  This can't be enabled for the sandbox as flushing stdin would
1294	  break the autoboot unit tests.
1295
1296config AUTOBOOT_PROMPT
1297	string "Autoboot stop prompt"
1298	default "Autoboot in %d seconds\\n"
1299	help
1300	  This string is displayed before the boot delay selected by
1301	  CONFIG_BOOTDELAY starts. If it is not defined	there is no
1302	  output indicating that autoboot is in progress.
1303
1304	  Note that this define is used as the (only) argument to a
1305	  printf() call, so it may contain '%' format specifications,
1306	  provided that it also includes, sepearated by commas exactly
1307	  like in a printf statement, the required arguments. It is
1308	  the responsibility of the user to select only such arguments
1309	  that are valid in the given context.
1310
1311config AUTOBOOT_ENCRYPTION
1312	bool "Enable encryption in autoboot stopping"
1313	help
1314	  This option allows a string to be entered into U-Boot to stop the
1315	  autoboot.
1316	  The behavior depends whether CONFIG_CRYPT_PW from lib is enabled
1317	  or not.
1318	  In case CONFIG_CRYPT_PW is enabled, the string will be forwarded
1319	  to the crypt-based functionality and be compared against the
1320	  string in the environment variable 'bootstopkeycrypt'.
1321	  In case CONFIG_CRYPT_PW is disabled the string itself is hashed
1322	  and compared against the hash in the environment variable
1323	  'bootstopkeysha256'.
1324	  If it matches in either case then boot stops and
1325	  a command-line prompt is presented.
1326	  This provides a way to ship a secure production device which can also
1327	  be accessed at the U-Boot command line.
1328
1329config AUTOBOOT_SHA256_FALLBACK
1330	bool "Allow fallback from crypt-hashed password to sha256"
1331	depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
1332	help
1333	  This option adds support to fall back from crypt-hashed
1334	  passwords to checking a SHA256 hashed password in case the
1335	  'bootstopusesha256' environment variable is set to 'true'.
1336
1337config AUTOBOOT_DELAY_STR
1338	string "Delay autobooting via specific input key / string"
1339	depends on !AUTOBOOT_ENCRYPTION
1340	help
1341	  This option delays the automatic boot feature by issuing
1342	  a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR
1343	  or the environment variable "bootdelaykey" is specified
1344	  and this string is received from console input before
1345	  autoboot starts booting, U-Boot gives a command prompt. The
1346	  U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is
1347	  used, otherwise it never times out.
1348
1349config AUTOBOOT_STOP_STR
1350	string "Stop autobooting via specific input key / string"
1351	depends on !AUTOBOOT_ENCRYPTION
1352	help
1353	  This option enables stopping (aborting) of the automatic
1354	  boot feature only by issuing a specific input key or
1355	  string. If CONFIG_AUTOBOOT_STOP_STR or the environment
1356	  variable "bootstopkey" is specified and this string is
1357	  received from console input before autoboot starts booting,
1358	  U-Boot gives a command prompt. The U-Boot prompt never
1359	  times out, even if CONFIG_BOOT_RETRY_TIME is used.
1360
1361config AUTOBOOT_KEYED_CTRLC
1362	bool "Enable Ctrl-C autoboot interruption"
1363	depends on !AUTOBOOT_ENCRYPTION
1364	help
1365	  This option allows for the boot sequence to be interrupted
1366	  by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey".
1367	  Setting this variable	provides an escape sequence from the
1368	  limited "password" strings.
1369
1370config AUTOBOOT_NEVER_TIMEOUT
1371	bool "Make the password entry never time-out"
1372	depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
1373	help
1374	  This option removes the timeout from the password entry
1375	  when the user first presses the <Enter> key before entering
1376	  any other character.
1377
1378config AUTOBOOT_STOP_STR_ENABLE
1379	bool "Enable fixed string to stop autobooting"
1380	depends on AUTOBOOT_ENCRYPTION
1381	help
1382	  This option enables the feature to add a fixed stop
1383	  string that is defined at compile time.
1384	  In every case it will be tried to load the stop
1385	  string from the environment.
1386	  In case this is enabled and there is no stop string
1387	  in the environment, this will be used as default value.
1388
1389config AUTOBOOT_STOP_STR_CRYPT
1390	string "Stop autobooting via crypt-hashed password"
1391	depends on AUTOBOOT_STOP_STR_ENABLE && CRYPT_PW
1392	help
1393	  This option adds the feature to only stop the autobooting,
1394	  and therefore boot into the U-Boot prompt, when the input
1395	  string / password matches a values that is hashed via
1396	  one of the supported crypt-style password hashing options
1397	  and saved in the environment variable "bootstopkeycrypt".
1398
1399config AUTOBOOT_STOP_STR_SHA256
1400	string "Stop autobooting via SHA256 hashed password"
1401	depends on AUTOBOOT_STOP_STR_ENABLE
1402	help
1403	  This option adds the feature to only stop the autobooting,
1404	  and therefore boot into the U-Boot prompt, when the input
1405	  string / password matches a values that is encypted via
1406	  a SHA256 hash and saved in the environment variable
1407	  "bootstopkeysha256". If the value in that variable
1408	  includes a ":", the portion prior to the ":" will be treated
1409	  as a salt value.
1410
1411endif  # AUTOBOOT_KEYED
1412
1413if !AUTOBOOT_KEYED
1414
1415config AUTOBOOT_USE_MENUKEY
1416	bool "Allow a specify key to run a menu from the environment"
1417	help
1418	  If a specific key is pressed to stop autoboot, then the commands in
1419	  the environment variable 'menucmd' are executed before boot starts.
1420
1421config AUTOBOOT_MENUKEY
1422	int "ASCII value of boot key to show a menu"
1423	default 0
1424	depends on AUTOBOOT_USE_MENUKEY
1425	help
1426	  If this key is pressed to stop autoboot, then the commands in the
1427	  environment variable 'menucmd' will be executed before boot starts.
1428	  For example, 33 means "!" in ASCII, so pressing ! at boot would take
1429	  this action.
1430
1431endif
1432
1433endif  # AUTOBOOT
1434
1435config AUTOBOOT_MENU_SHOW
1436	bool "Show a menu on boot"
1437	depends on CMD_BOOTMENU
1438	help
1439	  This enables the boot menu, controlled by environment variables
1440	  defined by the board. The menu starts after running the 'preboot'
1441	  environmnent variable (if enabled) and before handling the boot delay.
1442	  See doc/usage/cmd/bootmenu.rst for more details.
1443
1444config BOOTMENU_DISABLE_UBOOT_CONSOLE
1445	bool "Disallow bootmenu to enter the U-Boot console"
1446	depends on AUTOBOOT_MENU_SHOW
1447	help
1448	  If this option is enabled, user can not enter the U-Boot console from
1449	  bootmenu. It increases the system security.
1450
1451config BOOT_RETRY
1452	bool "Boot retry feature"
1453	help
1454	  Allow for having the U-Boot command prompt time out and attempt
1455	  to boot again.  If the environment variable "bootretry" is found then
1456	  its value is used, otherwise the retry timeout is
1457	  CONFIG_BOOT_RETRY_TIME.  CONFIG_BOOT_RETRY_MIN is optional and
1458	  defaults to CONFIG_BOOT_RETRY_TIME. All times are in seconds.
1459
1460config BOOT_RETRY_TIME
1461	int "Timeout in seconds before attempting to boot again"
1462	depends on BOOT_RETRY
1463	help
1464	  Time in seconds before the U-Boot prompt will timeout and boot will
1465	  be attempted again.
1466
1467config BOOT_RETRY_MIN
1468	int "Minimum timeout in seconds for 'bootretry'"
1469	depends on BOOT_RETRY
1470	default BOOT_RETRY_TIME
1471	help
1472	  The minimum time in seconds that "bootretry" can be set to.
1473
1474config RESET_TO_RETRY
1475	bool "Reset the board to retry autoboot"
1476	depends on BOOT_RETRY
1477	help
1478	  After the countdown timed out, the board will be reset to restart
1479	  again.
1480
1481endmenu
1482
1483menu "Image support"
1484
1485config IMAGE_PRE_LOAD
1486	bool "Image pre-load support"
1487	help
1488	  Enable an image pre-load stage in the SPL.
1489	  This pre-load stage allows to do some manipulation
1490	  or check (for example signature check) on an image
1491	  before launching it.
1492
1493config SPL_IMAGE_PRE_LOAD
1494	bool "Image pre-load support within SPL"
1495	depends on SPL && IMAGE_PRE_LOAD
1496	help
1497	  Enable an image pre-load stage in the SPL.
1498	  This pre-load stage allows to do some manipulation
1499	  or check (for example signature check) on an image
1500	  before launching it.
1501
1502config IMAGE_PRE_LOAD_SIG
1503	bool "Image pre-load signature support"
1504	depends on IMAGE_PRE_LOAD
1505	select FIT_SIGNATURE
1506	select RSA
1507	select RSA_VERIFY_WITH_PKEY
1508	help
1509	  Enable signature check support in the pre-load stage.
1510	  For this feature a very simple header is added before
1511	  the image with few fields:
1512	  - a magic
1513	  - the image size
1514	  - the signature
1515	  All other information (header size, type of signature,
1516	  ...) are provided in the node /image/pre-load/sig of
1517	  u-boot.
1518
1519config SPL_IMAGE_PRE_LOAD_SIG
1520	bool "Image pre-load signature support witin SPL"
1521	depends on SPL_IMAGE_PRE_LOAD && IMAGE_PRE_LOAD_SIG
1522	select SPL_FIT_SIGNATURE
1523	select SPL_RSA
1524	select SPL_RSA_VERIFY_WITH_PKEY
1525	help
1526	  Enable signature check support in the pre-load stage in the SPL.
1527	  For this feature a very simple header is added before
1528	  the image with few fields:
1529	  - a magic
1530	  - the image size
1531	  - the signature
1532	  All other information (header size, type of signature,
1533	  ...) are provided in the node /image/pre-load/sig of
1534	  u-boot.
1535
1536endmenu
1537
1538if OF_LIBFDT
1539
1540menu "Devicetree fixup"
1541
1542config OF_ENV_SETUP
1543	bool "Run a command from environment to set up device tree before boot"
1544	depends on CMD_FDT
1545	help
1546	  This causes U-Boot to run a command from the environment variable
1547	  fdt_fixup before booting into the operating system, which can use the
1548	  fdt command to modify the device tree. The device tree is then passed
1549	  to the OS.
1550
1551config OF_BOARD_SETUP
1552	bool "Set up board-specific details in device tree before boot"
1553	help
1554	  This causes U-Boot to call ft_board_setup() before booting into
1555	  the Operating System. This function can set up various
1556	  board-specific information in the device tree for use by the OS.
1557	  The device tree is then passed to the OS.
1558
1559config OF_SYSTEM_SETUP
1560	bool "Set up system-specific details in device tree before boot"
1561	help
1562	  This causes U-Boot to call ft_system_setup() before booting into
1563	  the Operating System. This function can set up various
1564	  system-specific information in the device tree for use by the OS.
1565	  The device tree is then passed to the OS.
1566
1567config OF_STDOUT_VIA_ALIAS
1568	bool "Update the device-tree stdout alias from U-Boot"
1569	help
1570	  This uses U-Boot's serial alias from the aliases node to update
1571	  the device tree passed to the OS. The "linux,stdout-path" property
1572	  in the chosen node is set to point to the correct serial node.
1573	  This option currently references CONFIG_CONS_INDEX, which is
1574	  incorrect when used with device tree as this option does not
1575	  exist / should not be used.
1576
1577config FDT_FIXUP_PARTITIONS
1578	bool "Overwrite MTD partitions in DTS through defined in 'mtdparts'"
1579	help
1580	  Allow overwriting defined partitions in the device tree blob
1581	  using partition info defined in the 'mtdparts' environment
1582	  variable.
1583
1584config FDT_SIMPLEFB
1585	bool "FDT tools for simplefb support"
1586	help
1587	  Enable the fdt tools to manage the simple fb nodes in device tree.
1588	  These functions can be used by board to indicate to the OS
1589	  the presence of the simple frame buffer with associated reserved
1590	  memory
1591
1592config ARCH_FIXUP_FDT_MEMORY
1593	bool "Enable arch_fixup_memory_banks() call"
1594	default y
1595	help
1596	  Enable FDT memory map syncup before OS boot. This feature can be
1597	  used for booting OS with different memory setup where the part of
1598	  the memory location should be used for different purpose.
1599
1600endmenu
1601
1602endif # OF_LIBFDT
1603
1604config USE_BOOTARGS
1605	bool "Enable boot arguments"
1606	help
1607	  Provide boot arguments to bootm command. Boot arguments are specified
1608	  in CONFIG_BOOTARGS option. Enable this option to be able to specify
1609	  CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
1610	  will be undefined and won't take any space in U-Boot image.
1611
1612config BOOTARGS
1613	string "Boot arguments"
1614	depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE
1615	help
1616	  This can be used to pass arguments to the bootm command. The value of
1617	  CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
1618	  this value will also override the "chosen" node in FDT blob.
1619
1620config BOOTARGS_SUBST
1621	bool "Support substituting strings in boot arguments"
1622	help
1623	  This allows substituting string values in the boot arguments. These
1624	  are applied after the commandline has been built.
1625
1626	  One use for this is to insert the root-disk UUID into the command
1627	  line where bootargs contains "root=${uuid}"
1628
1629		setenv bootargs "console= root=${uuid}"
1630		# Set the 'uuid' environment variable
1631		part uuid mmc 2:2 uuid
1632
1633		# Command-line substitution will put the real uuid into the
1634		# kernel command line
1635		bootm
1636
1637config USE_BOOTCOMMAND
1638	bool "Enable a default value for bootcmd"
1639	depends on CMDLINE
1640	help
1641	  Provide a default value for the bootcmd entry in the environment.  If
1642	  autoboot is enabled this is what will be run automatically.  Enable
1643	  this option to be able to specify CONFIG_BOOTCOMMAND as a string.  If
1644	  this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
1645	  won't take any space in U-Boot image.
1646
1647config BOOTCOMMAND
1648	string "bootcmd value"
1649	depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
1650	default "bootflow scan -lb" if BOOTSTD_DEFAULTS && CMD_BOOTFLOW_FULL
1651	default "bootflow scan" if BOOTSTD_DEFAULTS && !CMD_BOOTFLOW_FULL
1652	default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS
1653	help
1654	  This is the string of commands that will be used as bootcmd and if
1655	  AUTOBOOT is set, automatically run.
1656
1657config USE_PREBOOT
1658	bool "Enable preboot"
1659	depends on CMDLINE
1660	help
1661	  When this option is enabled, the existence of the environment
1662	  variable "preboot" will be checked immediately before starting the
1663	  CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
1664	  entering interactive mode.
1665
1666	  This feature is especially useful when "preboot" is automatically
1667	  generated or modified. For example, the boot code can modify the
1668	  "preboot" when a user holds down a certain combination of keys.
1669
1670config PREBOOT
1671	string "preboot default value"
1672	depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE
1673	default "usb start" if USB_KEYBOARD
1674	default ""
1675	help
1676	  This is the default of "preboot" environment variable.
1677
1678config PREBOOT_DEFINED
1679	bool
1680	default y if PREBOOT != ""
1681
1682config DEFAULT_FDT_FILE
1683	string "Default fdt file"
1684	help
1685	  This option is used to set the default fdt file to boot OS.
1686
1687config SAVE_PREV_BL_FDT_ADDR
1688	depends on ARM
1689	bool "Saves fdt address, passed by the previous bootloader, to env var"
1690	help
1691	  When u-boot is used as a chain-loaded bootloader (replacing OS kernel),
1692	  enable this option to save fdt address, passed by the
1693	  previous bootloader for future use.
1694	  Address is saved to `prevbl_fdt_addr` environment variable.
1695
1696	  If no fdt was provided by previous bootloader, no env variables
1697	  will be created.
1698
1699config SAVE_PREV_BL_INITRAMFS_START_ADDR
1700	depends on ARM
1701	bool "Saves initramfs address, passed by the previous bootloader, to env var"
1702	help
1703	  When u-boot is used as a chain-loaded bootloader(replacing OS kernel),
1704	  enable this option to save initramfs address, passed by the
1705	  previous bootloader for future use.
1706	  Address is saved to `prevbl_initrd_start_addr` environment variable.
1707
1708	  If no initramfs was provided by previous bootloader, no env variables
1709	  will be created.
1710
1711menu "Configuration editor"
1712
1713config CEDIT
1714	bool "Configuration editor"
1715	depends on EXPO
1716	help
1717	  Provides a way to deal with board configuration and present it to
1718	  the user for adjustment.
1719
1720	  This is intended to provide both graphical and text-based user
1721	  interfaces, but only graphical is support at present.
1722
1723endmenu		# Configuration editor
1724
1725endmenu		# Booting
1726