xref: /openbmc/u-boot/common/Kconfig (revision 06499e6b09accb2408d5d0be6f4688f196382ad3)
1ee2b2434SSimon Glassmenu "Boot timing"
2ee2b2434SSimon Glass
3ee2b2434SSimon Glassconfig BOOTSTAGE
4ee2b2434SSimon Glass	bool "Boot timing and reporting"
5ee2b2434SSimon Glass	help
6ee2b2434SSimon Glass	  Enable recording of boot time while booting. To use it, insert
7ee2b2434SSimon Glass	  calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
8ee2b2434SSimon Glass	  bootstage.h. Only a single entry is recorded for each ID. You can
9ee2b2434SSimon Glass	  give the entry a name with bootstage_mark_name(). You can also
10ee2b2434SSimon Glass	  record elapsed time in a particular stage using bootstage_start()
11ee2b2434SSimon Glass	  before starting and bootstage_accum() when finished. Bootstage will
1257247d9cSRobert P. J. Day	  add up all the accumulated time and report it.
13ee2b2434SSimon Glass
14ee2b2434SSimon Glass	  Normally, IDs are defined in bootstage.h but a small number of
1557247d9cSRobert P. J. Day	  additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
16ee2b2434SSimon Glass	  as the ID.
17ee2b2434SSimon Glass
1857247d9cSRobert P. J. Day	  Calls to show_boot_progress() will also result in log entries but
19ee2b2434SSimon Glass	  these will not have names.
20ee2b2434SSimon Glass
21824bb1b4SSimon Glassconfig SPL_BOOTSTAGE
22824bb1b4SSimon Glass	bool "Boot timing and reported in SPL"
23824bb1b4SSimon Glass	depends on BOOTSTAGE
24824bb1b4SSimon Glass	help
25824bb1b4SSimon Glass	  Enable recording of boot time in SPL. To make this visible to U-Boot
26824bb1b4SSimon Glass	  proper, enable BOOTSTAGE_STASH as well. This will stash the timing
27824bb1b4SSimon Glass	  information when SPL finishes and load it when U-Boot proper starts
28824bb1b4SSimon Glass	  up.
29824bb1b4SSimon Glass
30c0126bd8SSimon Glassconfig TPL_BOOTSTAGE
31c0126bd8SSimon Glass	bool "Boot timing and reported in TPL"
32c0126bd8SSimon Glass	depends on BOOTSTAGE
33c0126bd8SSimon Glass	help
34c0126bd8SSimon Glass	  Enable recording of boot time in SPL. To make this visible to U-Boot
35c0126bd8SSimon Glass	  proper, enable BOOTSTAGE_STASH as well. This will stash the timing
36c0126bd8SSimon Glass	  information when TPL finishes and load it when U-Boot proper starts
37c0126bd8SSimon Glass	  up.
38c0126bd8SSimon Glass
39ee2b2434SSimon Glassconfig BOOTSTAGE_REPORT
40ee2b2434SSimon Glass	bool "Display a detailed boot timing report before booting the OS"
41ee2b2434SSimon Glass	depends on BOOTSTAGE
42ee2b2434SSimon Glass	help
43ee2b2434SSimon Glass	  Enable output of a boot time report just before the OS is booted.
44ee2b2434SSimon Glass	  This shows how long it took U-Boot to go through each stage of the
45ee2b2434SSimon Glass	  boot process. The report looks something like this:
46ee2b2434SSimon Glass
47ee2b2434SSimon Glass		Timer summary in microseconds:
48ee2b2434SSimon Glass		       Mark    Elapsed  Stage
49ee2b2434SSimon Glass			  0          0  reset
50ee2b2434SSimon Glass		  3,575,678  3,575,678  board_init_f start
51ee2b2434SSimon Glass		  3,575,695         17  arch_cpu_init A9
52ee2b2434SSimon Glass		  3,575,777         82  arch_cpu_init done
53ee2b2434SSimon Glass		  3,659,598     83,821  board_init_r start
54ee2b2434SSimon Glass		  3,910,375    250,777  main_loop
55ee2b2434SSimon Glass		 29,916,167 26,005,792  bootm_start
56ee2b2434SSimon Glass		 30,361,327    445,160  start_kernel
57ee2b2434SSimon Glass
5803ecac31SSimon Glassconfig BOOTSTAGE_RECORD_COUNT
5903ecac31SSimon Glass	int "Number of boot stage records to store"
6003ecac31SSimon Glass	default 30
6103ecac31SSimon Glass	help
6203ecac31SSimon Glass	  This is the size of the bootstage record list and is the maximum
6303ecac31SSimon Glass	  number of bootstage records that can be recorded.
6403ecac31SSimon Glass
65d69bb0ecSSimon Glassconfig SPL_BOOTSTAGE_RECORD_COUNT
66d69bb0ecSSimon Glass	int "Number of boot stage records to store for SPL"
67d69bb0ecSSimon Glass	default 5
68d69bb0ecSSimon Glass	help
69d69bb0ecSSimon Glass	  This is the size of the bootstage record list and is the maximum
70d69bb0ecSSimon Glass	  number of bootstage records that can be recorded.
71d69bb0ecSSimon Glass
72ee2b2434SSimon Glassconfig BOOTSTAGE_FDT
73ee2b2434SSimon Glass	bool "Store boot timing information in the OS device tree"
74ee2b2434SSimon Glass	depends on BOOTSTAGE
75ee2b2434SSimon Glass	help
76ee2b2434SSimon Glass	  Stash the bootstage information in the FDT. A root 'bootstage'
77ee2b2434SSimon Glass	  node is created with each bootstage id as a child. Each child
78ee2b2434SSimon Glass	  has a 'name' property and either 'mark' containing the
7957247d9cSRobert P. J. Day	  mark time in microseconds, or 'accum' containing the
80ee2b2434SSimon Glass	  accumulated time for that bootstage id in microseconds.
81ee2b2434SSimon Glass	  For example:
82ee2b2434SSimon Glass
83ee2b2434SSimon Glass		bootstage {
84ee2b2434SSimon Glass			154 {
85ee2b2434SSimon Glass				name = "board_init_f";
86ee2b2434SSimon Glass				mark = <3575678>;
87ee2b2434SSimon Glass			};
88ee2b2434SSimon Glass			170 {
89ee2b2434SSimon Glass				name = "lcd";
90ee2b2434SSimon Glass				accum = <33482>;
91ee2b2434SSimon Glass			};
92ee2b2434SSimon Glass		};
93ee2b2434SSimon Glass
94ee2b2434SSimon Glass	  Code in the Linux kernel can find this in /proc/devicetree.
95ee2b2434SSimon Glass
96ee2b2434SSimon Glassconfig BOOTSTAGE_STASH
97ee2b2434SSimon Glass	bool "Stash the boot timing information in memory before booting OS"
98ee2b2434SSimon Glass	depends on BOOTSTAGE
99ee2b2434SSimon Glass	help
100ee2b2434SSimon Glass	  Some OSes do not support device tree. Bootstage can instead write
101ee2b2434SSimon Glass	  the boot timing information in a binary format at a given address.
102ee2b2434SSimon Glass	  This happens through a call to bootstage_stash(), typically in
103ee2b2434SSimon Glass	  the CPU's cleanup_before_linux() function. You can use the
104ee2b2434SSimon Glass	  'bootstage stash' and 'bootstage unstash' commands to do this on
105ee2b2434SSimon Glass	  the command line.
106ee2b2434SSimon Glass
107ee2b2434SSimon Glassconfig BOOTSTAGE_STASH_ADDR
108ee2b2434SSimon Glass	hex "Address to stash boot timing information"
109ee2b2434SSimon Glass	default 0
110ee2b2434SSimon Glass	help
111ee2b2434SSimon Glass	  Provide an address which will not be overwritten by the OS when it
112ee2b2434SSimon Glass	  starts, so that it can read this information when ready.
113ee2b2434SSimon Glass
114ee2b2434SSimon Glassconfig BOOTSTAGE_STASH_SIZE
115ee2b2434SSimon Glass	hex "Size of boot timing stash region"
116fad6a2b7SNobuhiro Iwamatsu	default 0x1000
117ee2b2434SSimon Glass	help
118ee2b2434SSimon Glass	  This should be large enough to hold the bootstage stash. A value of
119ee2b2434SSimon Glass	  4096 (4KiB) is normally plenty.
120ee2b2434SSimon Glass
121ee2b2434SSimon Glassendmenu
122ee2b2434SSimon Glass
123d14739ffSPeng Fanmenu "Boot media"
124d14739ffSPeng Fan
125d14739ffSPeng Fanconfig NOR_BOOT
126d14739ffSPeng Fan	bool "Support for booting from NOR flash"
127d14739ffSPeng Fan	depends on NOR
128d14739ffSPeng Fan	help
129d14739ffSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
130d14739ffSPeng Fan	  booted via NOR.  In this case we will enable certain pinmux early
131d14739ffSPeng Fan	  as the ROM only partially sets up pinmux.  We also default to using
132d14739ffSPeng Fan	  NOR for environment.
133d14739ffSPeng Fan
134faaef73fSPeng Fanconfig NAND_BOOT
135faaef73fSPeng Fan	bool "Support for booting from NAND flash"
136faaef73fSPeng Fan	default n
1379d04b5feSAdam Ford	imply NAND
138faaef73fSPeng Fan	help
139faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
140faaef73fSPeng Fan	  booted via NAND flash. This is not a must, some SoCs need this,
14157247d9cSRobert P. J. Day	  some not.
142faaef73fSPeng Fan
143faaef73fSPeng Fanconfig ONENAND_BOOT
144faaef73fSPeng Fan	bool "Support for booting from ONENAND"
145faaef73fSPeng Fan	default n
1469d04b5feSAdam Ford	imply NAND
147faaef73fSPeng Fan	help
148faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
149faaef73fSPeng Fan	  booted via ONENAND. This is not a must, some SoCs need this,
15057247d9cSRobert P. J. Day	  some not.
151faaef73fSPeng Fan
152faaef73fSPeng Fanconfig QSPI_BOOT
153faaef73fSPeng Fan	bool "Support for booting from QSPI flash"
154faaef73fSPeng Fan	default n
155faaef73fSPeng Fan	help
156faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
157faaef73fSPeng Fan	  booted via QSPI flash. This is not a must, some SoCs need this,
15857247d9cSRobert P. J. Day	  some not.
159faaef73fSPeng Fan
160faaef73fSPeng Fanconfig SATA_BOOT
161faaef73fSPeng Fan	bool "Support for booting from SATA"
162faaef73fSPeng Fan	default n
163faaef73fSPeng Fan	help
164faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
165faaef73fSPeng Fan	  booted via SATA. This is not a must, some SoCs need this,
16657247d9cSRobert P. J. Day	  some not.
167faaef73fSPeng Fan
168faaef73fSPeng Fanconfig SD_BOOT
169faaef73fSPeng Fan	bool "Support for booting from SD/EMMC"
170faaef73fSPeng Fan	default n
171faaef73fSPeng Fan	help
172faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
173faaef73fSPeng Fan	  booted via SD/EMMC. This is not a must, some SoCs need this,
17457247d9cSRobert P. J. Day	  some not.
175faaef73fSPeng Fan
176faaef73fSPeng Fanconfig SPI_BOOT
177faaef73fSPeng Fan	bool "Support for booting from SPI flash"
178faaef73fSPeng Fan	default n
179faaef73fSPeng Fan	help
180faaef73fSPeng Fan	  Enabling this will make a U-Boot binary that is capable of being
181faaef73fSPeng Fan	  booted via SPI flash. This is not a must, some SoCs need this,
18257247d9cSRobert P. J. Day	  some not.
183faaef73fSPeng Fan
184d14739ffSPeng Fanendmenu
185d14739ffSPeng Fan
186bb597c0eSHeiko Schocherconfig BOOTDELAY
187bb597c0eSHeiko Schocher	int "delay in seconds before automatically booting"
1885e4e8741STom Rini	default 2
18941598c82SMasahiro Yamada	depends on AUTOBOOT
190bb597c0eSHeiko Schocher	help
191bb597c0eSHeiko Schocher	  Delay before automatically running bootcmd;
1922fbb8462SMasahiro Yamada	  set to 0 to autoboot with no delay, but you can stop it by key input.
193bb597c0eSHeiko Schocher	  set to -1 to disable autoboot.
194bb597c0eSHeiko Schocher	  set to -2 to autoboot with no delay and not check for abort
195bb597c0eSHeiko Schocher
196b27dc8ecSAlex Kiernan	  If this value is >= 0 then it is also used for the default delay
197b27dc8ecSAlex Kiernan	  before starting the default entry in bootmenu. If it is < 0 then
198b27dc8ecSAlex Kiernan	  a default value of 10s is used.
199b27dc8ecSAlex Kiernan
2009060970fSMasahiro Yamada	  See doc/README.autoboot for details.
2019060970fSMasahiro Yamada
2025abc1a45SSam Protsenkoconfig USE_BOOTARGS
2035abc1a45SSam Protsenko	bool "Enable boot arguments"
2045abc1a45SSam Protsenko	help
2055abc1a45SSam Protsenko	  Provide boot arguments to bootm command. Boot arguments are specified
2065abc1a45SSam Protsenko	  in CONFIG_BOOTARGS option. Enable this option to be able to specify
2075abc1a45SSam Protsenko	  CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
2085abc1a45SSam Protsenko	  will be undefined and won't take any space in U-Boot image.
2095abc1a45SSam Protsenko
2105abc1a45SSam Protsenkoconfig BOOTARGS
2115abc1a45SSam Protsenko	string "Boot arguments"
2125abc1a45SSam Protsenko	depends on USE_BOOTARGS
2135abc1a45SSam Protsenko	help
2145abc1a45SSam Protsenko	  This can be used to pass arguments to the bootm command. The value of
2155abc1a45SSam Protsenko	  CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
2165abc1a45SSam Protsenko	  this value will also override the "chosen" node in FDT blob.
2175abc1a45SSam Protsenko
218b6251db8STom Riniconfig USE_BOOTCOMMAND
219b6251db8STom Rini	bool "Enable a default value for bootcmd"
220b6251db8STom Rini	help
221b6251db8STom Rini	  Provide a default value for the bootcmd entry in the environment.  If
222b6251db8STom Rini	  autoboot is enabled this is what will be run automatically.  Enable
223b6251db8STom Rini	  this option to be able to specify CONFIG_BOOTCOMMAND as a string.  If
224b6251db8STom Rini	  this option is disabled, CONFIG_BOOTCOMMAND will be undefined and
225b6251db8STom Rini	  won't take any space in U-Boot image.
226b6251db8STom Rini
227b6251db8STom Riniconfig BOOTCOMMAND
228b6251db8STom Rini	string "bootcmd value"
229b6251db8STom Rini	depends on USE_BOOTCOMMAND
230b6251db8STom Rini	default "run distro_bootcmd" if DISTRO_DEFAULTS
231b6251db8STom Rini	help
232b6251db8STom Rini	  This is the string of commands that will be used as bootcmd and if
233b6251db8STom Rini	  AUTOBOOT is set, automatically run.
234b6251db8STom Rini
235607d06d2SMasahiro Yamadaconfig USE_PREBOOT
236607d06d2SMasahiro Yamada	bool "Enable preboot"
237607d06d2SMasahiro Yamada	help
238607d06d2SMasahiro Yamada	  When this option is enabled, the existence of the environment
239607d06d2SMasahiro Yamada	  variable "preboot" will be checked immediately before starting the
240607d06d2SMasahiro Yamada	  CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
241607d06d2SMasahiro Yamada	  entering interactive mode.
242607d06d2SMasahiro Yamada
243607d06d2SMasahiro Yamada	  This feature is especially useful when "preboot" is automatically
244607d06d2SMasahiro Yamada	  generated or modified. For example, the boot code can modify the
245607d06d2SMasahiro Yamada	  "preboot" when a user holds down a certain combination of keys.
246607d06d2SMasahiro Yamada
247607d06d2SMasahiro Yamadaconfig PREBOOT
248607d06d2SMasahiro Yamada	string "preboot default value"
249607d06d2SMasahiro Yamada	depends on USE_PREBOOT
250607d06d2SMasahiro Yamada	help
251607d06d2SMasahiro Yamada	  This is the default of "preboot" environment variable.
252607d06d2SMasahiro Yamada
25398af8799SSimon Glassmenu "Console"
25498af8799SSimon Glass
2554880b026STom Riniconfig MENU
2564880b026STom Rini	bool
2574880b026STom Rini	help
2584880b026STom Rini	  This is the library functionality to provide a text-based menu of
2594880b026STom Rini	  choices for the user to make choices with.
2604880b026STom Rini
2619854a874SSimon Glassconfig CONSOLE_RECORD
2629854a874SSimon Glass	bool "Console recording"
2639854a874SSimon Glass	help
2649854a874SSimon Glass	  This provides a way to record console output (and provide console
26557247d9cSRobert P. J. Day	  input) through circular buffers. This is mostly useful for testing.
2669854a874SSimon Glass	  Console output is recorded even when the console is silent.
2679854a874SSimon Glass	  To enable console recording, call console_record_reset_enable()
2689854a874SSimon Glass	  from your code.
2699854a874SSimon Glass
2709854a874SSimon Glassconfig CONSOLE_RECORD_OUT_SIZE
2719854a874SSimon Glass	hex "Output buffer size"
2729854a874SSimon Glass	depends on CONSOLE_RECORD
2739854a874SSimon Glass	default 0x400 if CONSOLE_RECORD
2749854a874SSimon Glass	help
2759854a874SSimon Glass	  Set the size of the console output buffer. When this fills up, no
2769854a874SSimon Glass	  more data will be recorded until some is removed. The buffer is
2779854a874SSimon Glass	  allocated immediately after the malloc() region is ready.
2789854a874SSimon Glass
2799854a874SSimon Glassconfig CONSOLE_RECORD_IN_SIZE
2809854a874SSimon Glass	hex "Input buffer size"
2819854a874SSimon Glass	depends on CONSOLE_RECORD
2829854a874SSimon Glass	default 0x100 if CONSOLE_RECORD
2839854a874SSimon Glass	help
2849854a874SSimon Glass	  Set the size of the console input buffer. When this contains data,
2859854a874SSimon Glass	  tstc() and getc() will use this in preference to real device input.
2869854a874SSimon Glass	  The buffer is allocated immediately after the malloc() region is
2879854a874SSimon Glass	  ready.
2884d25507fSSiva Durga Prasad Paladugu
28983f6f608SChristian Gmeinerconfig DISABLE_CONSOLE
29083f6f608SChristian Gmeiner	bool "Add functionality to disable console completely"
29183f6f608SChristian Gmeiner	help
29283f6f608SChristian Gmeiner		Disable console (in & out).
29383f6f608SChristian Gmeiner
294a4d88920SSiva Durga Prasad Paladuguconfig IDENT_STRING
295a4d88920SSiva Durga Prasad Paladugu	string "Board specific string to be added to uboot version string"
296a4d88920SSiva Durga Prasad Paladugu	help
297a4d88920SSiva Durga Prasad Paladugu	  This options adds the board specific name to u-boot version.
298a4d88920SSiva Durga Prasad Paladugu
299b44b3026SMasahiro Yamadaconfig LOGLEVEL
300b44b3026SMasahiro Yamada	int "loglevel"
3016a3e65deSTom Rini	default 4
302b44b3026SMasahiro Yamada	range 0 8
303b44b3026SMasahiro Yamada	help
304b44b3026SMasahiro Yamada	  All Messages with a loglevel smaller than the console loglevel will
305b44b3026SMasahiro Yamada	  be compiled in. The loglevels are defined as follows:
306b44b3026SMasahiro Yamada
3076fc7e938SSimon Glass	    0 - emergency
3086fc7e938SSimon Glass	    1 - alert
3096fc7e938SSimon Glass	    2 - critical
3106fc7e938SSimon Glass	    3 - error
3116fc7e938SSimon Glass	    4 - warning
3126fc7e938SSimon Glass	    5 - note
3136fc7e938SSimon Glass	    6 - info
3146fc7e938SSimon Glass	    7 - debug
3156fc7e938SSimon Glass	    8 - debug content
3166fc7e938SSimon Glass	    9 - debug hardware I/O
317b44b3026SMasahiro Yamada
318b44b3026SMasahiro Yamadaconfig SPL_LOGLEVEL
319b44b3026SMasahiro Yamada	int
320b44b3026SMasahiro Yamada	default LOGLEVEL
321b44b3026SMasahiro Yamada
3224d8d3056SSimon Glassconfig TPL_LOGLEVEL
3234d8d3056SSimon Glass	int
3244d8d3056SSimon Glass	default LOGLEVEL
3254d8d3056SSimon Glass
32698af8799SSimon Glassconfig SILENT_CONSOLE
32798af8799SSimon Glass	bool "Support a silent console"
32898af8799SSimon Glass	help
32998af8799SSimon Glass	  This option allows the console to be silenced, meaning that no
33098af8799SSimon Glass	  output will appear on the console devices. This is controlled by
331f7597730SChris Packham	  setting the environment variable 'silent' to a non-empty value.
33298af8799SSimon Glass	  Note this also silences the console when booting Linux.
33398af8799SSimon Glass
33498af8799SSimon Glass	  When the console is set up, the variable is checked, and the
33598af8799SSimon Glass	  GD_FLG_SILENT flag is set. Changing the environment variable later
33698af8799SSimon Glass	  will update the flag.
33798af8799SSimon Glass
33898af8799SSimon Glassconfig SILENT_U_BOOT_ONLY
33998af8799SSimon Glass	bool "Only silence the U-Boot console"
34098af8799SSimon Glass	depends on SILENT_CONSOLE
34198af8799SSimon Glass	help
34298af8799SSimon Glass	  Normally when the U-Boot console is silenced, Linux's console is
34398af8799SSimon Glass	  also silenced (assuming the board boots into Linux). This option
34498af8799SSimon Glass	  allows the linux console to operate normally, even if U-Boot's
34598af8799SSimon Glass	  is silenced.
34698af8799SSimon Glass
34798af8799SSimon Glassconfig SILENT_CONSOLE_UPDATE_ON_SET
34898af8799SSimon Glass	bool "Changes to the 'silent' environment variable update immediately"
34998af8799SSimon Glass	depends on SILENT_CONSOLE
35098af8799SSimon Glass	default y if SILENT_CONSOLE
35198af8799SSimon Glass	help
35298af8799SSimon Glass	  When the 'silent' environment variable is changed, update the
35398af8799SSimon Glass	  console silence flag immediately. This allows 'setenv' to be used
35498af8799SSimon Glass	  to silence or un-silence the console.
35598af8799SSimon Glass
35698af8799SSimon Glass	  The effect is that any change to the variable will affect the
35798af8799SSimon Glass	  GD_FLG_SILENT flag.
35898af8799SSimon Glass
35998af8799SSimon Glassconfig SILENT_CONSOLE_UPDATE_ON_RELOC
36098af8799SSimon Glass	bool "Allow flags to take effect on relocation"
36198af8799SSimon Glass	depends on SILENT_CONSOLE
36298af8799SSimon Glass	help
36398af8799SSimon Glass	  In some cases the environment is not available until relocation
36498af8799SSimon Glass	  (e.g. NAND). This option makes the value of the 'silent'
36598af8799SSimon Glass	  environment variable take effect at relocation.
36698af8799SSimon Glass
3678f925584SSimon Glassconfig PRE_CONSOLE_BUFFER
3688f925584SSimon Glass	bool "Buffer characters before the console is available"
3698f925584SSimon Glass	help
3708f925584SSimon Glass	  Prior to the console being initialised (i.e. serial UART
3718f925584SSimon Glass	  initialised etc) all console output is silently discarded.
3728f925584SSimon Glass	  Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
3738f925584SSimon Glass	  buffer any console messages prior to the console being
3748f925584SSimon Glass	  initialised to a buffer. The buffer is a circular buffer, so
3758f925584SSimon Glass	  if it overflows, earlier output is discarded.
3768f925584SSimon Glass
3778f925584SSimon Glass	  Note that this is not currently supported in SPL. It would be
3788f925584SSimon Glass	  useful to be able to share the pre-console buffer with SPL.
3798f925584SSimon Glass
3808f925584SSimon Glassconfig PRE_CON_BUF_SZ
3818f925584SSimon Glass	int "Sets the size of the pre-console buffer"
3828f925584SSimon Glass	depends on PRE_CONSOLE_BUFFER
3838f925584SSimon Glass	default 4096
3848f925584SSimon Glass	help
3858f925584SSimon Glass	  The size of the pre-console buffer affects how much console output
3868f925584SSimon Glass	  can be held before it overflows and starts discarding earlier
3878f925584SSimon Glass	  output. Normally there is very little output at this early stage,
3888f925584SSimon Glass	  unless debugging is enabled, so allow enough for ~10 lines of
3898f925584SSimon Glass	  text.
3908f925584SSimon Glass
3918f925584SSimon Glass	  This is a useful feature if you are using a video console and
3928f925584SSimon Glass	  want to see the full boot output on the console. Without this
3938f925584SSimon Glass	  option only the post-relocation output will be displayed.
3948f925584SSimon Glass
3958f925584SSimon Glassconfig PRE_CON_BUF_ADDR
3968f925584SSimon Glass	hex "Address of the pre-console buffer"
3978f925584SSimon Glass	depends on PRE_CONSOLE_BUFFER
3988f925584SSimon Glass	default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
3998f925584SSimon Glass	default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
4008f925584SSimon Glass	help
4018f925584SSimon Glass	  This sets the start address of the pre-console buffer. This must
4028f925584SSimon Glass	  be in available memory and is accessed before relocation and
4038f925584SSimon Glass	  possibly before DRAM is set up. Therefore choose an address
4048f925584SSimon Glass	  carefully.
4058f925584SSimon Glass
4068f925584SSimon Glass	  We should consider removing this option and allocating the memory
4078f925584SSimon Glass	  in board_init_f_init_reserve() instead.
4088f925584SSimon Glass
409ef26d603SSimon Glassconfig CONSOLE_MUX
410ef26d603SSimon Glass	bool "Enable console multiplexing"
411ef26d603SSimon Glass	default y if DM_VIDEO || VIDEO || LCD
412ef26d603SSimon Glass	help
413ef26d603SSimon Glass	  This allows multiple devices to be used for each console 'file'.
414ef26d603SSimon Glass	  For example, stdout can be set to go to serial and video.
415ef26d603SSimon Glass	  Similarly, stdin can be set to come from serial and keyboard.
416ef26d603SSimon Glass	  Input can be provided from either source. Console multiplexing
417ef26d603SSimon Glass	  adds a small amount of size to U-Boot.  Changes to the environment
418ef26d603SSimon Glass	  variables stdout, stdin and stderr will take effect immediately.
419ef26d603SSimon Glass
420ef26d603SSimon Glassconfig SYS_CONSOLE_IS_IN_ENV
421ef26d603SSimon Glass	bool "Select console devices from the environment"
422ef26d603SSimon Glass	default y if CONSOLE_MUX
423ef26d603SSimon Glass	help
424ef26d603SSimon Glass	  This allows multiple input/output devices to be set at boot time.
425ef26d603SSimon Glass	  For example, if stdout is set to "serial,video" then output will
426ef26d603SSimon Glass	  be sent to both the serial and video devices on boot. The
427ef26d603SSimon Glass	  environment variables can be updated after boot to change the
428ef26d603SSimon Glass	  input/output devices.
429ef26d603SSimon Glass
43084f2a5d0SSimon Glassconfig SYS_CONSOLE_OVERWRITE_ROUTINE
43184f2a5d0SSimon Glass	bool "Allow board control over console overwriting"
43284f2a5d0SSimon Glass	help
43384f2a5d0SSimon Glass	  If this is enabled, and the board-specific function
43484f2a5d0SSimon Glass	  overwrite_console() returns 1, the stdin, stderr and stdout are
43584f2a5d0SSimon Glass	  switched to the serial port, else the settings in the environment
43684f2a5d0SSimon Glass	  are used. If this is not enabled, the console will not be switched
43784f2a5d0SSimon Glass	  to serial.
43884f2a5d0SSimon Glass
4393505bc55SSimon Glassconfig SYS_CONSOLE_ENV_OVERWRITE
4403505bc55SSimon Glass	bool "Update environment variables during console init"
4413505bc55SSimon Glass	help
4423505bc55SSimon Glass	  The console environment variables (stdout, stdin, stderr) can be
4433505bc55SSimon Glass	  used to determine the correct console devices on start-up. This
4443505bc55SSimon Glass	  option writes the console devices to these variables on console
4453505bc55SSimon Glass	  start-up (after relocation). This causes the environment to be
4463505bc55SSimon Glass	  updated to match the console devices actually chosen.
4473505bc55SSimon Glass
448f3f3efffSSimon Glassconfig SYS_CONSOLE_INFO_QUIET
449f3f3efffSSimon Glass	bool "Don't display the console devices on boot"
450f3f3efffSSimon Glass	help
451f3f3efffSSimon Glass	  Normally U-Boot displays the current settings for stdout, stdin
452f3f3efffSSimon Glass	  and stderr on boot when the post-relocation console is set up.
453f7597730SChris Packham	  Enable this option to suppress this output. It can be obtained by
454f3f3efffSSimon Glass	  calling stdio_print_current_devices() from board code.
455f3f3efffSSimon Glass
456869588deSSimon Glassconfig SYS_STDIO_DEREGISTER
457869588deSSimon Glass	bool "Allow deregistering stdio devices"
458869588deSSimon Glass	default y if USB_KEYBOARD
459869588deSSimon Glass	help
460869588deSSimon Glass	  Generally there is no need to deregister stdio devices since they
461869588deSSimon Glass	  are never deactivated. But if a stdio device is used which can be
462869588deSSimon Glass	  removed (for example a USB keyboard) then this option can be
463869588deSSimon Glass	  enabled to ensure this is handled correctly.
464869588deSSimon Glass
46598af8799SSimon Glassendmenu
46698af8799SSimon Glass
467e9c8d49dSSimon Glassmenu "Logging"
468e9c8d49dSSimon Glass
469e9c8d49dSSimon Glassconfig LOG
470e9c8d49dSSimon Glass	bool "Enable logging support"
471563273dfSMichal Simek	depends on DM
472e9c8d49dSSimon Glass	help
473e9c8d49dSSimon Glass	  This enables support for logging of status and debug messages. These
474e9c8d49dSSimon Glass	  can be displayed on the console, recorded in a memory buffer, or
475e9c8d49dSSimon Glass	  discarded if not needed. Logging supports various categories and
476e9c8d49dSSimon Glass	  levels of severity.
477e9c8d49dSSimon Glass
478e9c8d49dSSimon Glassconfig SPL_LOG
479e9c8d49dSSimon Glass	bool "Enable logging support in SPL"
480c0126bd8SSimon Glass	depends on LOG
481c0126bd8SSimon Glass	help
482c0126bd8SSimon Glass	  This enables support for logging of status and debug messages. These
483c0126bd8SSimon Glass	  can be displayed on the console, recorded in a memory buffer, or
484c0126bd8SSimon Glass	  discarded if not needed. Logging supports various categories and
485c0126bd8SSimon Glass	  levels of severity.
486c0126bd8SSimon Glass
487c0126bd8SSimon Glassconfig TPL_LOG
488c0126bd8SSimon Glass	bool "Enable logging support in TPL"
489c0126bd8SSimon Glass	depends on LOG
490e9c8d49dSSimon Glass	help
491e9c8d49dSSimon Glass	  This enables support for logging of status and debug messages. These
492e9c8d49dSSimon Glass	  can be displayed on the console, recorded in a memory buffer, or
493e9c8d49dSSimon Glass	  discarded if not needed. Logging supports various categories and
494e9c8d49dSSimon Glass	  levels of severity.
495e9c8d49dSSimon Glass
496e9c8d49dSSimon Glassconfig LOG_MAX_LEVEL
497e9c8d49dSSimon Glass	int "Maximum log level to record"
498e9c8d49dSSimon Glass	depends on LOG
499e9c8d49dSSimon Glass	default 5
500e9c8d49dSSimon Glass	help
501e9c8d49dSSimon Glass	  This selects the maximum log level that will be recorded. Any value
502e9c8d49dSSimon Glass	  higher than this will be ignored. If possible log statements below
503e9c8d49dSSimon Glass	  this level will be discarded at build time. Levels:
504e9c8d49dSSimon Glass
5056fc7e938SSimon Glass	    0 - emergency
5066fc7e938SSimon Glass	    1 - alert
5076fc7e938SSimon Glass	    2 - critical
5086fc7e938SSimon Glass	    3 - error
5096fc7e938SSimon Glass	    4 - warning
5106fc7e938SSimon Glass	    5 - note
5116fc7e938SSimon Glass	    6 - info
512e9c8d49dSSimon Glass	    7 - debug
5136fc7e938SSimon Glass	    8 - debug content
5146fc7e938SSimon Glass	    9 - debug hardware I/O
515e9c8d49dSSimon Glass
516e9c8d49dSSimon Glassconfig SPL_LOG_MAX_LEVEL
517e9c8d49dSSimon Glass	int "Maximum log level to record in SPL"
518e9c8d49dSSimon Glass	depends on SPL_LOG
519e9c8d49dSSimon Glass	default 3
520e9c8d49dSSimon Glass	help
521e9c8d49dSSimon Glass	  This selects the maximum log level that will be recorded. Any value
522e9c8d49dSSimon Glass	  higher than this will be ignored. If possible log statements below
523e9c8d49dSSimon Glass	  this level will be discarded at build time. Levels:
524e9c8d49dSSimon Glass
5256fc7e938SSimon Glass	    0 - emergency
5266fc7e938SSimon Glass	    1 - alert
5276fc7e938SSimon Glass	    2 - critical
5286fc7e938SSimon Glass	    3 - error
5296fc7e938SSimon Glass	    4 - warning
5306fc7e938SSimon Glass	    5 - note
5316fc7e938SSimon Glass	    6 - info
532e9c8d49dSSimon Glass	    7 - debug
5336fc7e938SSimon Glass	    8 - debug content
5346fc7e938SSimon Glass	    9 - debug hardware I/O
535e9c8d49dSSimon Glass
5364d8d3056SSimon Glassconfig TPL_LOG_MAX_LEVEL
5374d8d3056SSimon Glass	int "Maximum log level to record in TPL"
5384d8d3056SSimon Glass	depends on TPL_LOG
5394d8d3056SSimon Glass	default 3
5404d8d3056SSimon Glass	help
5414d8d3056SSimon Glass	  This selects the maximum log level that will be recorded. Any value
5424d8d3056SSimon Glass	  higher than this will be ignored. If possible log statements below
5434d8d3056SSimon Glass	  this level will be discarded at build time. Levels:
5444d8d3056SSimon Glass
5456fc7e938SSimon Glass	    0 - emergency
5466fc7e938SSimon Glass	    1 - alert
5476fc7e938SSimon Glass	    2 - critical
5486fc7e938SSimon Glass	    3 - error
5496fc7e938SSimon Glass	    4 - warning
5506fc7e938SSimon Glass	    5 - note
5516fc7e938SSimon Glass	    6 - info
5524d8d3056SSimon Glass	    7 - debug
5536fc7e938SSimon Glass	    8 - debug content
5546fc7e938SSimon Glass	    9 - debug hardware I/O
5554d8d3056SSimon Glass
556f0b05c95SSimon Glassconfig LOG_DEFAULT_LEVEL
557f0b05c95SSimon Glass	int "Default logging level to display"
558f0b05c95SSimon Glass	default 6
559f0b05c95SSimon Glass	help
560f0b05c95SSimon Glass	  This is the default logging level set when U-Boot starts. It can
561f0b05c95SSimon Glass	  be adjusted later using the 'log level' command. Note that setting
562f0b05c95SSimon Glass	  this to a value abnove LOG_MAX_LEVEL will be ineffective, since the
563f0b05c95SSimon Glass	  higher levels are not compiled in to U-Boot.
564f0b05c95SSimon Glass
565f0b05c95SSimon Glass	    0 - emergency
566f0b05c95SSimon Glass	    1 - alert
567f0b05c95SSimon Glass	    2 - critical
568f0b05c95SSimon Glass	    3 - error
569f0b05c95SSimon Glass	    4 - warning
570f0b05c95SSimon Glass	    5 - note
571f0b05c95SSimon Glass	    6 - info
572f0b05c95SSimon Glass	    7 - debug
573f0b05c95SSimon Glass	    8 - debug content
574f0b05c95SSimon Glass	    9 - debug hardware I/O
575f0b05c95SSimon Glass
576c6d47535SSimon Glassconfig LOG_CONSOLE
577c6d47535SSimon Glass	bool "Allow log output to the console"
578c6d47535SSimon Glass	depends on LOG
579c6d47535SSimon Glass	default y
580c6d47535SSimon Glass	help
581c6d47535SSimon Glass	  Enables a log driver which writes log records to the console.
582c6d47535SSimon Glass	  Generally the console is the serial port or LCD display. Only the
583c6d47535SSimon Glass	  log message is shown - other details like level, category, file and
584c6d47535SSimon Glass	  line number are omitted.
585c6d47535SSimon Glass
5864d8d3056SSimon Glassconfig SPL_LOG_CONSOLE
587c6d47535SSimon Glass	bool "Allow log output to the console in SPL"
5884d8d3056SSimon Glass	depends on SPL_LOG
5894d8d3056SSimon Glass	default y
5904d8d3056SSimon Glass	help
5914d8d3056SSimon Glass	  Enables a log driver which writes log records to the console.
5924d8d3056SSimon Glass	  Generally the console is the serial port or LCD display. Only the
5934d8d3056SSimon Glass	  log message is shown - other details like level, category, file and
5944d8d3056SSimon Glass	  line number are omitted.
5954d8d3056SSimon Glass
5964d8d3056SSimon Glassconfig TPL_LOG_CONSOLE
5974d8d3056SSimon Glass	bool "Allow log output to the console in SPL"
5984d8d3056SSimon Glass	depends on TPL_LOG
599c6d47535SSimon Glass	default y
600c6d47535SSimon Glass	help
601c6d47535SSimon Glass	  Enables a log driver which writes log records to the console.
602c6d47535SSimon Glass	  Generally the console is the serial port or LCD display. Only the
603c6d47535SSimon Glass	  log message is shown - other details like level, category, file and
604c6d47535SSimon Glass	  line number are omitted.
605c6d47535SSimon Glass
606ef11ed82SSimon Glassconfig LOG_TEST
607ef11ed82SSimon Glass	bool "Provide a test for logging"
608ef11ed82SSimon Glass	depends on LOG
609ef11ed82SSimon Glass	default y if SANDBOX
610ef11ed82SSimon Glass	help
611ef11ed82SSimon Glass	  This enables a 'log test' command to test logging. It is normally
612ef11ed82SSimon Glass	  executed from a pytest and simply outputs logging information
613ef11ed82SSimon Glass	  in various different ways to test that the logging system works
614f7597730SChris Packham	  correctly with various settings.
615ef11ed82SSimon Glass
6163707c6eeSSimon Glassconfig LOG_ERROR_RETURN
6173707c6eeSSimon Glass	bool "Log all functions which return an error"
6183707c6eeSSimon Glass	depends on LOG
6193707c6eeSSimon Glass	help
6203707c6eeSSimon Glass	  When an error is returned in U-Boot it is sometimes difficult to
621f7597730SChris Packham	  figure out the root cause. For example, reading from SPI flash may
6223707c6eeSSimon Glass	  fail due to a problem in the SPI controller or due to the flash part
6233707c6eeSSimon Glass	  not returning the expected information. This option changes
6243707c6eeSSimon Glass	  log_ret() to log any errors it sees. With this option disabled,
6253707c6eeSSimon Glass	  log_ret() is a nop.
6263707c6eeSSimon Glass
6273707c6eeSSimon Glass	  You can add log_ret() to all functions which return an error code.
6283707c6eeSSimon Glass
629e9c8d49dSSimon Glassendmenu
630e9c8d49dSSimon Glass
631d021e942SAdam Fordconfig SUPPORT_RAW_INITRD
632d021e942SAdam Ford	bool "Enable raw initrd images"
633d021e942SAdam Ford	help
634d021e942SAdam Ford	  Note, defining the SUPPORT_RAW_INITRD allows user to supply
635d021e942SAdam Ford	  kernel with raw initrd images. The syntax is slightly different, the
636d021e942SAdam Ford	  address of the initrd must be augmented by it's size, in the following
637d021e942SAdam Ford	  format: "<initrd address>:<initrd size>".
638d021e942SAdam Ford
639d259c008SJagan Tekiconfig DEFAULT_FDT_FILE
640d259c008SJagan Teki	string "Default fdt file"
641d259c008SJagan Teki	help
642d259c008SJagan Teki	  This option is used to set the default fdt file to boot OS.
643d259c008SJagan Teki
6448ccf98b1SAdam Fordconfig MISC_INIT_R
6458ccf98b1SAdam Ford	bool "Execute Misc Init"
6468ccf98b1SAdam Ford	default y if ARCH_KEYSTONE || ARCH_SUNXI || MPC85xx
6478ccf98b1SAdam Ford	default y if ARCH_OMAP2PLUS && !AM33XX
6488ccf98b1SAdam Ford	help
6498ccf98b1SAdam Ford	  Enabling this option calls 'misc_init_r' function
6508ccf98b1SAdam Ford
6519dd1d0aaSHeiko Schocherconfig VERSION_VARIABLE
6529dd1d0aaSHeiko Schocher	bool "add U-Boot environment variable vers"
6539dd1d0aaSHeiko Schocher	default n
6549dd1d0aaSHeiko Schocher	help
6559dd1d0aaSHeiko Schocher	  If this variable is defined, an environment variable
6569dd1d0aaSHeiko Schocher	  named "ver" is created by U-Boot showing the U-Boot
6579dd1d0aaSHeiko Schocher	  version as printed by the "version" command.
6589dd1d0aaSHeiko Schocher	  Any change to this variable will be reverted at the
6599dd1d0aaSHeiko Schocher	  next reset.
660c2ae7d82SSimon Glass
661de70fefbSJagan Tekiconfig BOARD_LATE_INIT
6628eb55e19SMichal Simek	bool "Execute Board late init"
663de70fefbSJagan Teki	help
664de70fefbSJagan Teki	  Sometimes board require some initialization code that might
665de70fefbSJagan Teki	  require once the actual init done, example saving board specific env,
666de70fefbSJagan Teki	  boot-modes etc. which eventually done at late.
667de70fefbSJagan Teki
668de70fefbSJagan Teki	  So this config enable the late init code with the help of board_late_init
669de70fefbSJagan Teki	  function which should defined on respective boards.
670de70fefbSJagan Teki
67119a97475SLokesh Vutlaconfig DISPLAY_CPUINFO
67219a97475SLokesh Vutla	bool "Display information about the CPU during start up"
673f31414a0SAlexey Brodkin	default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K
67419a97475SLokesh Vutla	help
67519a97475SLokesh Vutla	  Display information about the CPU that U-Boot is running on
67619a97475SLokesh Vutla	  when U-Boot starts up. The function print_cpuinfo() is called
67719a97475SLokesh Vutla	  to do this.
67819a97475SLokesh Vutla
67984351792SLokesh Vutlaconfig DISPLAY_BOARDINFO
68078eba69dSMario Six	bool "Display information about the board during early start up"
681f31414a0SAlexey Brodkin	default y if ARC || ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
68284351792SLokesh Vutla	help
68384351792SLokesh Vutla	  Display information about the board that U-Boot is running on
68484351792SLokesh Vutla	  when U-Boot starts up. The board function checkboard() is called
68584351792SLokesh Vutla	  to do this.
68684351792SLokesh Vutla
68778eba69dSMario Sixconfig DISPLAY_BOARDINFO_LATE
68878eba69dSMario Six	bool "Display information about the board during late start up"
68978eba69dSMario Six	help
69078eba69dSMario Six	  Display information about the board that U-Boot is running on after
69178eba69dSMario Six	  the relocation phase. The board function checkboard() is called to do
69278eba69dSMario Six	  this.
69378eba69dSMario Six
6942acc24fcSPhilipp Tomsichconfig BOUNCE_BUFFER
6952acc24fcSPhilipp Tomsich	bool "Include bounce buffer API"
6962acc24fcSPhilipp Tomsich	help
6972acc24fcSPhilipp Tomsich	  Some peripherals support DMA from a subset of physically
6982acc24fcSPhilipp Tomsich	  addressable memory only.  To support such peripherals, the
6992acc24fcSPhilipp Tomsich	  bounce buffer API uses a temporary buffer: it copies data
7002acc24fcSPhilipp Tomsich	  to/from DMA regions while managing cache operations.
7012acc24fcSPhilipp Tomsich
7022acc24fcSPhilipp Tomsich	  A second possible use of bounce buffers is their ability to
7032acc24fcSPhilipp Tomsich	  provide aligned buffers for DMA operations.
7042acc24fcSPhilipp Tomsich
705bed44f49SSimon Glassconfig BOARD_TYPES
706bed44f49SSimon Glass	bool "Call get_board_type() to get and display the board type"
707bed44f49SSimon Glass	help
708bed44f49SSimon Glass	  If this option is enabled, checkboard() will call get_board_type()
709bed44f49SSimon Glass	  to get a string containing the board type and this will be
710bed44f49SSimon Glass	  displayed immediately after the model is shown on the console
711bed44f49SSimon Glass	  early in boot.
712bed44f49SSimon Glass
713a421192fSSimon Glassmenu "Start-up hooks"
714a421192fSSimon Glass
715a421192fSSimon Glassconfig ARCH_EARLY_INIT_R
716a421192fSSimon Glass	bool "Call arch-specific init soon after relocation"
717a421192fSSimon Glass	help
718a421192fSSimon Glass	  With this option U-Boot will call arch_early_init_r() soon after
719a421192fSSimon Glass	  relocation. Driver model is running by this point, and the cache
720a421192fSSimon Glass	  is on. Note that board_early_init_r() is called first, if
721a421192fSSimon Glass	  enabled. This can be used to set up architecture-specific devices.
722a421192fSSimon Glass
7234585601aSSimon Glassconfig ARCH_MISC_INIT
7244585601aSSimon Glass	bool "Call arch-specific init after relocation, when console is ready"
7254585601aSSimon Glass	help
7264585601aSSimon Glass	  With this option U-Boot will call arch_misc_init() after
7274585601aSSimon Glass	  relocation to allow miscellaneous arch-dependent initialisation
7284585601aSSimon Glass	  to be performed. This function should be defined by the board
729f7597730SChris Packham	  and will be called after the console is set up, after relocation.
7304585601aSSimon Glass
731a5d67547SSimon Glassconfig BOARD_EARLY_INIT_F
732a5d67547SSimon Glass	bool "Call board-specific init before relocation"
733a5d67547SSimon Glass	help
734a5d67547SSimon Glass	  Some boards need to perform initialisation as soon as possible
735a5d67547SSimon Glass	  after boot. With this option, U-Boot calls board_early_init_f()
736a5d67547SSimon Glass	  after driver model is ready in the pre-relocation init sequence.
737a5d67547SSimon Glass	  Note that the normal serial console is not yet set up, but the
738a5d67547SSimon Glass	  debug UART will be available if enabled.
739a5d67547SSimon Glass
74002ddc147SMario Sixconfig BOARD_EARLY_INIT_R
74102ddc147SMario Six	bool "Call board-specific init after relocation"
74202ddc147SMario Six	help
74302ddc147SMario Six	  Some boards need to perform initialisation as directly after
74402ddc147SMario Six	  relocation. With this option, U-Boot calls board_early_init_r()
74502ddc147SMario Six	  in the post-relocation init sequence.
74602ddc147SMario Six
7472aeb22d9SMario Sixconfig LAST_STAGE_INIT
7482aeb22d9SMario Six	bool "Call board-specific as last setup step"
7492aeb22d9SMario Six	help
7502aeb22d9SMario Six	  Some boards need to perform initialisation immediately before control
7512aeb22d9SMario Six	  is passed to the command-line interpreter (e.g. for initializations
7522aeb22d9SMario Six	  that depend on later phases in the init sequence). With this option,
7532aeb22d9SMario Six	  U-Boot calls last_stage_init() before the command-line interpreter is
7542aeb22d9SMario Six	  started.
7552aeb22d9SMario Six
756a421192fSSimon Glassendmenu
757a421192fSSimon Glass
758d70f919eSSimon Glassmenu "Security support"
759d70f919eSSimon Glass
760*06499e6bSEddie Jamesconfig MEASURED_BOOT
761*06499e6bSEddie James	bool "Measure boot images and configuration to TPM and event log"
762*06499e6bSEddie James	depends on HASH && TPM_V2
763*06499e6bSEddie James	help
764*06499e6bSEddie James	  This option enables measurement of the boot process. Measurement
765*06499e6bSEddie James	  involves creating cryptographic hashes of the binary images that
766*06499e6bSEddie James	  are booting and storing them in the TPM. In addition, a log of
767*06499e6bSEddie James	  these hashes is stored in memory for the OS to verify the booted
768*06499e6bSEddie James	  images and configuration. Enable this if the OS has configured
769*06499e6bSEddie James	  some memory area for the event log and you intend to use some
770*06499e6bSEddie James	  attestation tools on your system.
771*06499e6bSEddie James
772*06499e6bSEddie Jamesif MEASURED_BOOT
773*06499e6bSEddie James	config MEASURE_DEVICETREE
774*06499e6bSEddie James	bool "Measure the devicetree image"
775*06499e6bSEddie James	default y if MEASURED_BOOT
776*06499e6bSEddie James	help
777*06499e6bSEddie James	  On some platforms, the devicetree is not static as it may contain
778*06499e6bSEddie James	  random MAC addresses or other such data that changes each boot.
779*06499e6bSEddie James	  Therefore, it should not be measured into the TPM. In that case,
780*06499e6bSEddie James	  disable the measurement here.
781*06499e6bSEddie James
782*06499e6bSEddie James	config MEASURE_IGNORE_LOG
783*06499e6bSEddie James	bool "Ignore the existing event log"
784*06499e6bSEddie James	default n
785*06499e6bSEddie James	help
786*06499e6bSEddie James	  On platforms that use an event log memory region that persists
787*06499e6bSEddie James	  through system resets and are the first stage bootloader, then
788*06499e6bSEddie James	  this option should be enabled to ignore any existing data in the
789*06499e6bSEddie James	  event log memory region.
790*06499e6bSEddie Jamesendif # MEASURED_BOOT
791*06499e6bSEddie James
792d70f919eSSimon Glassconfig HASH
793d70f919eSSimon Glass	bool # "Support hashing API (SHA1, SHA256, etc.)"
794d70f919eSSimon Glass	help
795d70f919eSSimon Glass	  This provides a way to hash data in memory using various supported
796d70f919eSSimon Glass	  algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
797d70f919eSSimon Glass	  and the algorithms it supports are defined in common/hash.c. See
798d70f919eSSimon Glass	  also CMD_HASH for command-line access.
799d70f919eSSimon Glass
800b0aa74a2SIgor Opaniukconfig AVB_VERIFY
801b0aa74a2SIgor Opaniuk	bool "Build Android Verified Boot operations"
802b0aa74a2SIgor Opaniuk	depends on LIBAVB && FASTBOOT
80387c814d4SEugeniu Rosca	depends on PARTITION_UUIDS
804b0aa74a2SIgor Opaniuk	help
805b0aa74a2SIgor Opaniuk	  This option enables compilation of bootloader-dependent operations,
806b0aa74a2SIgor Opaniuk	  used by Android Verified Boot 2.0 library (libavb). Includes:
807b0aa74a2SIgor Opaniuk	    * Helpers to process strings in order to build OS bootargs.
808b0aa74a2SIgor Opaniuk	    * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
809b0aa74a2SIgor Opaniuk	    * Helpers to alloc/init/free avb ops.
810b0aa74a2SIgor Opaniuk
811c0126bd8SSimon Glassconfig SPL_HASH
812c0126bd8SSimon Glass	bool # "Support hashing API (SHA1, SHA256, etc.)"
813c0126bd8SSimon Glass	help
814c0126bd8SSimon Glass	  This provides a way to hash data in memory using various supported
815c0126bd8SSimon Glass	  algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
816c0126bd8SSimon Glass	  and the algorithms it supports are defined in common/hash.c. See
817c0126bd8SSimon Glass	  also CMD_HASH for command-line access.
818c0126bd8SSimon Glass
819c0126bd8SSimon Glassconfig TPL_HASH
820c0126bd8SSimon Glass	bool # "Support hashing API (SHA1, SHA256, etc.)"
821c0126bd8SSimon Glass	help
822c0126bd8SSimon Glass	  This provides a way to hash data in memory using various supported
823c0126bd8SSimon Glass	  algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
824c0126bd8SSimon Glass	  and the algorithms it supports are defined in common/hash.c. See
825c0126bd8SSimon Glass	  also CMD_HASH for command-line access.
826c0126bd8SSimon Glass
827d70f919eSSimon Glassendmenu
828d70f919eSSimon Glass
829b254c529SMarek Vasutmenu "Update support"
830b254c529SMarek Vasut
831b254c529SMarek Vasutconfig UPDATE_TFTP
832b254c529SMarek Vasut	bool "Auto-update using fitImage via TFTP"
833b254c529SMarek Vasut	depends on FIT
834b254c529SMarek Vasut	help
835b254c529SMarek Vasut	  This option allows performing update of NOR with data in fitImage
836b254c529SMarek Vasut	  sent via TFTP boot.
837b254c529SMarek Vasut
838b254c529SMarek Vasutconfig UPDATE_TFTP_CNT_MAX
839b254c529SMarek Vasut	int "The number of connection retries during auto-update"
840b254c529SMarek Vasut	default 0
841b254c529SMarek Vasut	depends on UPDATE_TFTP
842b254c529SMarek Vasut
843b254c529SMarek Vasutconfig UPDATE_TFTP_MSEC_MAX
844b254c529SMarek Vasut	int "Delay in mSec to wait for the TFTP server during auto-update"
845b254c529SMarek Vasut	default 100
846b254c529SMarek Vasut	depends on UPDATE_TFTP
847b254c529SMarek Vasut
848b254c529SMarek Vasutendmenu
849b254c529SMarek Vasut
8509f407d4eSSimon Glassmenu "Blob list"
8519f407d4eSSimon Glass
8529f407d4eSSimon Glassconfig BLOBLIST
8539f407d4eSSimon Glass	bool "Support for a bloblist"
8549f407d4eSSimon Glass	help
8559f407d4eSSimon Glass	  This enables support for a bloblist in U-Boot, which can be passed
8569f407d4eSSimon Glass	  from TPL to SPL to U-Boot proper (and potentially to Linux). The
8579f407d4eSSimon Glass	  blob list supports multiple binary blobs of data, each with a tag,
8589f407d4eSSimon Glass	  so that different U-Boot components can store data which can survive
8599f407d4eSSimon Glass	  through to the next stage of the boot.
8609f407d4eSSimon Glass
8619f407d4eSSimon Glassconfig SPL_BLOBLIST
8629f407d4eSSimon Glass	bool "Support for a bloblist in SPL"
8639f407d4eSSimon Glass	depends on BLOBLIST
8649f407d4eSSimon Glass	default y if SPL
8659f407d4eSSimon Glass	help
8669f407d4eSSimon Glass	  This enables a bloblist in SPL. If this is the first part of U-Boot
8679f407d4eSSimon Glass	  to run, then the bloblist is set up in SPL and passed to U-Boot
8689f407d4eSSimon Glass	  proper. If TPL also has a bloblist, then SPL uses the one from there.
8699f407d4eSSimon Glass
8709f407d4eSSimon Glassconfig TPL_BLOBLIST
8719f407d4eSSimon Glass	bool "Support for a bloblist in TPL"
8729f407d4eSSimon Glass	depends on BLOBLIST
8739f407d4eSSimon Glass	default y if TPL
8749f407d4eSSimon Glass	help
8759f407d4eSSimon Glass	  This enables a bloblist in TPL. The bloblist is set up in TPL and
8769f407d4eSSimon Glass	  passed to SPL and U-Boot proper.
8779f407d4eSSimon Glass
8789f407d4eSSimon Glassconfig BLOBLIST_SIZE
8799f407d4eSSimon Glass	hex "Size of bloblist"
8809f407d4eSSimon Glass	depends on BLOBLIST
8819f407d4eSSimon Glass	default 0x400
8829f407d4eSSimon Glass	help
8839f407d4eSSimon Glass	  Sets the size of the bloblist in bytes. This must include all
8849f407d4eSSimon Glass	  overhead (alignment, bloblist header, record header). The bloblist
8859f407d4eSSimon Glass	  is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
8869f407d4eSSimon Glass	  proper), and this sane bloblist is used for subsequent stages.
8879f407d4eSSimon Glass
8889f407d4eSSimon Glassconfig BLOBLIST_ADDR
8899f407d4eSSimon Glass	hex "Address of bloblist"
8909f407d4eSSimon Glass	depends on BLOBLIST
8919f407d4eSSimon Glass	default 0xe000 if SANDBOX
8929f407d4eSSimon Glass	help
8939f407d4eSSimon Glass	  Sets the address of the bloblist, set up by the first part of U-Boot
8949f407d4eSSimon Glass	  which runs. Subsequent U-Boot stages typically use the same address.
8959f407d4eSSimon Glass
8969f407d4eSSimon Glassendmenu
8979f407d4eSSimon Glass
898c2ae7d82SSimon Glasssource "common/spl/Kconfig"
899