blob: 4314227d5f86d9065cfb5181e3a6c60f0aa1b13a [file] [log] [blame]
Simon Glasscf298162020-09-10 20:21:13 -06001menu "Boot options"
2
Ilias Apalodimas775f7652024-08-30 14:45:27 +03003source "lib/efi_loader/Kconfig"
4
Simon Glasscf298162020-09-10 20:21:13 -06005menu "Boot images"
6
Tom Rinicdd20e32024-04-18 08:29:35 -06007config 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 TIMESTAMP
15 bool "Show image date and time when displaying image information"
16 default y if CMD_DATE
17 help
18 When CONFIG_TIMESTAMP is selected, the timestamp (date and time) of
19 an image is printed by image commands like bootm or iminfo. This
20 is shown as 'Timestamp: xxx' and 'Created: xxx'. If this option is
21 enabled, then U-Boot requires FITs to have a timestamp. If a FIT is
22 loaded that does not, the message 'Wrong FIT format: no timestamp'
23 is shown.
24
25config BUTTON_CMD
26 bool "Support for running a command if a button is held during boot"
27 depends on CMDLINE
28 depends on BUTTON
29 help
30 For many embedded devices it's useful to enter a special flashing mode
31 such as fastboot mode when a button is held during boot. This option
32 allows arbitrary commands to be assigned to specific buttons. These will
33 be run after "preboot" if the button is held. Configuration is done via
34 the environment variables "button_cmd_N_name" and "button_cmd_N" where n is
35 the button number (starting from 0). e.g:
36
37 "button_cmd_0_name=vol_down"
38 "button_cmd_0=fastboot usb 0"
39
Simon Glass12a7ea02023-09-14 10:55:49 -060040menuconfig FIT
41 bool "Flattened Image Tree (FIT)"
Alexandru Gagniuc92055e12021-09-02 19:54:21 -050042 select HASH
Simon Glasscf298162020-09-10 20:21:13 -060043 select MD5
44 select SHA1
Alexandru Gagniuceb5171d2021-09-02 19:54:17 -050045 imply SHA256
Simon Glasscf298162020-09-10 20:21:13 -060046 help
47 This option allows you to boot the new uImage structure,
48 Flattened Image Tree. FIT is formally a FDT, which can include
49 images of various types (kernel, FDT blob, ramdisk, etc.)
50 in a single blob. To boot this new uImage structure,
51 pass the address of the blob to the "bootm" command.
52 FIT is very flexible, supporting compression, multiple images,
53 multiple configurations, verification through hashing and also
54 verified boot (secure boot using RSA).
55
Simon Glass12a7ea02023-09-14 10:55:49 -060056if FIT
Simon Glassd6b318d2021-12-18 11:27:50 -070057
Simon Glasscf298162020-09-10 20:21:13 -060058config FIT_EXTERNAL_OFFSET
59 hex "FIT external data offset"
60 default 0x0
61 help
62 This specifies a data offset in fit image.
63 The offset is from data payload offset to the beginning of
64 fit image header. When specifies a offset, specific data
65 could be put in the hole between data payload and fit image
66 header, such as CSF data on i.MX platform.
67
Simon Glass6f3c2d82021-02-15 17:08:10 -070068config FIT_FULL_CHECK
69 bool "Do a full check of the FIT before using it"
70 default y
71 help
72 Enable this do a full check of the FIT to make sure it is valid. This
73 helps to protect against carefully crafted FITs which take advantage
74 of bugs or omissions in the code. This includes a bad structure,
75 multiple root nodes and the like.
76
Simon Glasscf298162020-09-10 20:21:13 -060077config FIT_SIGNATURE
78 bool "Enable signature verification of FIT uImages"
Simon Glass12a7ea02023-09-14 10:55:49 -060079 depends on DM
Simon Glasscf298162020-09-10 20:21:13 -060080 select HASH
Alexandru Gagniuc61416fe2021-07-29 11:47:18 -050081 imply RSA
82 imply RSA_VERIFY
Simon Glasscf298162020-09-10 20:21:13 -060083 select IMAGE_SIGN_INFO
Simon Glass6f3c2d82021-02-15 17:08:10 -070084 select FIT_FULL_CHECK
Simon Glasscf298162020-09-10 20:21:13 -060085 help
86 This option enables signature verification of FIT uImages,
87 using a hash signed and verified using RSA. If
88 CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
89 hashing is available using hardware, then the RSA library will use
Heinrich Schuchardt3fc9de42024-06-18 08:23:17 +020090 it. See doc/usage/fit/signature.rst for more details.
Simon Glasscf298162020-09-10 20:21:13 -060091
92 WARNING: When relying on signed FIT images with a required signature
93 check the legacy image format is disabled by default, so that
94 unsigned images cannot be loaded. If a board needs the legacy image
95 format support in this case, enable it using
96 CONFIG_LEGACY_IMAGE_FORMAT.
97
98config FIT_SIGNATURE_MAX_SIZE
99 hex "Max size of signed FIT structures"
100 depends on FIT_SIGNATURE
101 default 0x10000000
102 help
103 This option sets a max size in bytes for verified FIT uImages.
104 A sane value of 256MB protects corrupted DTB structures from overlapping
105 device memory. Assure this size does not extend past expected storage
106 space.
107
Simon Glassad74aed2021-07-14 17:05:31 -0500108config FIT_RSASSA_PSS
Simon Glasscf298162020-09-10 20:21:13 -0600109 bool "Support rsassa-pss signature scheme of FIT image contents"
110 depends on FIT_SIGNATURE
Simon Glasscf298162020-09-10 20:21:13 -0600111 help
112 Enable this to support the pss padding algorithm as described
113 in the rfc8017 (https://tools.ietf.org/html/rfc8017).
114
115config FIT_CIPHER
116 bool "Enable ciphering data in a FIT uImages"
Simon Glass12a7ea02023-09-14 10:55:49 -0600117 depends on DM
Simon Glasscf298162020-09-10 20:21:13 -0600118 select AES
119 help
120 Enable the feature of data ciphering/unciphering in the tool mkimage
121 and in the u-boot support of the FIT image.
122
123config FIT_VERBOSE
124 bool "Show verbose messages when FIT images fail"
125 help
126 Generally a system will have valid FIT images so debug messages
127 are a waste of code space. If you are debugging your images then
128 you can enable this option to get more verbose information about
129 failures.
130
131config FIT_BEST_MATCH
132 bool "Select the best match for the kernel device tree"
133 help
134 When no configuration is explicitly selected, default to the
135 one whose fdt's compatibility field best matches that of
136 U-Boot itself. A match is considered "best" if it matches the
137 most specific compatibility entry of U-Boot's fdt's root node.
138 The order of entries in the configuration's fdt is ignored.
139
140config FIT_IMAGE_POST_PROCESS
141 bool "Enable post-processing of FIT artifacts after loading by U-Boot"
Manorit Chawdhry86fab112023-07-14 11:22:40 +0530142 depends on SOCFPGA_SECURE_VAB_AUTH
Simon Glasscf298162020-09-10 20:21:13 -0600143 help
144 Allows doing any sort of manipulation to blobs after they got extracted
145 from FIT images like stripping off headers or modifying the size of the
146 blob, verification, authentication, decryption etc. in a platform or
147 board specific way. In order to use this feature a platform or board-
148 specific implementation of board_fit_image_post_process() must be
149 provided. Also, anything done during this post-processing step would
150 need to be comprehended in how the images were prepared before being
151 injected into the FIT creation (i.e. the blobs would have been pre-
152 processed before being added to the FIT image).
153
Ravik Hasija7a018822021-01-27 14:01:48 -0800154config FIT_PRINT
Anand Moon608a88c2024-06-23 23:10:21 +0530155 bool "Support FIT printing"
156 default y
157 help
158 Support printing the content of the fitImage in a verbose manner.
Ravik Hasija7a018822021-01-27 14:01:48 -0800159
Simon Glasscf298162020-09-10 20:21:13 -0600160config SPL_FIT
161 bool "Support Flattened Image Tree within SPL"
Simon Glass4d8ea262023-09-14 10:55:52 -0600162 depends on SPL
Alexandru Gagniuc92055e12021-09-02 19:54:21 -0500163 select SPL_HASH
Simon Glasscf298162020-09-10 20:21:13 -0600164 select SPL_OF_LIBFDT
165
166config SPL_FIT_PRINT
167 bool "Support FIT printing within SPL"
168 depends on SPL_FIT
169 help
170 Support printing the content of the fitImage in a verbose manner in SPL.
171
Simon Glass6f3c2d82021-02-15 17:08:10 -0700172config SPL_FIT_FULL_CHECK
173 bool "Do a full check of the FIT before using it"
Tom Rini90c78882022-12-04 10:14:20 -0500174 depends on SPL_FIT
Simon Glass6f3c2d82021-02-15 17:08:10 -0700175 help
176 Enable this do a full check of the FIT to make sure it is valid. This
177 helps to protect against carefully crafted FITs which take advantage
178 of bugs or omissions in the code. This includes a bad structure,
179 multiple root nodes and the like.
180
Simon Glasscf298162020-09-10 20:21:13 -0600181config SPL_FIT_SIGNATURE
182 bool "Enable signature verification of FIT firmware within SPL"
183 depends on SPL_DM
Klaus Heinrich Kiwibdb7f262021-02-09 15:41:54 -0300184 depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
Klaus Heinrich Kiwi6ce28132021-02-09 15:41:53 -0300185 select FIT_SIGNATURE
Simon Glasscf298162020-09-10 20:21:13 -0600186 select SPL_FIT
Simon Glass0c6bdbb2021-07-10 21:14:25 -0600187 select SPL_CRYPTO
Alexandru Gagniuc07212092021-09-02 19:54:19 -0500188 select SPL_HASH
Alexandru Gagniuc61416fe2021-07-29 11:47:18 -0500189 imply SPL_RSA
190 imply SPL_RSA_VERIFY
Simon Glasscf298162020-09-10 20:21:13 -0600191 select SPL_IMAGE_SIGN_INFO
Simon Glass6f3c2d82021-02-15 17:08:10 -0700192 select SPL_FIT_FULL_CHECK
Simon Glasscf298162020-09-10 20:21:13 -0600193
Simon Glassb53541f2021-09-25 19:43:39 -0600194config SPL_FIT_SIGNATURE_MAX_SIZE
195 hex "Max size of signed FIT structures in SPL"
196 depends on SPL_FIT_SIGNATURE
197 default 0x10000000
198 help
199 This option sets a max size in bytes for verified FIT uImages.
200 A sane value of 256MB protects corrupted DTB structures from overlapping
201 device memory. Assure this size does not extend past expected storage
202 space.
203
Philippe Reynes5d39c932021-10-15 11:35:03 +0200204config SPL_FIT_RSASSA_PSS
205 bool "Support rsassa-pss signature scheme of FIT image contents in SPL"
206 depends on SPL_FIT_SIGNATURE
207 help
208 Enable this to support the pss padding algorithm as described
209 in the rfc8017 (https://tools.ietf.org/html/rfc8017) in SPL.
210
Simon Glasscf298162020-09-10 20:21:13 -0600211config SPL_LOAD_FIT
212 bool "Enable SPL loading U-Boot as a FIT (basic fitImage features)"
Simon Glass4d8ea262023-09-14 10:55:52 -0600213 depends on SPL
Simon Glasscf298162020-09-10 20:21:13 -0600214 select SPL_FIT
215 help
216 Normally with the SPL framework a legacy image is generated as part
217 of the build. This contains U-Boot along with information as to
218 where it should be loaded. This option instead enables generation
219 of a FIT (Flat Image Tree) which provides more flexibility. In
220 particular it can handle selecting from multiple device tree
221 and passing the correct one to U-Boot.
222
Alexandru Gagniucdf51ae72021-03-29 12:05:15 -0500223 This path has the following limitations:
224
Bin Meng6e847f62021-05-10 20:23:29 +0800225 1. "loadables" images, other than FDTs, which do not have a "load"
Alexandru Gagniucdf51ae72021-03-29 12:05:15 -0500226 property will not be loaded. This limitation also applies to FPGA
227 images with the correct "compatible" string.
Heinrich Schuchardt3fc9de42024-06-18 08:23:17 +0200228 2. For FPGA images, the supported "compatible" list may be found in
229 https://fitspec.osfw.foundation/.
Alexandru Gagniucdf51ae72021-03-29 12:05:15 -0500230 3. FDTs are only loaded for images with an "os" property of "u-boot".
231 "linux" images are also supported with Falcon boot mode.
232
Simon Glasscf298162020-09-10 20:21:13 -0600233config SPL_LOAD_FIT_ADDRESS
234 hex "load address of fit image"
Simon Glass815f8d32023-09-14 10:55:51 -0600235 depends on SPL_LOAD_FIT
Simon Glasscf298162020-09-10 20:21:13 -0600236 default 0x0
237 help
238 Specify the load address of the fit image that will be loaded
239 by SPL.
240
241config SPL_LOAD_FIT_APPLY_OVERLAY
242 bool "Enable SPL applying DT overlays from FIT"
243 depends on SPL_LOAD_FIT
244 select OF_LIBFDT_OVERLAY
245 help
Hugo Villeneuveb4230372023-04-24 16:51:12 -0400246 The device tree is loaded from the FIT image. Allow the SPL to
Simon Glasscf298162020-09-10 20:21:13 -0600247 also load device-tree overlays from the FIT image an apply them
248 over the device tree.
249
250config SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ
251 depends on SPL_LOAD_FIT_APPLY_OVERLAY
252 default 0x10000
253 hex "size of temporary buffer used to load the overlays"
254 help
255 The size of the area where the overlays will be loaded and
256 uncompress. Must be at least as large as biggest overlay
257 (uncompressed)
258
259config SPL_LOAD_FIT_FULL
260 bool "Enable SPL loading U-Boot as a FIT (full fitImage features)"
261 select SPL_FIT
262 help
263 Normally with the SPL framework a legacy image is generated as part
264 of the build. This contains U-Boot along with information as to
265 where it should be loaded. This option instead enables generation
266 of a FIT (Flat Image Tree) which provides more flexibility. In
267 particular it can handle selecting from multiple device tree
268 and passing the correct one to U-Boot.
269
270config SPL_FIT_IMAGE_POST_PROCESS
271 bool "Enable post-processing of FIT artifacts after loading by the SPL"
272 depends on SPL_LOAD_FIT
Andrew Davis042e87e2022-05-04 15:52:28 -0500273 default y if TI_SECURE_DEVICE
Simon Glasscf298162020-09-10 20:21:13 -0600274 help
275 Allows doing any sort of manipulation to blobs after they got extracted
276 from the U-Boot FIT image like stripping off headers or modifying the
277 size of the blob, verification, authentication, decryption etc. in a
278 platform or board specific way. In order to use this feature a platform
279 or board-specific implementation of board_fit_image_post_process() must
280 be provided. Also, anything done during this post-processing step would
281 need to be comprehended in how the images were prepared before being
282 injected into the FIT creation (i.e. the blobs would have been pre-
283 processed before being added to the FIT image).
284
Simon Glass42184562022-10-20 18:23:13 -0600285if VPL
286
287config VPL_FIT
288 bool "Support Flattened Image Tree within VPL"
289 depends on VPL
290 default y
291 select VPL_HASH
292 select VPL_OF_LIBFDT
293
294config VPL_FIT_PRINT
295 bool "Support FIT printing within VPL"
296 depends on VPL_FIT
297 default y
298 help
299 Support printing the content of the fitImage in a verbose manner in VPL.
300
301config VPL_FIT_FULL_CHECK
302 bool "Do a full check of the FIT before using it"
303 default y
304 help
305 Enable this do a full check of the FIT to make sure it is valid. This
306 helps to protect against carefully crafted FITs which take advantage
307 of bugs or omissions in the code. This includes a bad structure,
308 multiple root nodes and the like.
309
310config VPL_FIT_SIGNATURE
311 bool "Enable signature verification of FIT firmware within VPL"
312 depends on VPL_DM
Simon Glass42184562022-10-20 18:23:13 -0600313 default y
314 select FIT_SIGNATURE
315 select VPL_FIT
316 select VPL_CRYPTO
317 select VPL_HASH
318 imply VPL_RSA
319 imply VPL_RSA_VERIFY
320 select VPL_IMAGE_SIGN_INFO
321 select VPL_FIT_FULL_CHECK
322
323config VPL_FIT_SIGNATURE_MAX_SIZE
324 hex "Max size of signed FIT structures in VPL"
325 depends on VPL_FIT_SIGNATURE
326 default 0x10000000
327 help
328 This option sets a max size in bytes for verified FIT uImages.
329 A sane value of 256MB protects corrupted DTB structures from overlapping
330 device memory. Assure this size does not extend past expected storage
331 space.
332
333endif # VPL
334
Simon Glass4d8ea262023-09-14 10:55:52 -0600335endif # FIT
336
John Keepingbe43a352022-07-28 11:19:15 +0100337config PXE_UTILS
338 bool
339 select MENU
340 help
341 Utilities for parsing PXE file formats.
342
Tom Rini2180a452023-10-26 14:31:24 -0400343config BOOT_DEFAULTS_FEATURES
344 bool
345 select SUPPORT_RAW_INITRD
346 select ENV_VARS_UBOOT_CONFIG
347 imply USB_STORAGE
348 imply EFI_PARTITION
349 imply ISO_PARTITION
350
351config BOOT_DEFAULTS_CMDS
352 bool
Simon Glassa0c739c2023-03-24 16:58:13 -0400353 imply USE_BOOTCOMMAND
354 select CMD_ENV_EXISTS
355 select CMD_EXT2
356 select CMD_EXT4
357 select CMD_FAT
358 select CMD_FS_GENERIC
359 select CMD_PART if PARTITIONS
360 select CMD_DHCP if CMD_NET
361 select CMD_PING if CMD_NET
362 select CMD_PXE if CMD_NET
Simon Glassa0c739c2023-03-24 16:58:13 -0400363 select CMD_BOOTI if ARM64
364 select CMD_BOOTZ if ARM && !ARM64
365 imply CMD_MII if NET
Tom Rini2180a452023-10-26 14:31:24 -0400366
367config BOOT_DEFAULTS
368 bool # Common defaults for standard boot and distroboot
369 select BOOT_DEFAULTS_FEATURES
370 select BOOT_DEFAULTS_CMDS if CMDLINE
Simon Glassa0c739c2023-03-24 16:58:13 -0400371 help
372 These are not required but are commonly needed to support a good
373 selection of booting methods. Enable this to improve the capability
374 of U-Boot to boot various images. Currently much functionality is
375 tied to enabling the command that exercises it.
376
Simon Glass4a8fcb62023-09-14 10:55:53 -0600377menuconfig BOOTSTD
378 bool "Standard boot"
Simon Glassef5e3892022-04-24 23:31:06 -0600379 default y
380 depends on DM && OF_CONTROL && BLK
381 help
382 U-Boot supports a standard way of locating something to boot,
383 typically an Operating System such as Linux, provided by a distro such
384 as Arch Linux or Debian. Enable this to support iterating through
385 available bootdevs and using bootmeths to find bootflows suitable for
386 booting.
387
388 Standard boot is not a standard way of booting, just a framework
389 within U-Boot for supporting all the different ways that exist.
390
391 Terminology:
392
393 - bootdev - a device which can hold a distro (e.g. MMC)
394 - bootmeth - a method to scan a bootdev to find bootflows (owned by
395 U-Boot)
396 - bootflow - a description of how to boot (owned by the distro)
397
Simon Glass4a8fcb62023-09-14 10:55:53 -0600398if BOOTSTD
399
Simon Glass42184562022-10-20 18:23:13 -0600400config SPL_BOOTSTD
Simon Glass1c419582023-02-22 09:33:58 -0700401 bool "Standard boot support in SPL"
Simon Glass42184562022-10-20 18:23:13 -0600402 depends on SPL && SPL_DM && SPL_OF_CONTROL && SPL_BLK
403 default y if VPL
404 help
Quentin Schulzb88950f2024-06-12 16:58:47 +0200405 This enables standard boot in SPL. This is needed so that VBE
Simon Glass42184562022-10-20 18:23:13 -0600406 (Verified Boot for Embedded) can be used, since it depends on standard
407 boot. It is enabled by default since the main purpose of VPL is to
408 handle the firmware part of VBE.
409
410config VPL_BOOTSTD
411 bool "Standard boot support in VPL"
412 depends on VPL && VPL_DM && VPL_OF_CONTROL && VPL_BLK
413 default y
414 help
Quentin Schulzb88950f2024-06-12 16:58:47 +0200415 This enables standard boot in SPL. This is needed so that VBE
Simon Glass42184562022-10-20 18:23:13 -0600416 (Verified Boot for Embedded) can be used, since it depends on standard
417 boot. It is enabled by default since the main purpose of VPL is to
418 handle the firmware part of VBE.
419
Simon Glassbcb1d262023-02-22 14:06:23 -0700420config BOOTSTD_FULL
421 bool "Enhanced features for standard boot"
422 default y if SANDBOX
Shantur Rathorefea3efb2023-12-23 06:51:59 +0000423 imply BOOTSTD_DEFAULTS
Simon Glassbcb1d262023-02-22 14:06:23 -0700424 help
425 This enables various useful features for standard boot, which are not
426 essential for operation:
427
428 - bootdev, bootmeth commands
429 - extra features in the bootflow command
430 - support for selecting the ordering of bootmeths ("bootmeth order")
Quentin Schulzb88950f2024-06-12 16:58:47 +0200431 - support for selecting the ordering of bootdevs using the Device Tree
Simon Glassbcb1d262023-02-22 14:06:23 -0700432 as well as the "boot_targets" environment variable
433
Simon Glass22353fa2023-01-28 15:00:21 -0700434config BOOTSTD_DEFAULTS
435 bool "Select some common defaults for standard boot"
436 depends on BOOTSTD
Simon Glassa0c739c2023-03-24 16:58:13 -0400437 select BOOT_DEFAULTS
Simon Glassfba0e732023-05-10 16:34:47 -0600438 select BOOTMETH_DISTRO
Simon Glass22353fa2023-01-28 15:00:21 -0700439 help
440 These are not required but are commonly needed to support a good
441 selection of booting methods. Enable this to improve the capability
442 of U-Boot to boot various images.
443
Simon Glassa91492b2022-04-24 23:31:27 -0600444config BOOTSTD_BOOTCOMMAND
445 bool "Use bootstd to boot"
446 default y if !DISTRO_DEFAULTS
447 help
448 Enable this to select a default boot-command suitable for booting
449 with standard boot. This can be overridden by the board if needed,
450 but the default command should be enough for most boards which use
451 standard boot.
452
453 For now this is only selected if distro boot is NOT used, since
454 standard boot does not support all of the features of distro boot
455 yet.
456
Simon Glass1047b532023-11-18 14:05:19 -0700457config BOOTSTD_PROG
458 bool "Use programmatic boot"
459 depends on !CMDLINE
460 default y
461 help
462 Enable this to provide a board_run_command() function which can boot
Quentin Schulzb88950f2024-06-12 16:58:47 +0200463 a system without using commands. If the boot fails, then U-Boot will
Simon Glass1047b532023-11-18 14:05:19 -0700464 panic.
465
466 Note: This currently has many limitations and is not a useful booting
467 solution. Future work will eventually make this a viable option.
468
Simon Glassbc06aa02022-07-30 15:52:21 -0600469config BOOTMETH_GLOBAL
470 bool
471 help
472 Add support for global bootmeths. This feature is used by VBE and
473 EFI bootmgr, since they take full control over which bootdevs are
474 selected to boot.
475
Mattijs Korpershoek125d9f32024-07-10 10:40:05 +0200476config BOOTMETH_ANDROID
477 bool "Bootdev support for Android"
478 depends on X86 || ARM || SANDBOX
479 depends on CMDLINE
480 select ANDROID_AB
481 select ANDROID_BOOT_IMAGE
482 select CMD_BCB
483 select CMD_FASTBOOT
484 select PARTITION_TYPE_GUID
485 select PARTITION_UUIDS
486 help
487 Enables support for booting Android using bootstd. Android requires
488 multiple partitions (misc, boot, vbmeta, ...) in storage for booting.
489
490 Note that only MMC bootdevs are supported at present. This is caused
491 by AVB being limited to MMC devices only.
492
Simon Glassc88d67d2023-07-12 09:04:45 -0600493config BOOTMETH_CROS
494 bool "Bootdev support for Chromium OS"
Simon Glassdaffb0b2023-07-30 11:17:02 -0600495 depends on X86 || ARM || SANDBOX
496 default y if !ARM
Simon Glass71f634b2023-08-24 13:55:45 -0600497 select EFI_PARTITION
498 select PARTITION_TYPE_GUID
499 select PARTITION_UUIDS
Simon Glassc88d67d2023-07-12 09:04:45 -0600500 help
501 Enables support for booting Chromium OS using bootdevs. This uses the
502 kernel A slot and obtains the kernel command line from the parameters
503 provided there.
504
505 Note that only x86 devices are supported at present.
506
Simon Glass79f66352023-05-10 16:34:46 -0600507config BOOTMETH_EXTLINUX
508 bool "Bootdev support for extlinux boot"
John Keepingbe43a352022-07-28 11:19:15 +0100509 select PXE_UTILS
Simon Glass31aefaf2022-04-24 23:31:13 -0600510 default y
511 help
Simon Glass79f66352023-05-10 16:34:46 -0600512 Enables support for extlinux boot using bootdevs. This makes the
Simon Glass31aefaf2022-04-24 23:31:13 -0600513 bootdevs look for a 'extlinux/extlinux.conf' on each filesystem
514 they scan.
515
Quentin Schulzb88950f2024-06-12 16:58:47 +0200516 The specification for this file is here:
Simon Glass79f66352023-05-10 16:34:46 -0600517
518 https://uapi-group.org/specifications/specs/boot_loader_specification/
519
Simon Glass31aefaf2022-04-24 23:31:13 -0600520 This provides a way to try out standard boot on an existing boot flow.
521
Simon Glass79f66352023-05-10 16:34:46 -0600522config BOOTMETH_EXTLINUX_PXE
523 bool "Bootdev support for extlinux boot over network"
Simon Glassdab2c282022-04-24 23:31:16 -0600524 depends on CMD_PXE && CMD_NET && DM_ETH
525 default y
526 help
Simon Glass79f66352023-05-10 16:34:46 -0600527 Enables support for extlinux boot using bootdevs. This makes the
Simon Glassdab2c282022-04-24 23:31:16 -0600528 bootdevs look for a 'extlinux/extlinux.conf' on the tftp server.
529
Simon Glass79f66352023-05-10 16:34:46 -0600530 The specification for this file is here:
531
532 https://uapi-group.org/specifications/specs/boot_loader_specification/
533
Simon Glassdab2c282022-04-24 23:31:16 -0600534 This provides a way to try out standard boot on an existing boot flow.
535
Simon Glassacfa9bd2022-04-24 23:31:17 -0600536config BOOTMETH_EFILOADER
537 bool "Bootdev support for EFI boot"
AKASHI Takahiro64228202024-01-17 13:39:41 +0900538 depends on EFI_BINARY_EXEC
Simon Glassacfa9bd2022-04-24 23:31:17 -0600539 default y
540 help
541 Enables support for EFI boot using bootdevs. This makes the
542 bootdevs look for a 'boot<arch>.efi' on each filesystem
543 they scan. The resulting file is booted after enabling U-Boot's
544 EFI loader support.
545
546 The <arch> depends on the architecture of the board:
547
548 aa64 - aarch64 (ARM 64-bit)
549 arm - ARM 32-bit
550 ia32 - x86 32-bit
551 x64 - x86 64-bit
552 riscv32 - RISC-V 32-bit
553 riscv64 - RISC-V 64-bit
554
555 This provides a way to try out standard boot on an existing boot flow.
556
Heinrich Schuchardt8f319292024-04-03 20:05:17 +0200557config BOOTMETH_EFI_BOOTMGR
558 bool "Bootdev support for EFI boot manager"
559 depends on EFI_BOOTMGR
560 select BOOTMETH_GLOBAL
561 default y
562 help
563 Enable booting via the UEFI boot manager. Based on the EFI variables
564 the EFI binary to be launched is determined. To set the EFI variables
565 use the eficonfig command.
566
Heinrich Schuchardt4f658512024-07-16 10:35:34 +0200567config BOOTMETH_QFW
568 bool "Boot method using QEMU parameters"
569 depends on QFW
570 default y
571 help
572 Use QEMU parameters -kernel, -initrd, -append to determine the kernel,
573 initial RAM disk, and kernel command line parameters to boot an
574 operating system. U-Boot's control device-tree is passed to the kernel.
575
Simon Glass4c7418f2022-07-30 15:52:32 -0600576config BOOTMETH_VBE
577 bool "Bootdev support for Verified Boot for Embedded"
578 depends on FIT
579 default y
580 select BOOTMETH_GLOBAL
Tom Rini448e2b62023-01-16 15:46:49 -0500581 select EVENT
Simon Glass4c7418f2022-07-30 15:52:32 -0600582 help
583 Enables support for VBE boot. This is a standard boot method which
Quentin Schulzb88950f2024-06-12 16:58:47 +0200584 supports selection of various firmware components, selection of an OS to
Simon Glass4c7418f2022-07-30 15:52:32 -0600585 boot as well as updating these using fwupd.
586
Simon Glassfba0e732023-05-10 16:34:47 -0600587config BOOTMETH_DISTRO
588 bool # Options needed to boot any distro
Tom Rini558787f2023-10-26 14:31:27 -0400589 select BOOTMETH_SCRIPT if CMDLINE # E.g. Armbian uses scripts
Simon Glassfba0e732023-05-10 16:34:47 -0600590 select BOOTMETH_EXTLINUX # E.g. Debian uses these
591 select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH
AKASHI Takahiro64228202024-01-17 13:39:41 +0900592 select BOOTMETH_EFILOADER if EFI_BINARY_EXEC # E.g. Ubuntu uses this
Simon Glassfba0e732023-05-10 16:34:47 -0600593
Simon Glass42184562022-10-20 18:23:13 -0600594config SPL_BOOTMETH_VBE
595 bool "Bootdev support for Verified Boot for Embedded (SPL)"
596 depends on SPL && FIT
Tom Rini448e2b62023-01-16 15:46:49 -0500597 select EVENT
Simon Glass42184562022-10-20 18:23:13 -0600598 default y if VPL
599 help
600 Enables support for VBE boot. This is a standard boot method which
Quentin Schulzb88950f2024-06-12 16:58:47 +0200601 supports selection of various firmware components, selection of an OS to
Simon Glass42184562022-10-20 18:23:13 -0600602 boot as well as updating these using fwupd.
603
604config VPL_BOOTMETH_VBE
605 bool "Bootdev support for Verified Boot for Embedded (VPL)"
606 depends on VPL && FIT
Tom Rini448e2b62023-01-16 15:46:49 -0500607 select EVENT
Simon Glass42184562022-10-20 18:23:13 -0600608 default y
609 help
610 Enables support for VBE boot. This is a standard boot method which
Quentin Schulzb88950f2024-06-12 16:58:47 +0200611 supports selection of various firmware components, selection of an OS to
Simon Glass42184562022-10-20 18:23:13 -0600612 boot as well as updating these using fwupd.
613
Simon Glasscb47e212022-07-30 15:52:33 -0600614if BOOTMETH_VBE
615
Simon Glassda900e52023-02-22 09:33:52 -0700616config BOOTMETH_VBE_REQUEST
617 bool "Support for serving VBE OS requests"
618 default y
619 help
620 Enables support for looking that the requests made by the
621 Operating System being booted. These requests result in additions to
622 the device tree /chosen node, added during the device tree fixup
623 phase.
624
625config SPL_BOOTMETH_VBE_REQUEST
626 bool "Support for serving VBE OS requests (SPL)"
627 depends on SPL
628 help
629 Enables support for looking that the requests made by the
630 Operating System being booted. These requests result in additions to
631 the device tree /chosen node, added during the device tree fixup
632 phase.
633
634 This is only useful if you are booting an OS direct from SPL.
635
Simon Glasscb47e212022-07-30 15:52:33 -0600636config BOOTMETH_VBE_SIMPLE
637 bool "Bootdev support for VBE 'simple' method"
638 default y
639 help
640 Enables support for VBE 'simple' boot. This allows updating a single
641 firmware image in boot media such as MMC. It does not support any sort
642 of rollback, recovery or A/B boot.
643
Simon Glass42184562022-10-20 18:23:13 -0600644config BOOTMETH_VBE_SIMPLE_OS
645 bool "Bootdev support for VBE 'simple' method OS phase"
646 default y
647 help
648 Enables support for the OS parts of VBE 'simple' boot. This includes
649 fixing up the device tree with the required VBE information, ready
650 for booting into the OS. This option is only enabled for U-Boot
651 proper, since it is the phase where device tree fixups happen.
652
653config SPL_BOOTMETH_VBE_SIMPLE
654 bool "Bootdev support for VBE 'simple' method (SPL)"
655 depends on SPL
656 default y if VPL
657 help
658 Enables support for VBE 'simple' boot. This allows updating a single
659 firmware image in boot media such as MMC. It does not support any sort
660 of rollback, recovery or A/B boot.
661
662config VPL_BOOTMETH_VBE_SIMPLE
663 bool "Bootdev support for VBE 'simple' method (VPL)"
664 depends on VPL
665 default y
666 help
667 Enables support for VBE 'simple' boot. This allows updating a single
668 firmware image in boot media such as MMC. It does not support any sort
669 of rollback, recovery or A/B boot.
670
671config SPL_BOOTMETH_VBE_SIMPLE_FW
672 bool "Bootdev support for VBE 'simple' method firmware phase (SPL)"
673 depends on VPL
674 default y
675 help
676 Enables support for the firmware parts of VBE 'simple' boot. This
677 includes an SPL loader which locates the correct U-Boot to boot into.
678 This option should really only be enabled for VPL, since it is the
679 phase where the SPL + U-Boot decision should be made. But for now,
680 SPL does its own FIT-configuration selection.
681
682config VPL_BOOTMETH_VBE_SIMPLE_FW
683 bool "Bootdev support for VBE 'simple' method firmware phase (VPL)"
684 depends on VPL
685 default y
686 help
687 Enables support for the firmware parts of VBE 'simple' boot. This
688 includes an SPL loader which locates the correct SPL to boot into.
689 This option enabled for VPL, since it is the phase where the SPL
690 decision is made.
691
Simon Glasscb47e212022-07-30 15:52:33 -0600692endif # BOOTMETH_VBE
693
Simon Glass87c6f8a2023-01-06 08:52:36 -0600694config EXPO
695 bool "Support for expos - groups of scenes displaying a UI"
Simon Glass0041b1c2023-01-28 15:00:18 -0700696 depends on VIDEO
Simon Glass87c6f8a2023-01-06 08:52:36 -0600697 default y if BOOTMETH_VBE
698 help
699 An expo is a way of presenting and collecting information from the
700 user. It consists of a collection of 'scenes' of which only one is
701 presented at a time. An expo is typically used to show a boot menu
702 and allow settings to be changed.
703
704 The expo can be presented in graphics form using a vidconsole, or in
705 text form on a serial console.
706
Simon Glass126947b2022-04-24 23:31:20 -0600707config BOOTMETH_SANDBOX
708 def_bool y
709 depends on SANDBOX
710 help
711 This is a sandbox bootmeth driver used for testing. It always returns
712 -ENOTSUPP when attempting to boot.
713
Simon Glassd9409242022-04-24 23:31:22 -0600714config BOOTMETH_SCRIPT
715 bool "Bootdev support for U-Boot scripts"
716 default y if BOOTSTD_FULL
Tom Rini558787f2023-10-26 14:31:27 -0400717 depends on CMDLINE
Simon Glassab16a3d2023-05-05 20:03:05 -0600718 select HUSH_PARSER
Simon Glassd9409242022-04-24 23:31:22 -0600719 help
720 Enables support for booting a distro via a U-Boot script. This makes
721 the bootdevs look for a 'boot/boot.scr' file which can be used to
722 boot the distro.
723
724 This provides a way to try out standard boot on an existing boot flow.
725 It is not enabled by default to save space.
726
Simon Glass90469da2024-08-07 16:47:27 -0600727config UPL
728 bool "upl - Universal Payload Specification"
Simon Glass264f4b02024-08-07 16:47:30 -0600729 imply CMD_UPL
Simon Glass90469da2024-08-07 16:47:27 -0600730 imply UPL_READ
Simon Glass3848e972024-08-07 16:47:28 -0600731 imply UPL_WRITE
Simon Glassfefb5342024-08-07 16:47:31 -0600732 imply SPL_UPL if SPL
Simon Glass90469da2024-08-07 16:47:27 -0600733 help
734 Provides support for UPL payloads and handoff information. U-Boot
735 supports generating and accepting handoff information. The mkimage
736 tool will eventually support creating payloads.
737
738if UPL
739
740config UPL_READ
741 bool "upl - Support reading a Universal Payload handoff"
742 help
743 Provides support for decoding a UPL-format payload into a C structure
744 which can be used elsewhere in U-Boot. This is just the reading
Simon Glass0fc406a2024-08-07 16:47:34 -0600745 implementation, useful for trying it out. See UPL_IN for how
746 to tell U-Boot to actually read it on startup and use it for memory
747 and device information, etc.
Simon Glass90469da2024-08-07 16:47:27 -0600748
Simon Glass3848e972024-08-07 16:47:28 -0600749config UPL_WRITE
750 bool "upl - Support writing a Universal Payload handoff"
751 help
752 Provides support for encoding a UPL-format payload from a C structure
753 so it can be passed to another program. This is just the writing
Simon Glassfefb5342024-08-07 16:47:31 -0600754 implementation, useful for trying it out. See SPL_UPL_OUT
755 for how to tell U-Boot SPL to actually write it before jumping to
756 the next phase.
757
Simon Glass0fc406a2024-08-07 16:47:34 -0600758config UPL_IN
759 bool "upl - Read the UPL handoff on startup"
760 select UPL_READ
761 help
762 Read an SPL handoff when U-Boot starts and use it to provide
763 devices, memory layout, etc. required by U-Boot. This allows U-Boot
764 to function as a payload in the meaning of the specification.
765
Simon Glassfefb5342024-08-07 16:47:31 -0600766if SPL
767
768config SPL_UPL
769 bool "Write a UPL handoff in SPL"
770 imply SPL_UPL_OUT
771 help
772 This tells SPL to write a UPL handoff and pass it to the next phase
773 (e.g. to U-Boot or another program which SPL loads and runs). THis
774 provides information to help that program run correctly and
775 efficiently on the machine.
776
777config SPL_UPL_WRITE
778 bool # upl - Support writing a Universal Payload handoff in SPL
779 select SPL_BLOBLIST
780 help
781 Provides support for encoding a UPL-format payload from a C structure
782 so it can be passed to another program. This is just the writing
Simon Glass3848e972024-08-07 16:47:28 -0600783 implementation, useful for trying it out.
784
Simon Glassfefb5342024-08-07 16:47:31 -0600785config SPL_UPL_OUT
786 bool "upl - Support writing a Universal Payload handoff in SPL"
787 select SPL_UPL_WRITE
788 help
789 Provides support for encoding a UPL-format payload and passing it to
790 the next firmware phase. This allows U-Boot SPL to function as
791 Platform Init in the meaning of the specification.
792
793endif # SPL
794
Simon Glass90469da2024-08-07 16:47:27 -0600795endif # UPL
796
Simon Glass4a8fcb62023-09-14 10:55:53 -0600797endif # BOOTSTD
Simon Glass31aefaf2022-04-24 23:31:13 -0600798
Simon Glasscf298162020-09-10 20:21:13 -0600799config LEGACY_IMAGE_FORMAT
800 bool "Enable support for the legacy image format"
Andrew Davis52dc3342022-05-04 15:52:27 -0500801 default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE
Simon Glasscf298162020-09-10 20:21:13 -0600802 help
803 This option enables the legacy image format. It is enabled by
804 default for backward compatibility, unless FIT_SIGNATURE is
805 set where it is disabled so that unsigned images cannot be
806 loaded. If a board needs the legacy image format support in this
807 case, enable it here.
808
Eddie Jamesdec166d2023-10-24 10:43:50 -0500809config MEASURED_BOOT
810 bool "Measure boot images and configuration when booting without EFI"
811 depends on HASH && TPM_V2
Ilias Apalodimase7505b32024-06-23 14:48:18 +0300812 select SHA1
813 select SHA256
814 select SHA384
815 select SHA512
Eddie Jamesdec166d2023-10-24 10:43:50 -0500816 help
817 This option enables measurement of the boot process when booting
818 without UEFI . Measurement involves creating cryptographic hashes
819 of the binary images that are booting and storing them in the TPM.
820 In addition, a log of these hashes is stored in memory for the OS
821 to verify the booted images and configuration. Enable this if the
822 OS has configured some memory area for the event log and you intend
823 to use some attestation tools on your system.
824
825if MEASURED_BOOT
826 config MEASURE_DEVICETREE
827 bool "Measure the devicetree image"
828 default y if MEASURED_BOOT
829 help
Quentin Schulzb88950f2024-06-12 16:58:47 +0200830 On some platforms, the Device Tree is not static as it may contain
Eddie Jamesdec166d2023-10-24 10:43:50 -0500831 random MAC addresses or other such data that changes each boot.
832 Therefore, it should not be measured into the TPM. In that case,
833 disable the measurement here.
834
835 config MEASURE_IGNORE_LOG
836 bool "Ignore the existing event log"
Eddie Jamesdec166d2023-10-24 10:43:50 -0500837 help
838 On platforms that use an event log memory region that persists
839 through system resets and are the first stage bootloader, then
840 this option should be enabled to ignore any existing data in the
841 event log memory region.
842endif # MEASURED_BOOT
843
Tom Rini9d298c92023-10-26 14:31:25 -0400844config SYS_BOOTM_LEN
845 hex "Maximum size of a decompresed OS image"
Tom Rinicdd20e32024-04-18 08:29:35 -0600846 depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \
Tom Rini9d298c92023-10-26 14:31:25 -0400847 LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT
848 default 0x4000000 if PPC || ARM64
849 default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7
850 default 0x800000
851 help
852 This is the maximum size of the buffer that is used to decompress the OS
853 image in to if attempting to boot a compressed image.
854
Simon Glassaefa34f2020-09-10 20:21:19 -0600855config SUPPORT_RAW_INITRD
856 bool "Enable raw initrd images"
857 help
858 Note, defining the SUPPORT_RAW_INITRD allows user to supply
859 kernel with raw initrd images. The syntax is slightly different, the
860 address of the initrd must be augmented by it's size, in the following
861 format: "<initrd address>:<initrd size>".
862
Simon Glass96d0aa92020-11-04 09:57:35 -0700863config CHROMEOS
864 bool "Support booting Chrome OS"
865 help
866 Chrome OS requires U-Boot to set up a table indicating the boot mode
867 (e.g. Developer mode) and a few other things. Enable this if you are
868 booting on a Chromebook to avoid getting an error about an invalid
869 firmware ID.
870
871config CHROMEOS_VBOOT
872 bool "Support Chrome OS verified boot"
873 help
874 This is intended to enable the full Chrome OS verified boot support
875 in U-Boot. It is not actually implemented in the U-Boot source code
876 at present, so this option is always set to 'n'. It allows
877 distinguishing between booting Chrome OS in a basic way (developer
878 mode) and a full boot.
879
Tom Rini5a446182022-06-25 11:02:44 -0400880config SYS_RAMBOOT
881 bool
882
Tom Rinid8ef01e2021-08-24 23:11:49 -0400883config RAMBOOT_PBL
884 bool "Freescale PBL(pre-boot loader) image format support"
Tom Rini5a446182022-06-25 11:02:44 -0400885 select SYS_RAMBOOT if PPC
Tom Rinid8ef01e2021-08-24 23:11:49 -0400886 help
887 Some SoCs use PBL to load RCW and/or pre-initialization instructions.
888 For more details refer to doc/README.pblimage
889
Tom Rinid433c742022-03-23 17:20:03 -0400890choice
Tom Riniec9efcf2022-12-28 10:52:51 -0500891 prompt "Freescale PBL (or predecessor) load location"
Tom Rinid433c742022-03-23 17:20:03 -0400892 depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB \
893 || TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \
Pali Rohárf4158202024-06-06 18:33:26 +0200894 && !CMD_NAND) || (TARGET_TURRIS_1X && SYS_MPC85XX_NO_RESETVEC)
Tom Rinid433c742022-03-23 17:20:03 -0400895
896config SDCARD
Tom Riniec9efcf2022-12-28 10:52:51 -0500897 bool "Freescale PBL (or similar) is found on SD card"
Tom Rinid433c742022-03-23 17:20:03 -0400898
899config SPIFLASH
Tom Riniec9efcf2022-12-28 10:52:51 -0500900 bool "Freescale PBL (or similar) is found on SPI flash"
901
902config NO_PBL
903 bool "Freescale PBL (or similar) is not used in this case"
Tom Rinid433c742022-03-23 17:20:03 -0400904
905endchoice
906
Tom Rinid8e84612022-06-20 08:07:42 -0400907config FSL_FIXED_MMC_LOCATION
908 bool "PBL MMC is at a fixed location"
909 depends on SDCARD && !RAMBOOT_PBL
910
911config ESDHC_HC_BLK_ADDR
912 def_bool y
913 depends on FSL_FIXED_MMC_LOCATION && (ARCH_BSC9131 || ARCH_BSC9132 || ARCH_P1010)
914 help
915 In High Capacity SD Cards (> 2 GBytes), the 32-bit source address and
916 code length of these soc specify the memory address in block address
917 format. Block length is fixed to 512 bytes as per the SD High
918 Capacity specification.
919
Tom Rinid8ef01e2021-08-24 23:11:49 -0400920config SYS_FSL_PBL_PBI
921 string "PBI(pre-boot instructions) commands for the PBL image"
922 depends on RAMBOOT_PBL
923 help
924 PBI commands can be used to configure SoC before it starts the execution.
925 Please refer doc/README.pblimage for more details.
926
927config SYS_FSL_PBL_RCW
928 string "Aadditional RCW (Power on reset configuration) for the PBL image"
929 depends on RAMBOOT_PBL
930 help
931 Enables addition of RCW (Power on reset configuration) in built image.
932 Please refer doc/README.pblimage for more details.
933
Tom Rinibb20a102022-06-25 11:02:46 -0400934config SYS_BOOT_RAMDISK_HIGH
935 depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ
936 depends on !(NIOS2 || SANDBOX || SH || XTENSA)
937 def_bool y
Simon Glassfebb9852023-03-24 16:58:12 -0400938 select LMB
Tom Rinibb20a102022-06-25 11:02:46 -0400939 help
940 Enable initrd_high functionality. If defined then the initrd_high
941 feature is enabled and the boot* ramdisk subcommand is enabled.
942
Simon Glasscf298162020-09-10 20:21:13 -0600943endmenu # Boot images
944
Simon Glassc9d4abe2023-03-24 16:58:11 -0400945config DISTRO_DEFAULTS
Simon Glass3b58de42023-09-14 10:55:55 -0600946 bool "(deprecated) Script-based booting of Linux distributions"
Tom Rinifc97d932023-10-26 14:31:23 -0400947 select CMDLINE
Simon Glassa0c739c2023-03-24 16:58:13 -0400948 select BOOT_DEFAULTS
Simon Glassc9d4abe2023-03-24 16:58:11 -0400949 select AUTO_COMPLETE
950 select CMDLINE_EDITING
Simon Glassc9d4abe2023-03-24 16:58:11 -0400951 select CMD_SYSBOOT
Simon Glassc9d4abe2023-03-24 16:58:11 -0400952 select HUSH_PARSER
Simon Glassc9d4abe2023-03-24 16:58:11 -0400953 select SYS_LONGHELP
Simon Glassc9d4abe2023-03-24 16:58:11 -0400954 help
Simon Glass3b58de42023-09-14 10:55:55 -0600955 Note: These scripts have been replaced by Standard Boot. Do not use
956 them on new boards. See 'Migrating from distro_boot' at
957 doc/develop/bootstd.rst
958
Simon Glassc9d4abe2023-03-24 16:58:11 -0400959 Select this to enable various options and commands which are suitable
960 for building u-boot for booting general purpose Linux distributions.
961
Simon Glass75e65cc2020-09-10 20:21:14 -0600962menu "Boot timing"
963
964config BOOTSTAGE
965 bool "Boot timing and reporting"
966 help
967 Enable recording of boot time while booting. To use it, insert
968 calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
969 bootstage.h. Only a single entry is recorded for each ID. You can
970 give the entry a name with bootstage_mark_name(). You can also
971 record elapsed time in a particular stage using bootstage_start()
972 before starting and bootstage_accum() when finished. Bootstage will
973 add up all the accumulated time and report it.
974
975 Normally, IDs are defined in bootstage.h but a small number of
976 additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
977 as the ID.
978
979 Calls to show_boot_progress() will also result in log entries but
980 these will not have names.
981
982config SPL_BOOTSTAGE
983 bool "Boot timing and reported in SPL"
Tom Rinib3401992022-06-10 23:03:09 -0400984 depends on BOOTSTAGE && SPL
Simon Glass75e65cc2020-09-10 20:21:14 -0600985 help
986 Enable recording of boot time in SPL. To make this visible to U-Boot
987 proper, enable BOOTSTAGE_STASH as well. This will stash the timing
988 information when SPL finishes and load it when U-Boot proper starts
989 up.
990
991config TPL_BOOTSTAGE
992 bool "Boot timing and reported in TPL"
Tom Rini8bea4bf2022-06-08 08:24:39 -0400993 depends on BOOTSTAGE && TPL
Simon Glass75e65cc2020-09-10 20:21:14 -0600994 help
995 Enable recording of boot time in SPL. To make this visible to U-Boot
996 proper, enable BOOTSTAGE_STASH as well. This will stash the timing
997 information when TPL finishes and load it when U-Boot proper starts
998 up.
999
1000config BOOTSTAGE_REPORT
1001 bool "Display a detailed boot timing report before booting the OS"
1002 depends on BOOTSTAGE
1003 help
1004 Enable output of a boot time report just before the OS is booted.
1005 This shows how long it took U-Boot to go through each stage of the
1006 boot process. The report looks something like this:
1007
1008 Timer summary in microseconds:
1009 Mark Elapsed Stage
1010 0 0 reset
1011 3,575,678 3,575,678 board_init_f start
1012 3,575,695 17 arch_cpu_init A9
1013 3,575,777 82 arch_cpu_init done
1014 3,659,598 83,821 board_init_r start
1015 3,910,375 250,777 main_loop
1016 29,916,167 26,005,792 bootm_start
1017 30,361,327 445,160 start_kernel
1018
1019config BOOTSTAGE_RECORD_COUNT
1020 int "Number of boot stage records to store"
Simon Glass939b04e2021-02-03 06:00:49 -07001021 depends on BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -06001022 default 30
1023 help
1024 This is the size of the bootstage record list and is the maximum
1025 number of bootstage records that can be recorded.
1026
1027config SPL_BOOTSTAGE_RECORD_COUNT
1028 int "Number of boot stage records to store for SPL"
Simon Glass939b04e2021-02-03 06:00:49 -07001029 depends on SPL_BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -06001030 default 5
1031 help
1032 This is the size of the bootstage record list and is the maximum
1033 number of bootstage records that can be recorded.
1034
1035config TPL_BOOTSTAGE_RECORD_COUNT
1036 int "Number of boot stage records to store for TPL"
Simon Glass939b04e2021-02-03 06:00:49 -07001037 depends on TPL_BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -06001038 default 5
1039 help
1040 This is the size of the bootstage record list and is the maximum
1041 number of bootstage records that can be recorded.
1042
1043config BOOTSTAGE_FDT
1044 bool "Store boot timing information in the OS device tree"
1045 depends on BOOTSTAGE
1046 help
1047 Stash the bootstage information in the FDT. A root 'bootstage'
1048 node is created with each bootstage id as a child. Each child
1049 has a 'name' property and either 'mark' containing the
1050 mark time in microseconds, or 'accum' containing the
1051 accumulated time for that bootstage id in microseconds.
1052 For example:
1053
1054 bootstage {
1055 154 {
1056 name = "board_init_f";
1057 mark = <3575678>;
1058 };
1059 170 {
1060 name = "lcd";
1061 accum = <33482>;
1062 };
1063 };
1064
1065 Code in the Linux kernel can find this in /proc/devicetree.
1066
1067config BOOTSTAGE_STASH
1068 bool "Stash the boot timing information in memory before booting OS"
1069 depends on BOOTSTAGE
1070 help
1071 Some OSes do not support device tree. Bootstage can instead write
1072 the boot timing information in a binary format at a given address.
1073 This happens through a call to bootstage_stash(), typically in
1074 the CPU's cleanup_before_linux() function. You can use the
1075 'bootstage stash' and 'bootstage unstash' commands to do this on
1076 the command line.
1077
1078config BOOTSTAGE_STASH_ADDR
1079 hex "Address to stash boot timing information"
Tom Rinib81e31a2024-07-15 12:42:00 +01001080 depends on BOOTSTAGE_STASH
1081 default 0xC3000000 if STM32MP13X || STM32MP15X
1082 default 0x87000000 if STM32MP25X
1083 default 0x0 if SANDBOX
Simon Glass75e65cc2020-09-10 20:21:14 -06001084 help
1085 Provide an address which will not be overwritten by the OS when it
1086 starts, so that it can read this information when ready.
1087
1088config BOOTSTAGE_STASH_SIZE
1089 hex "Size of boot timing stash region"
Tom Rinib81e31a2024-07-15 12:42:00 +01001090 depends on BOOTSTAGE_STASH
Simon Glass75e65cc2020-09-10 20:21:14 -06001091 default 0x1000
1092 help
1093 This should be large enough to hold the bootstage stash. A value of
1094 4096 (4KiB) is normally plenty.
1095
1096config SHOW_BOOT_PROGRESS
1097 bool "Show boot progress in a board-specific manner"
1098 help
1099 Defining this option allows to add some board-specific code (calling
1100 a user-provided function show_boot_progress(int) that enables you to
1101 show the system's boot progress on some display (for example, some
1102 LEDs) on your board. At the moment, the following checkpoints are
1103 implemented:
1104
1105 Legacy uImage format:
1106
1107 Arg Where When
1108 1 common/cmd_bootm.c before attempting to boot an image
1109 -1 common/cmd_bootm.c Image header has bad magic number
1110 2 common/cmd_bootm.c Image header has correct magic number
1111 -2 common/cmd_bootm.c Image header has bad checksum
1112 3 common/cmd_bootm.c Image header has correct checksum
1113 -3 common/cmd_bootm.c Image data has bad checksum
1114 4 common/cmd_bootm.c Image data has correct checksum
1115 -4 common/cmd_bootm.c Image is for unsupported architecture
1116 5 common/cmd_bootm.c Architecture check OK
1117 -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi)
1118 6 common/cmd_bootm.c Image Type check OK
1119 -6 common/cmd_bootm.c gunzip uncompression error
1120 -7 common/cmd_bootm.c Unimplemented compression type
1121 7 common/cmd_bootm.c Uncompression OK
1122 8 common/cmd_bootm.c No uncompress/copy overwrite error
1123 -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX)
1124
1125 9 common/image.c Start initial ramdisk verification
1126 -10 common/image.c Ramdisk header has bad magic number
1127 -11 common/image.c Ramdisk header has bad checksum
1128 10 common/image.c Ramdisk header is OK
1129 -12 common/image.c Ramdisk data has bad checksum
1130 11 common/image.c Ramdisk data has correct checksum
1131 12 common/image.c Ramdisk verification complete, start loading
1132 -13 common/image.c Wrong Image Type (not PPC Linux ramdisk)
1133 13 common/image.c Start multifile image verification
1134 14 common/image.c No initial ramdisk, no multifile, continue.
1135
1136 15 arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
1137
1138 -30 arch/powerpc/lib/board.c Fatal error, hang the system
1139 -31 post/post.c POST test failed, detected by post_output_backlog()
1140 -32 post/post.c POST test failed, detected by post_run_single()
1141
1142 34 common/cmd_doc.c before loading a Image from a DOC device
1143 -35 common/cmd_doc.c Bad usage of "doc" command
1144 35 common/cmd_doc.c correct usage of "doc" command
1145 -36 common/cmd_doc.c No boot device
1146 36 common/cmd_doc.c correct boot device
1147 -37 common/cmd_doc.c Unknown Chip ID on boot device
1148 37 common/cmd_doc.c correct chip ID found, device available
1149 -38 common/cmd_doc.c Read Error on boot device
1150 38 common/cmd_doc.c reading Image header from DOC device OK
1151 -39 common/cmd_doc.c Image header has bad magic number
1152 39 common/cmd_doc.c Image header has correct magic number
1153 -40 common/cmd_doc.c Error reading Image from DOC device
1154 40 common/cmd_doc.c Image header has correct magic number
1155 41 common/cmd_ide.c before loading a Image from a IDE device
1156 -42 common/cmd_ide.c Bad usage of "ide" command
1157 42 common/cmd_ide.c correct usage of "ide" command
1158 -43 common/cmd_ide.c No boot device
1159 43 common/cmd_ide.c boot device found
1160 -44 common/cmd_ide.c Device not available
1161 44 common/cmd_ide.c Device available
1162 -45 common/cmd_ide.c wrong partition selected
1163 45 common/cmd_ide.c partition selected
1164 -46 common/cmd_ide.c Unknown partition table
1165 46 common/cmd_ide.c valid partition table found
1166 -47 common/cmd_ide.c Invalid partition type
1167 47 common/cmd_ide.c correct partition type
1168 -48 common/cmd_ide.c Error reading Image Header on boot device
1169 48 common/cmd_ide.c reading Image Header from IDE device OK
1170 -49 common/cmd_ide.c Image header has bad magic number
1171 49 common/cmd_ide.c Image header has correct magic number
1172 -50 common/cmd_ide.c Image header has bad checksum
1173 50 common/cmd_ide.c Image header has correct checksum
1174 -51 common/cmd_ide.c Error reading Image from IDE device
1175 51 common/cmd_ide.c reading Image from IDE device OK
1176 52 common/cmd_nand.c before loading a Image from a NAND device
1177 -53 common/cmd_nand.c Bad usage of "nand" command
1178 53 common/cmd_nand.c correct usage of "nand" command
1179 -54 common/cmd_nand.c No boot device
1180 54 common/cmd_nand.c boot device found
1181 -55 common/cmd_nand.c Unknown Chip ID on boot device
1182 55 common/cmd_nand.c correct chip ID found, device available
1183 -56 common/cmd_nand.c Error reading Image Header on boot device
1184 56 common/cmd_nand.c reading Image Header from NAND device OK
1185 -57 common/cmd_nand.c Image header has bad magic number
1186 57 common/cmd_nand.c Image header has correct magic number
1187 -58 common/cmd_nand.c Error reading Image from NAND device
1188 58 common/cmd_nand.c reading Image from NAND device OK
1189
1190 -60 common/env_common.c Environment has a bad CRC, using default
1191
1192 64 net/eth.c starting with Ethernet configuration.
1193 -64 net/eth.c no Ethernet found.
1194 65 net/eth.c Ethernet found.
1195
1196 -80 common/cmd_net.c usage wrong
1197 80 common/cmd_net.c before calling net_loop()
1198 -81 common/cmd_net.c some error in net_loop() occurred
1199 81 common/cmd_net.c net_loop() back without error
1200 -82 common/cmd_net.c size == 0 (File with size 0 loaded)
1201 82 common/cmd_net.c trying automatic boot
1202 83 common/cmd_net.c running "source" command
1203 -83 common/cmd_net.c some error in automatic boot or "source" command
1204 84 common/cmd_net.c end without errors
1205
1206 FIT uImage format:
1207
1208 Arg Where When
1209 100 common/cmd_bootm.c Kernel FIT Image has correct format
1210 -100 common/cmd_bootm.c Kernel FIT Image has incorrect format
1211 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration
1212 -101 common/cmd_bootm.c Can't get configuration for kernel subimage
1213 102 common/cmd_bootm.c Kernel unit name specified
1214 -103 common/cmd_bootm.c Can't get kernel subimage node offset
1215 103 common/cmd_bootm.c Found configuration node
1216 104 common/cmd_bootm.c Got kernel subimage node offset
1217 -104 common/cmd_bootm.c Kernel subimage hash verification failed
1218 105 common/cmd_bootm.c Kernel subimage hash verification OK
1219 -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture
1220 106 common/cmd_bootm.c Architecture check OK
1221 -106 common/cmd_bootm.c Kernel subimage has wrong type
1222 107 common/cmd_bootm.c Kernel subimage type OK
1223 -107 common/cmd_bootm.c Can't get kernel subimage data/size
1224 108 common/cmd_bootm.c Got kernel subimage data/size
1225 -108 common/cmd_bootm.c Wrong image type (not legacy, FIT)
1226 -109 common/cmd_bootm.c Can't get kernel subimage type
1227 -110 common/cmd_bootm.c Can't get kernel subimage comp
1228 -111 common/cmd_bootm.c Can't get kernel subimage os
1229 -112 common/cmd_bootm.c Can't get kernel subimage load address
1230 -113 common/cmd_bootm.c Image uncompress/copy overwrite error
1231
1232 120 common/image.c Start initial ramdisk verification
1233 -120 common/image.c Ramdisk FIT image has incorrect format
1234 121 common/image.c Ramdisk FIT image has correct format
1235 122 common/image.c No ramdisk subimage unit name, using configuration
1236 -122 common/image.c Can't get configuration for ramdisk subimage
1237 123 common/image.c Ramdisk unit name specified
1238 -124 common/image.c Can't get ramdisk subimage node offset
1239 125 common/image.c Got ramdisk subimage node offset
1240 -125 common/image.c Ramdisk subimage hash verification failed
1241 126 common/image.c Ramdisk subimage hash verification OK
1242 -126 common/image.c Ramdisk subimage for unsupported architecture
1243 127 common/image.c Architecture check OK
1244 -127 common/image.c Can't get ramdisk subimage data/size
1245 128 common/image.c Got ramdisk subimage data/size
1246 129 common/image.c Can't get ramdisk load address
1247 -129 common/image.c Got ramdisk load address
1248
1249 -130 common/cmd_doc.c Incorrect FIT image format
1250 131 common/cmd_doc.c FIT image format OK
1251
1252 -140 common/cmd_ide.c Incorrect FIT image format
1253 141 common/cmd_ide.c FIT image format OK
1254
1255 -150 common/cmd_nand.c Incorrect FIT image format
1256 151 common/cmd_nand.c FIT image format OK
1257
Marek Vasutb55881d2021-10-23 03:06:03 +02001258config SPL_SHOW_BOOT_PROGRESS
Jan Kiszkac1df3d52021-11-03 15:09:36 +01001259 bool "Show boot progress in a board-specific manner in SPL"
Marek Vasutb55881d2021-10-23 03:06:03 +02001260 depends on SPL
1261 help
1262 Defining this option allows to add some board-specific code (calling
1263 a user-provided function show_boot_progress(int) that enables you to
1264 show the system's boot progress on some display (for example, some
1265 LEDs) on your board. For details see SHOW_BOOT_PROGRESS.
1266
Simon Glass75e65cc2020-09-10 20:21:14 -06001267endmenu
1268
Simon Glass7b6baa32020-09-10 20:21:15 -06001269menu "Boot media"
1270
1271config NOR_BOOT
1272 bool "Support for booting from NOR flash"
1273 depends on NOR
1274 help
1275 Enabling this will make a U-Boot binary that is capable of being
1276 booted via NOR. In this case we will enable certain pinmux early
1277 as the ROM only partially sets up pinmux. We also default to using
1278 NOR for environment.
1279
1280config NAND_BOOT
1281 bool "Support for booting from NAND flash"
Simon Glass7b6baa32020-09-10 20:21:15 -06001282 imply MTD_RAW_NAND
1283 help
1284 Enabling this will make a U-Boot binary that is capable of being
1285 booted via NAND flash. This is not a must, some SoCs need this,
1286 some not.
1287
1288config ONENAND_BOOT
1289 bool "Support for booting from ONENAND"
Simon Glass7b6baa32020-09-10 20:21:15 -06001290 imply MTD_RAW_NAND
1291 help
1292 Enabling this will make a U-Boot binary that is capable of being
1293 booted via ONENAND. This is not a must, some SoCs need this,
1294 some not.
1295
1296config QSPI_BOOT
1297 bool "Support for booting from QSPI flash"
Simon Glass7b6baa32020-09-10 20:21:15 -06001298 help
1299 Enabling this will make a U-Boot binary that is capable of being
1300 booted via QSPI flash. This is not a must, some SoCs need this,
1301 some not.
1302
1303config SATA_BOOT
1304 bool "Support for booting from SATA"
Simon Glass7b6baa32020-09-10 20:21:15 -06001305 help
1306 Enabling this will make a U-Boot binary that is capable of being
1307 booted via SATA. This is not a must, some SoCs need this,
1308 some not.
1309
1310config SD_BOOT
1311 bool "Support for booting from SD/EMMC"
Simon Glass7b6baa32020-09-10 20:21:15 -06001312 help
1313 Enabling this will make a U-Boot binary that is capable of being
1314 booted via SD/EMMC. This is not a must, some SoCs need this,
1315 some not.
1316
Tom Rini66e0e2b2021-12-11 14:55:50 -05001317config SD_BOOT_QSPI
1318 bool "Support for booting from SD/EMMC and enable QSPI"
1319 help
1320 Enabling this will make a U-Boot binary that is capable of being
1321 booted via SD/EMMC while enabling QSPI on the platform as well. This
1322 is not a must, some SoCs need this, some not.
1323
Simon Glass7b6baa32020-09-10 20:21:15 -06001324config SPI_BOOT
1325 bool "Support for booting from SPI flash"
Simon Glass7b6baa32020-09-10 20:21:15 -06001326 help
1327 Enabling this will make a U-Boot binary that is capable of being
1328 booted via SPI flash. This is not a must, some SoCs need this,
1329 some not.
1330
1331endmenu
1332
Simon Glass98eed0d2020-09-10 20:21:16 -06001333menu "Autoboot options"
1334
1335config AUTOBOOT
1336 bool "Autoboot"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001337 depends on CMDLINE
Simon Glass98eed0d2020-09-10 20:21:16 -06001338 default y
1339 help
1340 This enables the autoboot. See doc/README.autoboot for detail.
1341
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001342if AUTOBOOT
1343
Simon Glass95fd4f32020-09-10 20:21:17 -06001344config BOOTDELAY
1345 int "delay in seconds before automatically booting"
1346 default 2
Simon Glass95fd4f32020-09-10 20:21:17 -06001347 help
1348 Delay before automatically running bootcmd;
1349 set to 0 to autoboot with no delay, but you can stop it by key input.
1350 set to -1 to disable autoboot.
1351 set to -2 to autoboot with no delay and not check for abort
1352
1353 If this value is >= 0 then it is also used for the default delay
1354 before starting the default entry in bootmenu. If it is < 0 then
1355 a default value of 10s is used.
1356
1357 See doc/README.autoboot for details.
1358
Simon Glass98eed0d2020-09-10 20:21:16 -06001359config AUTOBOOT_KEYED
1360 bool "Stop autobooting via specific input key / string"
Simon Glass98eed0d2020-09-10 20:21:16 -06001361 help
1362 This option enables stopping (aborting) of the automatic
1363 boot feature only by issuing a specific input key or
1364 string. If not enabled, any input key will abort the
1365 U-Boot automatic booting process and bring the device
1366 to the U-Boot prompt for user input.
1367
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001368if AUTOBOOT_KEYED
1369
Steffen Jaeckeld199c3a2021-07-08 15:57:38 +02001370config AUTOBOOT_FLUSH_STDIN
1371 bool "Enable flushing stdin before starting to read the password"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001372 depends on !SANDBOX
Steffen Jaeckeld199c3a2021-07-08 15:57:38 +02001373 help
1374 When this option is enabled stdin buffer will be flushed before
1375 starting to read the password.
1376 This can't be enabled for the sandbox as flushing stdin would
1377 break the autoboot unit tests.
1378
Simon Glass98eed0d2020-09-10 20:21:16 -06001379config AUTOBOOT_PROMPT
1380 string "Autoboot stop prompt"
Simon Glass98eed0d2020-09-10 20:21:16 -06001381 default "Autoboot in %d seconds\\n"
1382 help
1383 This string is displayed before the boot delay selected by
1384 CONFIG_BOOTDELAY starts. If it is not defined there is no
1385 output indicating that autoboot is in progress.
1386
1387 Note that this define is used as the (only) argument to a
1388 printf() call, so it may contain '%' format specifications,
Quentin Schulzb88950f2024-06-12 16:58:47 +02001389 provided that it also includes, separated by commas exactly
Simon Glass98eed0d2020-09-10 20:21:16 -06001390 like in a printf statement, the required arguments. It is
1391 the responsibility of the user to select only such arguments
1392 that are valid in the given context.
1393
1394config AUTOBOOT_ENCRYPTION
1395 bool "Enable encryption in autoboot stopping"
Simon Glass98eed0d2020-09-10 20:21:16 -06001396 help
1397 This option allows a string to be entered into U-Boot to stop the
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +02001398 autoboot.
1399 The behavior depends whether CONFIG_CRYPT_PW from lib is enabled
1400 or not.
1401 In case CONFIG_CRYPT_PW is enabled, the string will be forwarded
1402 to the crypt-based functionality and be compared against the
1403 string in the environment variable 'bootstopkeycrypt'.
1404 In case CONFIG_CRYPT_PW is disabled the string itself is hashed
1405 and compared against the hash in the environment variable
1406 'bootstopkeysha256'.
1407 If it matches in either case then boot stops and
1408 a command-line prompt is presented.
Simon Glass98eed0d2020-09-10 20:21:16 -06001409 This provides a way to ship a secure production device which can also
1410 be accessed at the U-Boot command line.
1411
Steffen Jaeckel33198742021-07-08 15:57:39 +02001412config AUTOBOOT_SHA256_FALLBACK
1413 bool "Allow fallback from crypt-hashed password to sha256"
1414 depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
1415 help
1416 This option adds support to fall back from crypt-hashed
1417 passwords to checking a SHA256 hashed password in case the
1418 'bootstopusesha256' environment variable is set to 'true'.
1419
Simon Glass98eed0d2020-09-10 20:21:16 -06001420config AUTOBOOT_DELAY_STR
1421 string "Delay autobooting via specific input key / string"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001422 depends on !AUTOBOOT_ENCRYPTION
Simon Glass98eed0d2020-09-10 20:21:16 -06001423 help
1424 This option delays the automatic boot feature by issuing
1425 a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR
1426 or the environment variable "bootdelaykey" is specified
1427 and this string is received from console input before
1428 autoboot starts booting, U-Boot gives a command prompt. The
1429 U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is
1430 used, otherwise it never times out.
1431
1432config AUTOBOOT_STOP_STR
1433 string "Stop autobooting via specific input key / string"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001434 depends on !AUTOBOOT_ENCRYPTION
Simon Glass98eed0d2020-09-10 20:21:16 -06001435 help
1436 This option enables stopping (aborting) of the automatic
1437 boot feature only by issuing a specific input key or
1438 string. If CONFIG_AUTOBOOT_STOP_STR or the environment
1439 variable "bootstopkey" is specified and this string is
1440 received from console input before autoboot starts booting,
1441 U-Boot gives a command prompt. The U-Boot prompt never
1442 times out, even if CONFIG_BOOT_RETRY_TIME is used.
1443
1444config AUTOBOOT_KEYED_CTRLC
1445 bool "Enable Ctrl-C autoboot interruption"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001446 depends on !AUTOBOOT_ENCRYPTION
Simon Glass98eed0d2020-09-10 20:21:16 -06001447 help
1448 This option allows for the boot sequence to be interrupted
1449 by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey".
1450 Setting this variable provides an escape sequence from the
1451 limited "password" strings.
1452
Steffen Jaeckel6c0ce6d2021-07-08 15:57:37 +02001453config AUTOBOOT_NEVER_TIMEOUT
1454 bool "Make the password entry never time-out"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001455 depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
Steffen Jaeckel6c0ce6d2021-07-08 15:57:37 +02001456 help
1457 This option removes the timeout from the password entry
1458 when the user first presses the <Enter> key before entering
1459 any other character.
1460
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +02001461config AUTOBOOT_STOP_STR_ENABLE
1462 bool "Enable fixed string to stop autobooting"
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001463 depends on AUTOBOOT_ENCRYPTION
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +02001464 help
1465 This option enables the feature to add a fixed stop
1466 string that is defined at compile time.
1467 In every case it will be tried to load the stop
1468 string from the environment.
1469 In case this is enabled and there is no stop string
1470 in the environment, this will be used as default value.
1471
1472config AUTOBOOT_STOP_STR_CRYPT
1473 string "Stop autobooting via crypt-hashed password"
1474 depends on AUTOBOOT_STOP_STR_ENABLE && CRYPT_PW
1475 help
1476 This option adds the feature to only stop the autobooting,
1477 and therefore boot into the U-Boot prompt, when the input
1478 string / password matches a values that is hashed via
1479 one of the supported crypt-style password hashing options
1480 and saved in the environment variable "bootstopkeycrypt".
1481
Simon Glass98eed0d2020-09-10 20:21:16 -06001482config AUTOBOOT_STOP_STR_SHA256
Steffen Jaeckel25c8b9f2021-07-08 15:57:40 +02001483 string "Stop autobooting via SHA256 hashed password"
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +02001484 depends on AUTOBOOT_STOP_STR_ENABLE
Simon Glass98eed0d2020-09-10 20:21:16 -06001485 help
1486 This option adds the feature to only stop the autobooting,
1487 and therefore boot into the U-Boot prompt, when the input
Quentin Schulzb88950f2024-06-12 16:58:47 +02001488 string / password matches a values that is encrypted via
Joel Peshkin652b5042020-11-21 17:18:59 -08001489 a SHA256 hash and saved in the environment variable
1490 "bootstopkeysha256". If the value in that variable
1491 includes a ":", the portion prior to the ":" will be treated
1492 as a salt value.
Simon Glass98eed0d2020-09-10 20:21:16 -06001493
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001494endif # AUTOBOOT_KEYED
1495
1496if !AUTOBOOT_KEYED
1497
Simon Glass98eed0d2020-09-10 20:21:16 -06001498config AUTOBOOT_USE_MENUKEY
1499 bool "Allow a specify key to run a menu from the environment"
Simon Glass98eed0d2020-09-10 20:21:16 -06001500 help
1501 If a specific key is pressed to stop autoboot, then the commands in
1502 the environment variable 'menucmd' are executed before boot starts.
1503
1504config AUTOBOOT_MENUKEY
1505 int "ASCII value of boot key to show a menu"
1506 default 0
1507 depends on AUTOBOOT_USE_MENUKEY
1508 help
1509 If this key is pressed to stop autoboot, then the commands in the
1510 environment variable 'menucmd' will be executed before boot starts.
1511 For example, 33 means "!" in ASCII, so pressing ! at boot would take
1512 this action.
1513
Simon Glass5bcfc7a2023-10-26 14:31:22 -04001514endif
1515
1516endif # AUTOBOOT
1517
Simon Glass98eed0d2020-09-10 20:21:16 -06001518config AUTOBOOT_MENU_SHOW
1519 bool "Show a menu on boot"
1520 depends on CMD_BOOTMENU
1521 help
1522 This enables the boot menu, controlled by environment variables
1523 defined by the board. The menu starts after running the 'preboot'
1524 environmnent variable (if enabled) and before handling the boot delay.
Peter Robinsond1670622023-08-18 15:54:10 +01001525 See doc/usage/cmd/bootmenu.rst for more details.
Simon Glass98eed0d2020-09-10 20:21:16 -06001526
Masahisa Kojima83f73632022-05-26 19:09:38 +09001527config BOOTMENU_DISABLE_UBOOT_CONSOLE
1528 bool "Disallow bootmenu to enter the U-Boot console"
1529 depends on AUTOBOOT_MENU_SHOW
1530 help
1531 If this option is enabled, user can not enter the U-Boot console from
1532 bootmenu. It increases the system security.
1533
Tom Rini69c8a812022-03-11 09:12:04 -05001534config BOOT_RETRY
1535 bool "Boot retry feature"
1536 help
1537 Allow for having the U-Boot command prompt time out and attempt
1538 to boot again. If the environment variable "bootretry" is found then
1539 its value is used, otherwise the retry timeout is
1540 CONFIG_BOOT_RETRY_TIME. CONFIG_BOOT_RETRY_MIN is optional and
1541 defaults to CONFIG_BOOT_RETRY_TIME. All times are in seconds.
1542
1543config BOOT_RETRY_TIME
1544 int "Timeout in seconds before attempting to boot again"
1545 depends on BOOT_RETRY
1546 help
1547 Time in seconds before the U-Boot prompt will timeout and boot will
1548 be attempted again.
1549
1550config BOOT_RETRY_MIN
1551 int "Minimum timeout in seconds for 'bootretry'"
1552 depends on BOOT_RETRY
1553 default BOOT_RETRY_TIME
1554 help
1555 The minimum time in seconds that "bootretry" can be set to.
1556
1557config RESET_TO_RETRY
1558 bool "Reset the board to retry autoboot"
1559 depends on BOOT_RETRY
1560 help
1561 After the countdown timed out, the board will be reset to restart
1562 again.
1563
Simon Glass98eed0d2020-09-10 20:21:16 -06001564endmenu
1565
Philippe Reynes98220742022-03-28 22:56:59 +02001566menu "Image support"
1567
1568config IMAGE_PRE_LOAD
1569 bool "Image pre-load support"
1570 help
1571 Enable an image pre-load stage in the SPL.
1572 This pre-load stage allows to do some manipulation
1573 or check (for example signature check) on an image
1574 before launching it.
1575
1576config SPL_IMAGE_PRE_LOAD
1577 bool "Image pre-load support within SPL"
1578 depends on SPL && IMAGE_PRE_LOAD
1579 help
1580 Enable an image pre-load stage in the SPL.
1581 This pre-load stage allows to do some manipulation
1582 or check (for example signature check) on an image
1583 before launching it.
1584
1585config IMAGE_PRE_LOAD_SIG
1586 bool "Image pre-load signature support"
1587 depends on IMAGE_PRE_LOAD
1588 select FIT_SIGNATURE
1589 select RSA
1590 select RSA_VERIFY_WITH_PKEY
1591 help
1592 Enable signature check support in the pre-load stage.
1593 For this feature a very simple header is added before
1594 the image with few fields:
1595 - a magic
1596 - the image size
1597 - the signature
1598 All other information (header size, type of signature,
1599 ...) are provided in the node /image/pre-load/sig of
1600 u-boot.
1601
1602config SPL_IMAGE_PRE_LOAD_SIG
1603 bool "Image pre-load signature support witin SPL"
1604 depends on SPL_IMAGE_PRE_LOAD && IMAGE_PRE_LOAD_SIG
1605 select SPL_FIT_SIGNATURE
1606 select SPL_RSA
1607 select SPL_RSA_VERIFY_WITH_PKEY
1608 help
1609 Enable signature check support in the pre-load stage in the SPL.
1610 For this feature a very simple header is added before
1611 the image with few fields:
1612 - a magic
1613 - the image size
1614 - the signature
1615 All other information (header size, type of signature,
1616 ...) are provided in the node /image/pre-load/sig of
1617 u-boot.
1618
1619endmenu
1620
Simon Glassddc5f9b2023-09-14 10:55:46 -06001621if OF_LIBFDT
1622
1623menu "Devicetree fixup"
1624
Matthias Schiffere91d6602023-12-11 12:03:17 +01001625config OF_ENV_SETUP
1626 bool "Run a command from environment to set up device tree before boot"
1627 depends on CMD_FDT
1628 help
1629 This causes U-Boot to run a command from the environment variable
1630 fdt_fixup before booting into the operating system, which can use the
1631 fdt command to modify the device tree. The device tree is then passed
1632 to the OS.
1633
Simon Glass96095e12023-09-14 10:55:47 -06001634config OF_BOARD_SETUP
1635 bool "Set up board-specific details in device tree before boot"
1636 help
1637 This causes U-Boot to call ft_board_setup() before booting into
1638 the Operating System. This function can set up various
1639 board-specific information in the device tree for use by the OS.
1640 The device tree is then passed to the OS.
1641
1642config OF_SYSTEM_SETUP
1643 bool "Set up system-specific details in device tree before boot"
1644 help
1645 This causes U-Boot to call ft_system_setup() before booting into
1646 the Operating System. This function can set up various
1647 system-specific information in the device tree for use by the OS.
1648 The device tree is then passed to the OS.
1649
1650config OF_STDOUT_VIA_ALIAS
1651 bool "Update the device-tree stdout alias from U-Boot"
1652 help
1653 This uses U-Boot's serial alias from the aliases node to update
1654 the device tree passed to the OS. The "linux,stdout-path" property
1655 in the chosen node is set to point to the correct serial node.
1656 This option currently references CONFIG_CONS_INDEX, which is
1657 incorrect when used with device tree as this option does not
1658 exist / should not be used.
1659
Simon Glass040a6042023-09-14 10:55:57 -06001660config FDT_FIXUP_PARTITIONS
Simon Glass400a6a32023-09-14 10:55:58 -06001661 bool "Overwrite MTD partitions in DTS through defined in 'mtdparts'"
Simon Glass040a6042023-09-14 10:55:57 -06001662 help
1663 Allow overwriting defined partitions in the device tree blob
1664 using partition info defined in the 'mtdparts' environment
1665 variable.
1666
Simon Glassddc5f9b2023-09-14 10:55:46 -06001667config FDT_SIMPLEFB
1668 bool "FDT tools for simplefb support"
1669 help
1670 Enable the fdt tools to manage the simple fb nodes in device tree.
1671 These functions can be used by board to indicate to the OS
1672 the presence of the simple frame buffer with associated reserved
1673 memory
1674
Simon Glassc0e5b0e2023-09-14 10:55:59 -06001675config ARCH_FIXUP_FDT_MEMORY
1676 bool "Enable arch_fixup_memory_banks() call"
1677 default y
1678 help
1679 Enable FDT memory map syncup before OS boot. This feature can be
1680 used for booting OS with different memory setup where the part of
1681 the memory location should be used for different purpose.
1682
Simon Glassddc5f9b2023-09-14 10:55:46 -06001683endmenu
1684
1685endif # OF_LIBFDT
1686
Simon Glassfe5db252020-09-10 20:21:18 -06001687config USE_BOOTARGS
1688 bool "Enable boot arguments"
1689 help
1690 Provide boot arguments to bootm command. Boot arguments are specified
1691 in CONFIG_BOOTARGS option. Enable this option to be able to specify
1692 CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
1693 will be undefined and won't take any space in U-Boot image.
1694
1695config BOOTARGS
1696 string "Boot arguments"
1697 depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE
1698 help
1699 This can be used to pass arguments to the bootm command. The value of
1700 CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
1701 this value will also override the "chosen" node in FDT blob.
1702
Simon Glass51bb3382020-11-05 10:33:48 -07001703config BOOTARGS_SUBST
1704 bool "Support substituting strings in boot arguments"
1705 help
1706 This allows substituting string values in the boot arguments. These
1707 are applied after the commandline has been built.
1708
1709 One use for this is to insert the root-disk UUID into the command
1710 line where bootargs contains "root=${uuid}"
1711
1712 setenv bootargs "console= root=${uuid}"
1713 # Set the 'uuid' environment variable
1714 part uuid mmc 2:2 uuid
1715
1716 # Command-line substitution will put the real uuid into the
1717 # kernel command line
1718 bootm
1719
Simon Glassfe5db252020-09-10 20:21:18 -06001720config USE_BOOTCOMMAND
1721 bool "Enable a default value for bootcmd"
Tom Rinidbdb4b32023-10-26 14:31:28 -04001722 depends on CMDLINE
Simon Glassfe5db252020-09-10 20:21:18 -06001723 help
1724 Provide a default value for the bootcmd entry in the environment. If
1725 autoboot is enabled this is what will be run automatically. Enable
1726 this option to be able to specify CONFIG_BOOTCOMMAND as a string. If
1727 this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
1728 won't take any space in U-Boot image.
1729
1730config BOOTCOMMAND
1731 string "bootcmd value"
1732 depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
Simon Glassd8d40bc2023-05-06 08:27:09 -06001733 default "bootflow scan -lb" if BOOTSTD_DEFAULTS && CMD_BOOTFLOW_FULL
1734 default "bootflow scan" if BOOTSTD_DEFAULTS && !CMD_BOOTFLOW_FULL
Simon Glassa91492b2022-04-24 23:31:27 -06001735 default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS
Simon Glassfe5db252020-09-10 20:21:18 -06001736 help
1737 This is the string of commands that will be used as bootcmd and if
1738 AUTOBOOT is set, automatically run.
1739
1740config USE_PREBOOT
1741 bool "Enable preboot"
Tom Rinidbdb4b32023-10-26 14:31:28 -04001742 depends on CMDLINE
Simon Glassfe5db252020-09-10 20:21:18 -06001743 help
1744 When this option is enabled, the existence of the environment
1745 variable "preboot" will be checked immediately before starting the
1746 CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
1747 entering interactive mode.
1748
1749 This feature is especially useful when "preboot" is automatically
1750 generated or modified. For example, the boot code can modify the
1751 "preboot" when a user holds down a certain combination of keys.
1752
1753config PREBOOT
1754 string "preboot default value"
1755 depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE
Patrick Delaunay87459da2020-10-12 09:47:50 +02001756 default "usb start" if USB_KEYBOARD
Simon Glassfe5db252020-09-10 20:21:18 -06001757 default ""
1758 help
1759 This is the default of "preboot" environment variable.
1760
Pali Rohár2827c2f2022-07-10 13:42:55 +02001761config PREBOOT_DEFINED
1762 bool
1763 default y if PREBOOT != ""
1764
Simon Glass832876a2020-09-10 20:21:20 -06001765config DEFAULT_FDT_FILE
1766 string "Default fdt file"
1767 help
1768 This option is used to set the default fdt file to boot OS.
1769
Dzmitry Sankouski12a3e1a2022-02-22 21:49:52 +03001770config SAVE_PREV_BL_FDT_ADDR
1771 depends on ARM
1772 bool "Saves fdt address, passed by the previous bootloader, to env var"
1773 help
1774 When u-boot is used as a chain-loaded bootloader (replacing OS kernel),
1775 enable this option to save fdt address, passed by the
1776 previous bootloader for future use.
1777 Address is saved to `prevbl_fdt_addr` environment variable.
1778
1779 If no fdt was provided by previous bootloader, no env variables
1780 will be created.
1781
1782config SAVE_PREV_BL_INITRAMFS_START_ADDR
1783 depends on ARM
1784 bool "Saves initramfs address, passed by the previous bootloader, to env var"
1785 help
1786 When u-boot is used as a chain-loaded bootloader(replacing OS kernel),
1787 enable this option to save initramfs address, passed by the
1788 previous bootloader for future use.
1789 Address is saved to `prevbl_initrd_start_addr` environment variable.
1790
1791 If no initramfs was provided by previous bootloader, no env variables
1792 will be created.
1793
Simon Glassa0874dc2023-06-01 10:23:02 -06001794menu "Configuration editor"
1795
1796config CEDIT
1797 bool "Configuration editor"
Heinrich Schuchardt64c67b62023-12-16 16:38:36 +01001798 depends on EXPO
Simon Glassa0874dc2023-06-01 10:23:02 -06001799 help
1800 Provides a way to deal with board configuration and present it to
1801 the user for adjustment.
1802
1803 This is intended to provide both graphical and text-based user
1804 interfaces, but only graphical is support at present.
1805
1806endmenu # Configuration editor
1807
Simon Glasscf298162020-09-10 20:21:13 -06001808endmenu # Booting