blob: f1ce576ab2f01b3887cfafb5cc0b8a0555e7b5d6 [file] [log] [blame]
Simon Glasscf298162020-09-10 20:21:13 -06001menu "Boot options"
2
3menu "Boot images"
4
5config ANDROID_BOOT_IMAGE
6 bool "Enable support for Android Boot Images"
7 default y if FASTBOOT
8 help
9 This enables support for booting images which use the Android
10 image format header.
11
12config FIT
13 bool "Support Flattened Image Tree"
Alexandru Gagniuc92055e12021-09-02 19:54:21 -050014 select HASH
Simon Glasscf298162020-09-10 20:21:13 -060015 select MD5
16 select SHA1
Alexandru Gagniuceb5171d2021-09-02 19:54:17 -050017 imply SHA256
Simon Glasscf298162020-09-10 20:21:13 -060018 help
19 This option allows you to boot the new uImage structure,
20 Flattened Image Tree. FIT is formally a FDT, which can include
21 images of various types (kernel, FDT blob, ramdisk, etc.)
22 in a single blob. To boot this new uImage structure,
23 pass the address of the blob to the "bootm" command.
24 FIT is very flexible, supporting compression, multiple images,
25 multiple configurations, verification through hashing and also
26 verified boot (secure boot using RSA).
27
28if FIT
29
30config FIT_EXTERNAL_OFFSET
31 hex "FIT external data offset"
32 default 0x0
33 help
34 This specifies a data offset in fit image.
35 The offset is from data payload offset to the beginning of
36 fit image header. When specifies a offset, specific data
37 could be put in the hole between data payload and fit image
38 header, such as CSF data on i.MX platform.
39
Simon Glass6f3c2d82021-02-15 17:08:10 -070040config FIT_FULL_CHECK
41 bool "Do a full check of the FIT before using it"
42 default y
43 help
44 Enable this do a full check of the FIT to make sure it is valid. This
45 helps to protect against carefully crafted FITs which take advantage
46 of bugs or omissions in the code. This includes a bad structure,
47 multiple root nodes and the like.
48
Simon Glasscf298162020-09-10 20:21:13 -060049config FIT_SIGNATURE
50 bool "Enable signature verification of FIT uImages"
51 depends on DM
52 select HASH
Alexandru Gagniuc61416fe2021-07-29 11:47:18 -050053 imply RSA
54 imply RSA_VERIFY
Simon Glasscf298162020-09-10 20:21:13 -060055 select IMAGE_SIGN_INFO
Simon Glass6f3c2d82021-02-15 17:08:10 -070056 select FIT_FULL_CHECK
Simon Glasscf298162020-09-10 20:21:13 -060057 help
58 This option enables signature verification of FIT uImages,
59 using a hash signed and verified using RSA. If
60 CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
61 hashing is available using hardware, then the RSA library will use
62 it. See doc/uImage.FIT/signature.txt for more details.
63
64 WARNING: When relying on signed FIT images with a required signature
65 check the legacy image format is disabled by default, so that
66 unsigned images cannot be loaded. If a board needs the legacy image
67 format support in this case, enable it using
68 CONFIG_LEGACY_IMAGE_FORMAT.
69
70config FIT_SIGNATURE_MAX_SIZE
71 hex "Max size of signed FIT structures"
72 depends on FIT_SIGNATURE
73 default 0x10000000
74 help
75 This option sets a max size in bytes for verified FIT uImages.
76 A sane value of 256MB protects corrupted DTB structures from overlapping
77 device memory. Assure this size does not extend past expected storage
78 space.
79
Simon Glassad74aed2021-07-14 17:05:31 -050080config FIT_RSASSA_PSS
Simon Glasscf298162020-09-10 20:21:13 -060081 bool "Support rsassa-pss signature scheme of FIT image contents"
82 depends on FIT_SIGNATURE
Simon Glasscf298162020-09-10 20:21:13 -060083 help
84 Enable this to support the pss padding algorithm as described
85 in the rfc8017 (https://tools.ietf.org/html/rfc8017).
86
87config FIT_CIPHER
88 bool "Enable ciphering data in a FIT uImages"
89 depends on DM
90 select AES
91 help
92 Enable the feature of data ciphering/unciphering in the tool mkimage
93 and in the u-boot support of the FIT image.
94
95config FIT_VERBOSE
96 bool "Show verbose messages when FIT images fail"
97 help
98 Generally a system will have valid FIT images so debug messages
99 are a waste of code space. If you are debugging your images then
100 you can enable this option to get more verbose information about
101 failures.
102
103config FIT_BEST_MATCH
104 bool "Select the best match for the kernel device tree"
105 help
106 When no configuration is explicitly selected, default to the
107 one whose fdt's compatibility field best matches that of
108 U-Boot itself. A match is considered "best" if it matches the
109 most specific compatibility entry of U-Boot's fdt's root node.
110 The order of entries in the configuration's fdt is ignored.
111
112config FIT_IMAGE_POST_PROCESS
113 bool "Enable post-processing of FIT artifacts after loading by U-Boot"
Siew Chin Lim1bc20892021-03-01 20:04:11 +0800114 depends on TI_SECURE_DEVICE || SOCFPGA_SECURE_VAB_AUTH
Simon Glasscf298162020-09-10 20:21:13 -0600115 help
116 Allows doing any sort of manipulation to blobs after they got extracted
117 from FIT images like stripping off headers or modifying the size of the
118 blob, verification, authentication, decryption etc. in a platform or
119 board specific way. In order to use this feature a platform or board-
120 specific implementation of board_fit_image_post_process() must be
121 provided. Also, anything done during this post-processing step would
122 need to be comprehended in how the images were prepared before being
123 injected into the FIT creation (i.e. the blobs would have been pre-
124 processed before being added to the FIT image).
125
Ravik Hasija7a018822021-01-27 14:01:48 -0800126config FIT_PRINT
127 bool "Support FIT printing"
128 default y
129 help
130 Support printing the content of the fitImage in a verbose manner.
131
Simon Glasscf298162020-09-10 20:21:13 -0600132if SPL
133
134config SPL_FIT
135 bool "Support Flattened Image Tree within SPL"
136 depends on SPL
Alexandru Gagniuc92055e12021-09-02 19:54:21 -0500137 select SPL_HASH
Simon Glasscf298162020-09-10 20:21:13 -0600138 select SPL_OF_LIBFDT
139
140config SPL_FIT_PRINT
141 bool "Support FIT printing within SPL"
142 depends on SPL_FIT
143 help
144 Support printing the content of the fitImage in a verbose manner in SPL.
145
Simon Glass6f3c2d82021-02-15 17:08:10 -0700146config SPL_FIT_FULL_CHECK
147 bool "Do a full check of the FIT before using it"
148 help
149 Enable this do a full check of the FIT to make sure it is valid. This
150 helps to protect against carefully crafted FITs which take advantage
151 of bugs or omissions in the code. This includes a bad structure,
152 multiple root nodes and the like.
153
154
Simon Glasscf298162020-09-10 20:21:13 -0600155config SPL_FIT_SIGNATURE
156 bool "Enable signature verification of FIT firmware within SPL"
157 depends on SPL_DM
Klaus Heinrich Kiwibdb7f262021-02-09 15:41:54 -0300158 depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
Klaus Heinrich Kiwi6ce28132021-02-09 15:41:53 -0300159 select FIT_SIGNATURE
Simon Glasscf298162020-09-10 20:21:13 -0600160 select SPL_FIT
Simon Glass0c6bdbb2021-07-10 21:14:25 -0600161 select SPL_CRYPTO
Alexandru Gagniuc07212092021-09-02 19:54:19 -0500162 select SPL_HASH
Alexandru Gagniuc61416fe2021-07-29 11:47:18 -0500163 imply SPL_RSA
164 imply SPL_RSA_VERIFY
Simon Glasscf298162020-09-10 20:21:13 -0600165 select SPL_IMAGE_SIGN_INFO
Simon Glass6f3c2d82021-02-15 17:08:10 -0700166 select SPL_FIT_FULL_CHECK
Simon Glasscf298162020-09-10 20:21:13 -0600167
Simon Glassb53541f2021-09-25 19:43:39 -0600168config SPL_FIT_SIGNATURE_MAX_SIZE
169 hex "Max size of signed FIT structures in SPL"
170 depends on SPL_FIT_SIGNATURE
171 default 0x10000000
172 help
173 This option sets a max size in bytes for verified FIT uImages.
174 A sane value of 256MB protects corrupted DTB structures from overlapping
175 device memory. Assure this size does not extend past expected storage
176 space.
177
Philippe Reynes5d39c932021-10-15 11:35:03 +0200178config SPL_FIT_RSASSA_PSS
179 bool "Support rsassa-pss signature scheme of FIT image contents in SPL"
180 depends on SPL_FIT_SIGNATURE
181 help
182 Enable this to support the pss padding algorithm as described
183 in the rfc8017 (https://tools.ietf.org/html/rfc8017) in SPL.
184
Simon Glasscf298162020-09-10 20:21:13 -0600185config SPL_LOAD_FIT
186 bool "Enable SPL loading U-Boot as a FIT (basic fitImage features)"
187 select SPL_FIT
188 help
189 Normally with the SPL framework a legacy image is generated as part
190 of the build. This contains U-Boot along with information as to
191 where it should be loaded. This option instead enables generation
192 of a FIT (Flat Image Tree) which provides more flexibility. In
193 particular it can handle selecting from multiple device tree
194 and passing the correct one to U-Boot.
195
Alexandru Gagniucdf51ae72021-03-29 12:05:15 -0500196 This path has the following limitations:
197
Bin Meng6e847f62021-05-10 20:23:29 +0800198 1. "loadables" images, other than FDTs, which do not have a "load"
Alexandru Gagniucdf51ae72021-03-29 12:05:15 -0500199 property will not be loaded. This limitation also applies to FPGA
200 images with the correct "compatible" string.
201 2. For FPGA images, only the "compatible" = "u-boot,fpga-legacy"
202 loading method is supported.
203 3. FDTs are only loaded for images with an "os" property of "u-boot".
204 "linux" images are also supported with Falcon boot mode.
205
Simon Glasscf298162020-09-10 20:21:13 -0600206config SPL_LOAD_FIT_ADDRESS
207 hex "load address of fit image"
208 depends on SPL_LOAD_FIT
209 default 0x0
210 help
211 Specify the load address of the fit image that will be loaded
212 by SPL.
213
214config SPL_LOAD_FIT_APPLY_OVERLAY
215 bool "Enable SPL applying DT overlays from FIT"
216 depends on SPL_LOAD_FIT
217 select OF_LIBFDT_OVERLAY
218 help
219 The device tree is loaded from the FIT image. Allow the SPL is to
220 also load device-tree overlays from the FIT image an apply them
221 over the device tree.
222
223config SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ
224 depends on SPL_LOAD_FIT_APPLY_OVERLAY
225 default 0x10000
226 hex "size of temporary buffer used to load the overlays"
227 help
228 The size of the area where the overlays will be loaded and
229 uncompress. Must be at least as large as biggest overlay
230 (uncompressed)
231
232config SPL_LOAD_FIT_FULL
233 bool "Enable SPL loading U-Boot as a FIT (full fitImage features)"
234 select SPL_FIT
235 help
236 Normally with the SPL framework a legacy image is generated as part
237 of the build. This contains U-Boot along with information as to
238 where it should be loaded. This option instead enables generation
239 of a FIT (Flat Image Tree) which provides more flexibility. In
240 particular it can handle selecting from multiple device tree
241 and passing the correct one to U-Boot.
242
243config SPL_FIT_IMAGE_POST_PROCESS
244 bool "Enable post-processing of FIT artifacts after loading by the SPL"
245 depends on SPL_LOAD_FIT
246 help
247 Allows doing any sort of manipulation to blobs after they got extracted
248 from the U-Boot FIT image like stripping off headers or modifying the
249 size of the blob, verification, authentication, decryption etc. in a
250 platform or board specific way. In order to use this feature a platform
251 or board-specific implementation of board_fit_image_post_process() must
252 be provided. Also, anything done during this post-processing step would
253 need to be comprehended in how the images were prepared before being
254 injected into the FIT creation (i.e. the blobs would have been pre-
255 processed before being added to the FIT image).
256
257config SPL_FIT_SOURCE
258 string ".its source file for U-Boot FIT image"
259 depends on SPL_FIT
260 help
261 Specifies a (platform specific) FIT source file to generate the
262 U-Boot FIT image. This could specify further image to load and/or
263 execute.
264
265config USE_SPL_FIT_GENERATOR
266 bool "Use a script to generate the .its script"
Bin Meng84dee332021-05-10 20:23:41 +0800267 default y if SPL_FIT && (!ARCH_SUNXI && !RISCV)
Simon Glasscf298162020-09-10 20:21:13 -0600268
269config SPL_FIT_GENERATOR
270 string ".its file generator script for U-Boot FIT image"
271 depends on USE_SPL_FIT_GENERATOR
272 default "arch/arm/mach-rockchip/make_fit_atf.py" if SPL_LOAD_FIT && ARCH_ROCKCHIP
273 default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
Simon Glasscf298162020-09-10 20:21:13 -0600274 help
275 Specifies a (platform specific) script file to generate the FIT
276 source file used to build the U-Boot FIT image file. This gets
277 passed a list of supported device tree file stub names to
278 include in the generated image.
279
280endif # SPL
281
282endif # FIT
283
284config LEGACY_IMAGE_FORMAT
285 bool "Enable support for the legacy image format"
286 default y if !FIT_SIGNATURE
287 help
288 This option enables the legacy image format. It is enabled by
289 default for backward compatibility, unless FIT_SIGNATURE is
290 set where it is disabled so that unsigned images cannot be
291 loaded. If a board needs the legacy image format support in this
292 case, enable it here.
293
Simon Glassaefa34f2020-09-10 20:21:19 -0600294config SUPPORT_RAW_INITRD
295 bool "Enable raw initrd images"
296 help
297 Note, defining the SUPPORT_RAW_INITRD allows user to supply
298 kernel with raw initrd images. The syntax is slightly different, the
299 address of the initrd must be augmented by it's size, in the following
300 format: "<initrd address>:<initrd size>".
301
Simon Glasscf298162020-09-10 20:21:13 -0600302config OF_BOARD_SETUP
303 bool "Set up board-specific details in device tree before boot"
304 depends on OF_LIBFDT
305 help
306 This causes U-Boot to call ft_board_setup() before booting into
307 the Operating System. This function can set up various
308 board-specific information in the device tree for use by the OS.
309 The device tree is then passed to the OS.
310
311config OF_SYSTEM_SETUP
312 bool "Set up system-specific details in device tree before boot"
313 depends on OF_LIBFDT
314 help
315 This causes U-Boot to call ft_system_setup() before booting into
316 the Operating System. This function can set up various
317 system-specific information in the device tree for use by the OS.
318 The device tree is then passed to the OS.
319
320config OF_STDOUT_VIA_ALIAS
321 bool "Update the device-tree stdout alias from U-Boot"
322 depends on OF_LIBFDT
323 help
324 This uses U-Boot's serial alias from the aliases node to update
325 the device tree passed to the OS. The "linux,stdout-path" property
326 in the chosen node is set to point to the correct serial node.
327 This option currently references CONFIG_CONS_INDEX, which is
328 incorrect when used with device tree as this option does not
329 exist / should not be used.
330
331config SYS_EXTRA_OPTIONS
332 string "Extra Options (DEPRECATED)"
333 help
334 The old configuration infrastructure (= mkconfig + boards.cfg)
335 provided the extra options field. If you have something like
336 "HAS_BAR,BAZ=64", the optional options
337 #define CONFIG_HAS
338 #define CONFIG_BAZ 64
339 will be defined in include/config.h.
340 This option was prepared for the smooth migration from the old
341 configuration to Kconfig. Since this option will be removed sometime,
342 new boards should not use this option.
343
344config HAVE_SYS_TEXT_BASE
345 bool
346 depends on !NIOS2 && !XTENSA
347 depends on !EFI_APP
348 default y
349
350config SYS_TEXT_BASE
351 depends on HAVE_SYS_TEXT_BASE
Tom Rini55adabb2021-07-09 10:39:21 -0400352 default 0x0 if POSITION_INDEPENDENT
Simon Glasscf298162020-09-10 20:21:13 -0600353 default 0x80800000 if ARCH_OMAP2PLUS || ARCH_K3
354 default 0x4a000000 if ARCH_SUNXI && !MACH_SUN9I && !MACH_SUN8I_V3S
355 default 0x2a000000 if ARCH_SUNXI && MACH_SUN9I
356 default 0x42e00000 if ARCH_SUNXI && MACH_SUN8I_V3S
357 hex "Text Base"
358 help
359 The address in memory that U-Boot will be running from, initially.
360
Tom Rini2f8a6db2021-12-14 13:36:40 -0500361config DYNAMIC_SYS_CLK_FREQ
362 bool "Determine CPU clock frequency at run-time"
Simon Glasscf298162020-09-10 20:21:13 -0600363 help
Tom Rini2f8a6db2021-12-14 13:36:40 -0500364 Implement a get_board_sys_clk function that will determine the CPU
365 clock frequency at run time, rather than define it statically.
366
367config SYS_CLK_FREQ
368 depends on !DYNAMIC_SYS_CLK_FREQ
369 int "CPU clock frequency"
370 default 125000000 if ARCH_LS1012A
371 default 100000000 if ARCH_P2020 || ARCH_T1024 || ARCH_T1042 || \
372 ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
373 default 66666666 if ARCH_P1010 || ARCH_P1020 || ARCH_T4240
374 default 66660000 if ARCH_T2080
375 default 33333333 if RCAR_GEN3
376 default 24000000 if ARCH_EXYNOS
377 default 20000000 if RCAR_GEN2
378 default 0
379 help
380 A static value for the CPU frequency. Note that if not required
381 for a given SoC, this can be left at 0.
Simon Glasscf298162020-09-10 20:21:13 -0600382
383config ARCH_FIXUP_FDT_MEMORY
384 bool "Enable arch_fixup_memory_banks() call"
385 default y
386 help
387 Enable FDT memory map syncup before OS boot. This feature can be
388 used for booting OS with different memory setup where the part of
389 the memory location should be used for different purpose.
390
Simon Glass96d0aa92020-11-04 09:57:35 -0700391config CHROMEOS
392 bool "Support booting Chrome OS"
393 help
394 Chrome OS requires U-Boot to set up a table indicating the boot mode
395 (e.g. Developer mode) and a few other things. Enable this if you are
396 booting on a Chromebook to avoid getting an error about an invalid
397 firmware ID.
398
399config CHROMEOS_VBOOT
400 bool "Support Chrome OS verified boot"
401 help
402 This is intended to enable the full Chrome OS verified boot support
403 in U-Boot. It is not actually implemented in the U-Boot source code
404 at present, so this option is always set to 'n'. It allows
405 distinguishing between booting Chrome OS in a basic way (developer
406 mode) and a full boot.
407
Tom Rinid8ef01e2021-08-24 23:11:49 -0400408config RAMBOOT_PBL
409 bool "Freescale PBL(pre-boot loader) image format support"
410 help
411 Some SoCs use PBL to load RCW and/or pre-initialization instructions.
412 For more details refer to doc/README.pblimage
413
414config SYS_FSL_PBL_PBI
415 string "PBI(pre-boot instructions) commands for the PBL image"
416 depends on RAMBOOT_PBL
417 help
418 PBI commands can be used to configure SoC before it starts the execution.
419 Please refer doc/README.pblimage for more details.
420
421config SYS_FSL_PBL_RCW
422 string "Aadditional RCW (Power on reset configuration) for the PBL image"
423 depends on RAMBOOT_PBL
424 help
425 Enables addition of RCW (Power on reset configuration) in built image.
426 Please refer doc/README.pblimage for more details.
427
Simon Glasscf298162020-09-10 20:21:13 -0600428endmenu # Boot images
429
Simon Glass75e65cc2020-09-10 20:21:14 -0600430menu "Boot timing"
431
432config BOOTSTAGE
433 bool "Boot timing and reporting"
434 help
435 Enable recording of boot time while booting. To use it, insert
436 calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
437 bootstage.h. Only a single entry is recorded for each ID. You can
438 give the entry a name with bootstage_mark_name(). You can also
439 record elapsed time in a particular stage using bootstage_start()
440 before starting and bootstage_accum() when finished. Bootstage will
441 add up all the accumulated time and report it.
442
443 Normally, IDs are defined in bootstage.h but a small number of
444 additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
445 as the ID.
446
447 Calls to show_boot_progress() will also result in log entries but
448 these will not have names.
449
450config SPL_BOOTSTAGE
451 bool "Boot timing and reported in SPL"
452 depends on BOOTSTAGE
453 help
454 Enable recording of boot time in SPL. To make this visible to U-Boot
455 proper, enable BOOTSTAGE_STASH as well. This will stash the timing
456 information when SPL finishes and load it when U-Boot proper starts
457 up.
458
459config TPL_BOOTSTAGE
460 bool "Boot timing and reported in TPL"
461 depends on BOOTSTAGE
462 help
463 Enable recording of boot time in SPL. To make this visible to U-Boot
464 proper, enable BOOTSTAGE_STASH as well. This will stash the timing
465 information when TPL finishes and load it when U-Boot proper starts
466 up.
467
468config BOOTSTAGE_REPORT
469 bool "Display a detailed boot timing report before booting the OS"
470 depends on BOOTSTAGE
471 help
472 Enable output of a boot time report just before the OS is booted.
473 This shows how long it took U-Boot to go through each stage of the
474 boot process. The report looks something like this:
475
476 Timer summary in microseconds:
477 Mark Elapsed Stage
478 0 0 reset
479 3,575,678 3,575,678 board_init_f start
480 3,575,695 17 arch_cpu_init A9
481 3,575,777 82 arch_cpu_init done
482 3,659,598 83,821 board_init_r start
483 3,910,375 250,777 main_loop
484 29,916,167 26,005,792 bootm_start
485 30,361,327 445,160 start_kernel
486
487config BOOTSTAGE_RECORD_COUNT
488 int "Number of boot stage records to store"
Simon Glass939b04e2021-02-03 06:00:49 -0700489 depends on BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -0600490 default 30
491 help
492 This is the size of the bootstage record list and is the maximum
493 number of bootstage records that can be recorded.
494
495config SPL_BOOTSTAGE_RECORD_COUNT
496 int "Number of boot stage records to store for SPL"
Simon Glass939b04e2021-02-03 06:00:49 -0700497 depends on SPL_BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -0600498 default 5
499 help
500 This is the size of the bootstage record list and is the maximum
501 number of bootstage records that can be recorded.
502
503config TPL_BOOTSTAGE_RECORD_COUNT
504 int "Number of boot stage records to store for TPL"
Simon Glass939b04e2021-02-03 06:00:49 -0700505 depends on TPL_BOOTSTAGE
Simon Glass75e65cc2020-09-10 20:21:14 -0600506 default 5
507 help
508 This is the size of the bootstage record list and is the maximum
509 number of bootstage records that can be recorded.
510
511config BOOTSTAGE_FDT
512 bool "Store boot timing information in the OS device tree"
513 depends on BOOTSTAGE
514 help
515 Stash the bootstage information in the FDT. A root 'bootstage'
516 node is created with each bootstage id as a child. Each child
517 has a 'name' property and either 'mark' containing the
518 mark time in microseconds, or 'accum' containing the
519 accumulated time for that bootstage id in microseconds.
520 For example:
521
522 bootstage {
523 154 {
524 name = "board_init_f";
525 mark = <3575678>;
526 };
527 170 {
528 name = "lcd";
529 accum = <33482>;
530 };
531 };
532
533 Code in the Linux kernel can find this in /proc/devicetree.
534
535config BOOTSTAGE_STASH
536 bool "Stash the boot timing information in memory before booting OS"
537 depends on BOOTSTAGE
538 help
539 Some OSes do not support device tree. Bootstage can instead write
540 the boot timing information in a binary format at a given address.
541 This happens through a call to bootstage_stash(), typically in
542 the CPU's cleanup_before_linux() function. You can use the
543 'bootstage stash' and 'bootstage unstash' commands to do this on
544 the command line.
545
546config BOOTSTAGE_STASH_ADDR
547 hex "Address to stash boot timing information"
548 default 0
549 help
550 Provide an address which will not be overwritten by the OS when it
551 starts, so that it can read this information when ready.
552
553config BOOTSTAGE_STASH_SIZE
554 hex "Size of boot timing stash region"
555 default 0x1000
556 help
557 This should be large enough to hold the bootstage stash. A value of
558 4096 (4KiB) is normally plenty.
559
560config SHOW_BOOT_PROGRESS
561 bool "Show boot progress in a board-specific manner"
562 help
563 Defining this option allows to add some board-specific code (calling
564 a user-provided function show_boot_progress(int) that enables you to
565 show the system's boot progress on some display (for example, some
566 LEDs) on your board. At the moment, the following checkpoints are
567 implemented:
568
569 Legacy uImage format:
570
571 Arg Where When
572 1 common/cmd_bootm.c before attempting to boot an image
573 -1 common/cmd_bootm.c Image header has bad magic number
574 2 common/cmd_bootm.c Image header has correct magic number
575 -2 common/cmd_bootm.c Image header has bad checksum
576 3 common/cmd_bootm.c Image header has correct checksum
577 -3 common/cmd_bootm.c Image data has bad checksum
578 4 common/cmd_bootm.c Image data has correct checksum
579 -4 common/cmd_bootm.c Image is for unsupported architecture
580 5 common/cmd_bootm.c Architecture check OK
581 -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi)
582 6 common/cmd_bootm.c Image Type check OK
583 -6 common/cmd_bootm.c gunzip uncompression error
584 -7 common/cmd_bootm.c Unimplemented compression type
585 7 common/cmd_bootm.c Uncompression OK
586 8 common/cmd_bootm.c No uncompress/copy overwrite error
587 -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX)
588
589 9 common/image.c Start initial ramdisk verification
590 -10 common/image.c Ramdisk header has bad magic number
591 -11 common/image.c Ramdisk header has bad checksum
592 10 common/image.c Ramdisk header is OK
593 -12 common/image.c Ramdisk data has bad checksum
594 11 common/image.c Ramdisk data has correct checksum
595 12 common/image.c Ramdisk verification complete, start loading
596 -13 common/image.c Wrong Image Type (not PPC Linux ramdisk)
597 13 common/image.c Start multifile image verification
598 14 common/image.c No initial ramdisk, no multifile, continue.
599
600 15 arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
601
602 -30 arch/powerpc/lib/board.c Fatal error, hang the system
603 -31 post/post.c POST test failed, detected by post_output_backlog()
604 -32 post/post.c POST test failed, detected by post_run_single()
605
606 34 common/cmd_doc.c before loading a Image from a DOC device
607 -35 common/cmd_doc.c Bad usage of "doc" command
608 35 common/cmd_doc.c correct usage of "doc" command
609 -36 common/cmd_doc.c No boot device
610 36 common/cmd_doc.c correct boot device
611 -37 common/cmd_doc.c Unknown Chip ID on boot device
612 37 common/cmd_doc.c correct chip ID found, device available
613 -38 common/cmd_doc.c Read Error on boot device
614 38 common/cmd_doc.c reading Image header from DOC device OK
615 -39 common/cmd_doc.c Image header has bad magic number
616 39 common/cmd_doc.c Image header has correct magic number
617 -40 common/cmd_doc.c Error reading Image from DOC device
618 40 common/cmd_doc.c Image header has correct magic number
619 41 common/cmd_ide.c before loading a Image from a IDE device
620 -42 common/cmd_ide.c Bad usage of "ide" command
621 42 common/cmd_ide.c correct usage of "ide" command
622 -43 common/cmd_ide.c No boot device
623 43 common/cmd_ide.c boot device found
624 -44 common/cmd_ide.c Device not available
625 44 common/cmd_ide.c Device available
626 -45 common/cmd_ide.c wrong partition selected
627 45 common/cmd_ide.c partition selected
628 -46 common/cmd_ide.c Unknown partition table
629 46 common/cmd_ide.c valid partition table found
630 -47 common/cmd_ide.c Invalid partition type
631 47 common/cmd_ide.c correct partition type
632 -48 common/cmd_ide.c Error reading Image Header on boot device
633 48 common/cmd_ide.c reading Image Header from IDE device OK
634 -49 common/cmd_ide.c Image header has bad magic number
635 49 common/cmd_ide.c Image header has correct magic number
636 -50 common/cmd_ide.c Image header has bad checksum
637 50 common/cmd_ide.c Image header has correct checksum
638 -51 common/cmd_ide.c Error reading Image from IDE device
639 51 common/cmd_ide.c reading Image from IDE device OK
640 52 common/cmd_nand.c before loading a Image from a NAND device
641 -53 common/cmd_nand.c Bad usage of "nand" command
642 53 common/cmd_nand.c correct usage of "nand" command
643 -54 common/cmd_nand.c No boot device
644 54 common/cmd_nand.c boot device found
645 -55 common/cmd_nand.c Unknown Chip ID on boot device
646 55 common/cmd_nand.c correct chip ID found, device available
647 -56 common/cmd_nand.c Error reading Image Header on boot device
648 56 common/cmd_nand.c reading Image Header from NAND device OK
649 -57 common/cmd_nand.c Image header has bad magic number
650 57 common/cmd_nand.c Image header has correct magic number
651 -58 common/cmd_nand.c Error reading Image from NAND device
652 58 common/cmd_nand.c reading Image from NAND device OK
653
654 -60 common/env_common.c Environment has a bad CRC, using default
655
656 64 net/eth.c starting with Ethernet configuration.
657 -64 net/eth.c no Ethernet found.
658 65 net/eth.c Ethernet found.
659
660 -80 common/cmd_net.c usage wrong
661 80 common/cmd_net.c before calling net_loop()
662 -81 common/cmd_net.c some error in net_loop() occurred
663 81 common/cmd_net.c net_loop() back without error
664 -82 common/cmd_net.c size == 0 (File with size 0 loaded)
665 82 common/cmd_net.c trying automatic boot
666 83 common/cmd_net.c running "source" command
667 -83 common/cmd_net.c some error in automatic boot or "source" command
668 84 common/cmd_net.c end without errors
669
670 FIT uImage format:
671
672 Arg Where When
673 100 common/cmd_bootm.c Kernel FIT Image has correct format
674 -100 common/cmd_bootm.c Kernel FIT Image has incorrect format
675 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration
676 -101 common/cmd_bootm.c Can't get configuration for kernel subimage
677 102 common/cmd_bootm.c Kernel unit name specified
678 -103 common/cmd_bootm.c Can't get kernel subimage node offset
679 103 common/cmd_bootm.c Found configuration node
680 104 common/cmd_bootm.c Got kernel subimage node offset
681 -104 common/cmd_bootm.c Kernel subimage hash verification failed
682 105 common/cmd_bootm.c Kernel subimage hash verification OK
683 -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture
684 106 common/cmd_bootm.c Architecture check OK
685 -106 common/cmd_bootm.c Kernel subimage has wrong type
686 107 common/cmd_bootm.c Kernel subimage type OK
687 -107 common/cmd_bootm.c Can't get kernel subimage data/size
688 108 common/cmd_bootm.c Got kernel subimage data/size
689 -108 common/cmd_bootm.c Wrong image type (not legacy, FIT)
690 -109 common/cmd_bootm.c Can't get kernel subimage type
691 -110 common/cmd_bootm.c Can't get kernel subimage comp
692 -111 common/cmd_bootm.c Can't get kernel subimage os
693 -112 common/cmd_bootm.c Can't get kernel subimage load address
694 -113 common/cmd_bootm.c Image uncompress/copy overwrite error
695
696 120 common/image.c Start initial ramdisk verification
697 -120 common/image.c Ramdisk FIT image has incorrect format
698 121 common/image.c Ramdisk FIT image has correct format
699 122 common/image.c No ramdisk subimage unit name, using configuration
700 -122 common/image.c Can't get configuration for ramdisk subimage
701 123 common/image.c Ramdisk unit name specified
702 -124 common/image.c Can't get ramdisk subimage node offset
703 125 common/image.c Got ramdisk subimage node offset
704 -125 common/image.c Ramdisk subimage hash verification failed
705 126 common/image.c Ramdisk subimage hash verification OK
706 -126 common/image.c Ramdisk subimage for unsupported architecture
707 127 common/image.c Architecture check OK
708 -127 common/image.c Can't get ramdisk subimage data/size
709 128 common/image.c Got ramdisk subimage data/size
710 129 common/image.c Can't get ramdisk load address
711 -129 common/image.c Got ramdisk load address
712
713 -130 common/cmd_doc.c Incorrect FIT image format
714 131 common/cmd_doc.c FIT image format OK
715
716 -140 common/cmd_ide.c Incorrect FIT image format
717 141 common/cmd_ide.c FIT image format OK
718
719 -150 common/cmd_nand.c Incorrect FIT image format
720 151 common/cmd_nand.c FIT image format OK
721
Marek Vasutb55881d2021-10-23 03:06:03 +0200722config SPL_SHOW_BOOT_PROGRESS
Jan Kiszkac1df3d52021-11-03 15:09:36 +0100723 bool "Show boot progress in a board-specific manner in SPL"
Marek Vasutb55881d2021-10-23 03:06:03 +0200724 depends on SPL
725 help
726 Defining this option allows to add some board-specific code (calling
727 a user-provided function show_boot_progress(int) that enables you to
728 show the system's boot progress on some display (for example, some
729 LEDs) on your board. For details see SHOW_BOOT_PROGRESS.
730
Simon Glass75e65cc2020-09-10 20:21:14 -0600731endmenu
732
Simon Glass7b6baa32020-09-10 20:21:15 -0600733menu "Boot media"
734
735config NOR_BOOT
736 bool "Support for booting from NOR flash"
737 depends on NOR
738 help
739 Enabling this will make a U-Boot binary that is capable of being
740 booted via NOR. In this case we will enable certain pinmux early
741 as the ROM only partially sets up pinmux. We also default to using
742 NOR for environment.
743
744config NAND_BOOT
745 bool "Support for booting from NAND flash"
Simon Glass7b6baa32020-09-10 20:21:15 -0600746 imply MTD_RAW_NAND
747 help
748 Enabling this will make a U-Boot binary that is capable of being
749 booted via NAND flash. This is not a must, some SoCs need this,
750 some not.
751
752config ONENAND_BOOT
753 bool "Support for booting from ONENAND"
Simon Glass7b6baa32020-09-10 20:21:15 -0600754 imply MTD_RAW_NAND
755 help
756 Enabling this will make a U-Boot binary that is capable of being
757 booted via ONENAND. This is not a must, some SoCs need this,
758 some not.
759
760config QSPI_BOOT
761 bool "Support for booting from QSPI flash"
Simon Glass7b6baa32020-09-10 20:21:15 -0600762 help
763 Enabling this will make a U-Boot binary that is capable of being
764 booted via QSPI flash. This is not a must, some SoCs need this,
765 some not.
766
767config SATA_BOOT
768 bool "Support for booting from SATA"
Simon Glass7b6baa32020-09-10 20:21:15 -0600769 help
770 Enabling this will make a U-Boot binary that is capable of being
771 booted via SATA. This is not a must, some SoCs need this,
772 some not.
773
774config SD_BOOT
775 bool "Support for booting from SD/EMMC"
Simon Glass7b6baa32020-09-10 20:21:15 -0600776 help
777 Enabling this will make a U-Boot binary that is capable of being
778 booted via SD/EMMC. This is not a must, some SoCs need this,
779 some not.
780
Tom Rini66e0e2b2021-12-11 14:55:50 -0500781config SD_BOOT_QSPI
782 bool "Support for booting from SD/EMMC and enable QSPI"
783 help
784 Enabling this will make a U-Boot binary that is capable of being
785 booted via SD/EMMC while enabling QSPI on the platform as well. This
786 is not a must, some SoCs need this, some not.
787
Simon Glass7b6baa32020-09-10 20:21:15 -0600788config SPI_BOOT
789 bool "Support for booting from SPI flash"
Simon Glass7b6baa32020-09-10 20:21:15 -0600790 help
791 Enabling this will make a U-Boot binary that is capable of being
792 booted via SPI flash. This is not a must, some SoCs need this,
793 some not.
794
795endmenu
796
Simon Glass98eed0d2020-09-10 20:21:16 -0600797menu "Autoboot options"
798
799config AUTOBOOT
800 bool "Autoboot"
801 default y
802 help
803 This enables the autoboot. See doc/README.autoboot for detail.
804
Simon Glass95fd4f32020-09-10 20:21:17 -0600805config BOOTDELAY
806 int "delay in seconds before automatically booting"
807 default 2
808 depends on AUTOBOOT
809 help
810 Delay before automatically running bootcmd;
811 set to 0 to autoboot with no delay, but you can stop it by key input.
812 set to -1 to disable autoboot.
813 set to -2 to autoboot with no delay and not check for abort
814
815 If this value is >= 0 then it is also used for the default delay
816 before starting the default entry in bootmenu. If it is < 0 then
817 a default value of 10s is used.
818
819 See doc/README.autoboot for details.
820
Simon Glass98eed0d2020-09-10 20:21:16 -0600821config AUTOBOOT_KEYED
822 bool "Stop autobooting via specific input key / string"
Simon Glass98eed0d2020-09-10 20:21:16 -0600823 help
824 This option enables stopping (aborting) of the automatic
825 boot feature only by issuing a specific input key or
826 string. If not enabled, any input key will abort the
827 U-Boot automatic booting process and bring the device
828 to the U-Boot prompt for user input.
829
Steffen Jaeckeld199c3a2021-07-08 15:57:38 +0200830config AUTOBOOT_FLUSH_STDIN
831 bool "Enable flushing stdin before starting to read the password"
832 depends on AUTOBOOT_KEYED && !SANDBOX
833 help
834 When this option is enabled stdin buffer will be flushed before
835 starting to read the password.
836 This can't be enabled for the sandbox as flushing stdin would
837 break the autoboot unit tests.
838
Simon Glass98eed0d2020-09-10 20:21:16 -0600839config AUTOBOOT_PROMPT
840 string "Autoboot stop prompt"
841 depends on AUTOBOOT_KEYED
842 default "Autoboot in %d seconds\\n"
843 help
844 This string is displayed before the boot delay selected by
845 CONFIG_BOOTDELAY starts. If it is not defined there is no
846 output indicating that autoboot is in progress.
847
848 Note that this define is used as the (only) argument to a
849 printf() call, so it may contain '%' format specifications,
850 provided that it also includes, sepearated by commas exactly
851 like in a printf statement, the required arguments. It is
852 the responsibility of the user to select only such arguments
853 that are valid in the given context.
854
855config AUTOBOOT_ENCRYPTION
856 bool "Enable encryption in autoboot stopping"
857 depends on AUTOBOOT_KEYED
858 help
859 This option allows a string to be entered into U-Boot to stop the
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +0200860 autoboot.
861 The behavior depends whether CONFIG_CRYPT_PW from lib is enabled
862 or not.
863 In case CONFIG_CRYPT_PW is enabled, the string will be forwarded
864 to the crypt-based functionality and be compared against the
865 string in the environment variable 'bootstopkeycrypt'.
866 In case CONFIG_CRYPT_PW is disabled the string itself is hashed
867 and compared against the hash in the environment variable
868 'bootstopkeysha256'.
869 If it matches in either case then boot stops and
870 a command-line prompt is presented.
Simon Glass98eed0d2020-09-10 20:21:16 -0600871 This provides a way to ship a secure production device which can also
872 be accessed at the U-Boot command line.
873
Steffen Jaeckel33198742021-07-08 15:57:39 +0200874config AUTOBOOT_SHA256_FALLBACK
875 bool "Allow fallback from crypt-hashed password to sha256"
876 depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
877 help
878 This option adds support to fall back from crypt-hashed
879 passwords to checking a SHA256 hashed password in case the
880 'bootstopusesha256' environment variable is set to 'true'.
881
Simon Glass98eed0d2020-09-10 20:21:16 -0600882config AUTOBOOT_DELAY_STR
883 string "Delay autobooting via specific input key / string"
884 depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
885 help
886 This option delays the automatic boot feature by issuing
887 a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR
888 or the environment variable "bootdelaykey" is specified
889 and this string is received from console input before
890 autoboot starts booting, U-Boot gives a command prompt. The
891 U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is
892 used, otherwise it never times out.
893
894config AUTOBOOT_STOP_STR
895 string "Stop autobooting via specific input key / string"
896 depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
897 help
898 This option enables stopping (aborting) of the automatic
899 boot feature only by issuing a specific input key or
900 string. If CONFIG_AUTOBOOT_STOP_STR or the environment
901 variable "bootstopkey" is specified and this string is
902 received from console input before autoboot starts booting,
903 U-Boot gives a command prompt. The U-Boot prompt never
904 times out, even if CONFIG_BOOT_RETRY_TIME is used.
905
906config AUTOBOOT_KEYED_CTRLC
907 bool "Enable Ctrl-C autoboot interruption"
908 depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
Simon Glass98eed0d2020-09-10 20:21:16 -0600909 help
910 This option allows for the boot sequence to be interrupted
911 by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey".
912 Setting this variable provides an escape sequence from the
913 limited "password" strings.
914
Steffen Jaeckel6c0ce6d2021-07-08 15:57:37 +0200915config AUTOBOOT_NEVER_TIMEOUT
916 bool "Make the password entry never time-out"
917 depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION && CRYPT_PW
918 help
919 This option removes the timeout from the password entry
920 when the user first presses the <Enter> key before entering
921 any other character.
922
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +0200923config AUTOBOOT_STOP_STR_ENABLE
924 bool "Enable fixed string to stop autobooting"
925 depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
926 help
927 This option enables the feature to add a fixed stop
928 string that is defined at compile time.
929 In every case it will be tried to load the stop
930 string from the environment.
931 In case this is enabled and there is no stop string
932 in the environment, this will be used as default value.
933
934config AUTOBOOT_STOP_STR_CRYPT
935 string "Stop autobooting via crypt-hashed password"
936 depends on AUTOBOOT_STOP_STR_ENABLE && CRYPT_PW
937 help
938 This option adds the feature to only stop the autobooting,
939 and therefore boot into the U-Boot prompt, when the input
940 string / password matches a values that is hashed via
941 one of the supported crypt-style password hashing options
942 and saved in the environment variable "bootstopkeycrypt".
943
Simon Glass98eed0d2020-09-10 20:21:16 -0600944config AUTOBOOT_STOP_STR_SHA256
Steffen Jaeckel25c8b9f2021-07-08 15:57:40 +0200945 string "Stop autobooting via SHA256 hashed password"
Steffen Jaeckel1a4a7782021-07-08 15:57:35 +0200946 depends on AUTOBOOT_STOP_STR_ENABLE
Simon Glass98eed0d2020-09-10 20:21:16 -0600947 help
948 This option adds the feature to only stop the autobooting,
949 and therefore boot into the U-Boot prompt, when the input
950 string / password matches a values that is encypted via
Joel Peshkin652b5042020-11-21 17:18:59 -0800951 a SHA256 hash and saved in the environment variable
952 "bootstopkeysha256". If the value in that variable
953 includes a ":", the portion prior to the ":" will be treated
954 as a salt value.
Simon Glass98eed0d2020-09-10 20:21:16 -0600955
956config AUTOBOOT_USE_MENUKEY
957 bool "Allow a specify key to run a menu from the environment"
958 depends on !AUTOBOOT_KEYED
959 help
960 If a specific key is pressed to stop autoboot, then the commands in
961 the environment variable 'menucmd' are executed before boot starts.
962
963config AUTOBOOT_MENUKEY
964 int "ASCII value of boot key to show a menu"
965 default 0
966 depends on AUTOBOOT_USE_MENUKEY
967 help
968 If this key is pressed to stop autoboot, then the commands in the
969 environment variable 'menucmd' will be executed before boot starts.
970 For example, 33 means "!" in ASCII, so pressing ! at boot would take
971 this action.
972
973config AUTOBOOT_MENU_SHOW
974 bool "Show a menu on boot"
975 depends on CMD_BOOTMENU
976 help
977 This enables the boot menu, controlled by environment variables
978 defined by the board. The menu starts after running the 'preboot'
979 environmnent variable (if enabled) and before handling the boot delay.
980 See README.bootmenu for more details.
981
982endmenu
983
Simon Glassfe5db252020-09-10 20:21:18 -0600984config USE_BOOTARGS
985 bool "Enable boot arguments"
986 help
987 Provide boot arguments to bootm command. Boot arguments are specified
988 in CONFIG_BOOTARGS option. Enable this option to be able to specify
989 CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
990 will be undefined and won't take any space in U-Boot image.
991
992config BOOTARGS
993 string "Boot arguments"
994 depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE
995 help
996 This can be used to pass arguments to the bootm command. The value of
997 CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
998 this value will also override the "chosen" node in FDT blob.
999
Simon Glass51bb3382020-11-05 10:33:48 -07001000config BOOTARGS_SUBST
1001 bool "Support substituting strings in boot arguments"
1002 help
1003 This allows substituting string values in the boot arguments. These
1004 are applied after the commandline has been built.
1005
1006 One use for this is to insert the root-disk UUID into the command
1007 line where bootargs contains "root=${uuid}"
1008
1009 setenv bootargs "console= root=${uuid}"
1010 # Set the 'uuid' environment variable
1011 part uuid mmc 2:2 uuid
1012
1013 # Command-line substitution will put the real uuid into the
1014 # kernel command line
1015 bootm
1016
Simon Glassfe5db252020-09-10 20:21:18 -06001017config USE_BOOTCOMMAND
1018 bool "Enable a default value for bootcmd"
1019 help
1020 Provide a default value for the bootcmd entry in the environment. If
1021 autoboot is enabled this is what will be run automatically. Enable
1022 this option to be able to specify CONFIG_BOOTCOMMAND as a string. If
1023 this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
1024 won't take any space in U-Boot image.
1025
1026config BOOTCOMMAND
1027 string "bootcmd value"
1028 depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
1029 default "run distro_bootcmd" if DISTRO_DEFAULTS
1030 help
1031 This is the string of commands that will be used as bootcmd and if
1032 AUTOBOOT is set, automatically run.
1033
1034config USE_PREBOOT
1035 bool "Enable preboot"
1036 help
1037 When this option is enabled, the existence of the environment
1038 variable "preboot" will be checked immediately before starting the
1039 CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
1040 entering interactive mode.
1041
1042 This feature is especially useful when "preboot" is automatically
1043 generated or modified. For example, the boot code can modify the
1044 "preboot" when a user holds down a certain combination of keys.
1045
1046config PREBOOT
1047 string "preboot default value"
1048 depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE
Patrick Delaunay87459da2020-10-12 09:47:50 +02001049 default "usb start" if USB_KEYBOARD
Simon Glassfe5db252020-09-10 20:21:18 -06001050 default ""
1051 help
1052 This is the default of "preboot" environment variable.
1053
Simon Glass832876a2020-09-10 20:21:20 -06001054config DEFAULT_FDT_FILE
1055 string "Default fdt file"
1056 help
1057 This option is used to set the default fdt file to boot OS.
1058
Simon Glasscf298162020-09-10 20:21:13 -06001059endmenu # Booting