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