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