xref: /OK3568_Linux_fs/u-boot/common/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunmenu "Boot timing"
2*4882a593Smuzhiyun
3*4882a593Smuzhiyunconfig BOOTSTAGE
4*4882a593Smuzhiyun	bool "Boot timing and reporting"
5*4882a593Smuzhiyun	help
6*4882a593Smuzhiyun	  Enable recording of boot time while booting. To use it, insert
7*4882a593Smuzhiyun	  calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
8*4882a593Smuzhiyun	  bootstage.h. Only a single entry is recorded for each ID. You can
9*4882a593Smuzhiyun	  give the entry a name with bootstage_mark_name(). You can also
10*4882a593Smuzhiyun	  record elapsed time in a particular stage using bootstage_start()
11*4882a593Smuzhiyun	  before starting and bootstage_accum() when finished. Bootstage will
12*4882a593Smuzhiyun	  add up all the accumulated time and report it.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun	  Normally, IDs are defined in bootstage.h but a small number of
15*4882a593Smuzhiyun	  additional 'user' IDs can be used by passing BOOTSTAGE_ID_ALLOC
16*4882a593Smuzhiyun	  as the ID.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun	  Calls to show_boot_progress() will also result in log entries but
19*4882a593Smuzhiyun	  these will not have names.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunconfig SPL_BOOTSTAGE
22*4882a593Smuzhiyun	bool "Boot timing and reported in SPL"
23*4882a593Smuzhiyun	depends on BOOTSTAGE
24*4882a593Smuzhiyun	help
25*4882a593Smuzhiyun	  Enable recording of boot time in SPL. To make this visible to U-Boot
26*4882a593Smuzhiyun	  proper, enable BOOTSTAGE_STASH as well. This will stash the timing
27*4882a593Smuzhiyun	  information when SPL finishes and load it when U-Boot proper starts
28*4882a593Smuzhiyun	  up.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunconfig BOOTSTAGE_REPORT
31*4882a593Smuzhiyun	bool "Display a detailed boot timing report before booting the OS"
32*4882a593Smuzhiyun	depends on BOOTSTAGE
33*4882a593Smuzhiyun	help
34*4882a593Smuzhiyun	  Enable output of a boot time report just before the OS is booted.
35*4882a593Smuzhiyun	  This shows how long it took U-Boot to go through each stage of the
36*4882a593Smuzhiyun	  boot process. The report looks something like this:
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun		Timer summary in microseconds:
39*4882a593Smuzhiyun		       Mark    Elapsed  Stage
40*4882a593Smuzhiyun			  0          0  reset
41*4882a593Smuzhiyun		  3,575,678  3,575,678  board_init_f start
42*4882a593Smuzhiyun		  3,575,695         17  arch_cpu_init A9
43*4882a593Smuzhiyun		  3,575,777         82  arch_cpu_init done
44*4882a593Smuzhiyun		  3,659,598     83,821  board_init_r start
45*4882a593Smuzhiyun		  3,910,375    250,777  main_loop
46*4882a593Smuzhiyun		 29,916,167 26,005,792  bootm_start
47*4882a593Smuzhiyun		 30,361,327    445,160  start_kernel
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunconfig BOOTSTAGE_USER_COUNT
50*4882a593Smuzhiyun	int "Number of boot ID numbers available for user use"
51*4882a593Smuzhiyun	default 20
52*4882a593Smuzhiyun	help
53*4882a593Smuzhiyun	  This is the number of available user bootstage records.
54*4882a593Smuzhiyun	  Each time you call bootstage_mark(BOOTSTAGE_ID_ALLOC, ...)
55*4882a593Smuzhiyun	  a new ID will be allocated from this stash. If you exceed
56*4882a593Smuzhiyun	  the limit, recording will stop.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunconfig BOOTSTAGE_RECORD_COUNT
59*4882a593Smuzhiyun	int "Number of boot stage records to store"
60*4882a593Smuzhiyun	default 30
61*4882a593Smuzhiyun	help
62*4882a593Smuzhiyun	  This is the size of the bootstage record list and is the maximum
63*4882a593Smuzhiyun	  number of bootstage records that can be recorded.
64*4882a593Smuzhiyun
65*4882a593Smuzhiyunconfig BOOTSTAGE_FDT
66*4882a593Smuzhiyun	bool "Store boot timing information in the OS device tree"
67*4882a593Smuzhiyun	depends on BOOTSTAGE
68*4882a593Smuzhiyun	help
69*4882a593Smuzhiyun	  Stash the bootstage information in the FDT. A root 'bootstage'
70*4882a593Smuzhiyun	  node is created with each bootstage id as a child. Each child
71*4882a593Smuzhiyun	  has a 'name' property and either 'mark' containing the
72*4882a593Smuzhiyun	  mark time in microseconds, or 'accum' containing the
73*4882a593Smuzhiyun	  accumulated time for that bootstage id in microseconds.
74*4882a593Smuzhiyun	  For example:
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun		bootstage {
77*4882a593Smuzhiyun			154 {
78*4882a593Smuzhiyun				name = "board_init_f";
79*4882a593Smuzhiyun				mark = <3575678>;
80*4882a593Smuzhiyun			};
81*4882a593Smuzhiyun			170 {
82*4882a593Smuzhiyun				name = "lcd";
83*4882a593Smuzhiyun				accum = <33482>;
84*4882a593Smuzhiyun			};
85*4882a593Smuzhiyun		};
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun	  Code in the Linux kernel can find this in /proc/devicetree.
88*4882a593Smuzhiyun
89*4882a593Smuzhiyunconfig BOOTSTAGE_STASH
90*4882a593Smuzhiyun	bool "Stash the boot timing information in memory before booting OS"
91*4882a593Smuzhiyun	depends on BOOTSTAGE
92*4882a593Smuzhiyun	help
93*4882a593Smuzhiyun	  Some OSes do not support device tree. Bootstage can instead write
94*4882a593Smuzhiyun	  the boot timing information in a binary format at a given address.
95*4882a593Smuzhiyun	  This happens through a call to bootstage_stash(), typically in
96*4882a593Smuzhiyun	  the CPU's cleanup_before_linux() function. You can use the
97*4882a593Smuzhiyun	  'bootstage stash' and 'bootstage unstash' commands to do this on
98*4882a593Smuzhiyun	  the command line.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyunconfig BOOTSTAGE_STASH_ADDR
101*4882a593Smuzhiyun	hex "Address to stash boot timing information"
102*4882a593Smuzhiyun	default 0
103*4882a593Smuzhiyun	help
104*4882a593Smuzhiyun	  Provide an address which will not be overwritten by the OS when it
105*4882a593Smuzhiyun	  starts, so that it can read this information when ready.
106*4882a593Smuzhiyun
107*4882a593Smuzhiyunconfig BOOTSTAGE_STASH_SIZE
108*4882a593Smuzhiyun	hex "Size of boot timing stash region"
109*4882a593Smuzhiyun	default 0x1000
110*4882a593Smuzhiyun	help
111*4882a593Smuzhiyun	  This should be large enough to hold the bootstage stash. A value of
112*4882a593Smuzhiyun	  4096 (4KiB) is normally plenty.
113*4882a593Smuzhiyun
114*4882a593Smuzhiyunconfig BOOTSTAGE_PRINTF_TIMESTAMP
115*4882a593Smuzhiyun	bool "Support printf timestamp"
116*4882a593Smuzhiyun	help
117*4882a593Smuzhiyun	  Enabling this will support printf timestamp.
118*4882a593Smuzhiyunendmenu
119*4882a593Smuzhiyun
120*4882a593Smuzhiyunmenu "Boot media"
121*4882a593Smuzhiyun
122*4882a593Smuzhiyunconfig NOR_BOOT
123*4882a593Smuzhiyun	bool "Support for booting from NOR flash"
124*4882a593Smuzhiyun	depends on NOR
125*4882a593Smuzhiyun	help
126*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
127*4882a593Smuzhiyun	  booted via NOR.  In this case we will enable certain pinmux early
128*4882a593Smuzhiyun	  as the ROM only partially sets up pinmux.  We also default to using
129*4882a593Smuzhiyun	  NOR for environment.
130*4882a593Smuzhiyun
131*4882a593Smuzhiyunconfig NAND_BOOT
132*4882a593Smuzhiyun	bool "Support for booting from NAND flash"
133*4882a593Smuzhiyun	default n
134*4882a593Smuzhiyun	help
135*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
136*4882a593Smuzhiyun	  booted via NAND flash. This is not a must, some SoCs need this,
137*4882a593Smuzhiyun	  some not.
138*4882a593Smuzhiyun
139*4882a593Smuzhiyunconfig ONENAND_BOOT
140*4882a593Smuzhiyun	bool "Support for booting from ONENAND"
141*4882a593Smuzhiyun	default n
142*4882a593Smuzhiyun	help
143*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
144*4882a593Smuzhiyun	  booted via ONENAND. This is not a must, some SoCs need this,
145*4882a593Smuzhiyun	  some not.
146*4882a593Smuzhiyun
147*4882a593Smuzhiyunconfig QSPI_BOOT
148*4882a593Smuzhiyun	bool "Support for booting from QSPI flash"
149*4882a593Smuzhiyun	default n
150*4882a593Smuzhiyun	help
151*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
152*4882a593Smuzhiyun	  booted via QSPI flash. This is not a must, some SoCs need this,
153*4882a593Smuzhiyun	  some not.
154*4882a593Smuzhiyun
155*4882a593Smuzhiyunconfig SATA_BOOT
156*4882a593Smuzhiyun	bool "Support for booting from SATA"
157*4882a593Smuzhiyun	default n
158*4882a593Smuzhiyun	help
159*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
160*4882a593Smuzhiyun	  booted via SATA. This is not a must, some SoCs need this,
161*4882a593Smuzhiyun	  some not.
162*4882a593Smuzhiyun
163*4882a593Smuzhiyunconfig SD_BOOT
164*4882a593Smuzhiyun	bool "Support for booting from SD/EMMC"
165*4882a593Smuzhiyun	default n
166*4882a593Smuzhiyun	help
167*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
168*4882a593Smuzhiyun	  booted via SD/EMMC. This is not a must, some SoCs need this,
169*4882a593Smuzhiyun	  some not.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyunconfig SPI_BOOT
172*4882a593Smuzhiyun	bool "Support for booting from SPI flash"
173*4882a593Smuzhiyun	default n
174*4882a593Smuzhiyun	help
175*4882a593Smuzhiyun	  Enabling this will make a U-Boot binary that is capable of being
176*4882a593Smuzhiyun	  booted via SPI flash. This is not a must, some SoCs need this,
177*4882a593Smuzhiyun	  some not.
178*4882a593Smuzhiyun
179*4882a593Smuzhiyunendmenu
180*4882a593Smuzhiyun
181*4882a593Smuzhiyunconfig PASS_DEVICE_SERIAL_BY_FDT
182*4882a593Smuzhiyun	bool "Pass the device serial number to kernel through devicetree"
183*4882a593Smuzhiyun	default y
184*4882a593Smuzhiyun	help
185*4882a593Smuzhiyun	  Enabling this will pass a device serial number to kernel by devicetree
186*4882a593Smuzhiyun	  "serial-number" properties.
187*4882a593Smuzhiyun
188*4882a593Smuzhiyunconfig BOOTDELAY
189*4882a593Smuzhiyun	int "delay in seconds before automatically booting"
190*4882a593Smuzhiyun	default 2
191*4882a593Smuzhiyun	depends on AUTOBOOT
192*4882a593Smuzhiyun	help
193*4882a593Smuzhiyun	  Delay before automatically running bootcmd;
194*4882a593Smuzhiyun	  set to 0 to autoboot with no delay, but you can stop it by key input.
195*4882a593Smuzhiyun	  set to -1 to disable autoboot.
196*4882a593Smuzhiyun	  set to -2 to autoboot with no delay and not check for abort
197*4882a593Smuzhiyun
198*4882a593Smuzhiyun	  See doc/README.autoboot for details.
199*4882a593Smuzhiyun
200*4882a593Smuzhiyunconfig USE_BOOTARGS
201*4882a593Smuzhiyun	bool "Enable boot arguments"
202*4882a593Smuzhiyun	help
203*4882a593Smuzhiyun	  Provide boot arguments to bootm command. Boot arguments are specified
204*4882a593Smuzhiyun	  in CONFIG_BOOTARGS option. Enable this option to be able to specify
205*4882a593Smuzhiyun	  CONFIG_BOOTARGS string. If this option is disabled, CONFIG_BOOTARGS
206*4882a593Smuzhiyun	  will be undefined and won't take any space in U-Boot image.
207*4882a593Smuzhiyun
208*4882a593Smuzhiyunconfig BOOTARGS
209*4882a593Smuzhiyun	string "Boot arguments"
210*4882a593Smuzhiyun	depends on USE_BOOTARGS
211*4882a593Smuzhiyun	help
212*4882a593Smuzhiyun	  This can be used to pass arguments to the bootm command. The value of
213*4882a593Smuzhiyun	  CONFIG_BOOTARGS goes into the environment value "bootargs". Note that
214*4882a593Smuzhiyun	  this value will also override the "chosen" node in FDT blob.
215*4882a593Smuzhiyun
216*4882a593Smuzhiyunconfig IO_TRACE
217*4882a593Smuzhiyun	bool "Enable iotrace"
218*4882a593Smuzhiyun	help
219*4882a593Smuzhiyun	  This enable iotrace feature.
220*4882a593Smuzhiyun
221*4882a593Smuzhiyunmenu "Console"
222*4882a593Smuzhiyun
223*4882a593Smuzhiyunconfig MENU
224*4882a593Smuzhiyun	bool
225*4882a593Smuzhiyun	help
226*4882a593Smuzhiyun	  This is the library functionality to provide a text-based menu of
227*4882a593Smuzhiyun	  choices for the user to make choices with.
228*4882a593Smuzhiyun
229*4882a593Smuzhiyunconfig CONSOLE_RECORD
230*4882a593Smuzhiyun	bool "Console recording"
231*4882a593Smuzhiyun	help
232*4882a593Smuzhiyun	  This provides a way to record console output (and provide console
233*4882a593Smuzhiyun	  input) through circular buffers. This is mostly useful for testing.
234*4882a593Smuzhiyun	  Console output is recorded even when the console is silent.
235*4882a593Smuzhiyun	  To enable console recording, call console_record_reset_enable()
236*4882a593Smuzhiyun	  from your code.
237*4882a593Smuzhiyun
238*4882a593Smuzhiyunconfig CONSOLE_RECORD_OUT_SIZE
239*4882a593Smuzhiyun	hex "Output buffer size"
240*4882a593Smuzhiyun	depends on CONSOLE_RECORD
241*4882a593Smuzhiyun	default 0x400 if CONSOLE_RECORD && !ARCH_ROCKCHIP
242*4882a593Smuzhiyun	default 0x2000 if CONSOLE_RECORD && ARCH_ROCKCHIP
243*4882a593Smuzhiyun	help
244*4882a593Smuzhiyun	  Set the size of the console output buffer. When this fills up, no
245*4882a593Smuzhiyun	  more data will be recorded until some is removed. The buffer is
246*4882a593Smuzhiyun	  allocated immediately after the malloc() region is ready.
247*4882a593Smuzhiyun
248*4882a593Smuzhiyunconfig CONSOLE_RECORD_IN_SIZE
249*4882a593Smuzhiyun	hex "Input buffer size"
250*4882a593Smuzhiyun	depends on CONSOLE_RECORD
251*4882a593Smuzhiyun	default 0x100 if CONSOLE_RECORD
252*4882a593Smuzhiyun	help
253*4882a593Smuzhiyun	  Set the size of the console input buffer. When this contains data,
254*4882a593Smuzhiyun	  tstc() and getc() will use this in preference to real device input.
255*4882a593Smuzhiyun	  The buffer is allocated immediately after the malloc() region is
256*4882a593Smuzhiyun	  ready.
257*4882a593Smuzhiyun
258*4882a593Smuzhiyunconfig CONSOLE_DISABLE_CLI
259*4882a593Smuzhiyun	bool "disable ctrlc"
260*4882a593Smuzhiyun	default n
261*4882a593Smuzhiyun	help
262*4882a593Smuzhiyun	  This disable CLI interactive in verified-boot.
263*4882a593Smuzhiyun
264*4882a593Smuzhiyunconfig DISABLE_CONSOLE
265*4882a593Smuzhiyun	bool "disable console in & out"
266*4882a593Smuzhiyun	help
267*4882a593Smuzhiyun	 This disable console in & out.
268*4882a593Smuzhiyun
269*4882a593Smuzhiyunconfig IDENT_STRING
270*4882a593Smuzhiyun	string "Board specific string to be added to uboot version string"
271*4882a593Smuzhiyun	help
272*4882a593Smuzhiyun	  This options adds the board specific name to u-boot version.
273*4882a593Smuzhiyun
274*4882a593Smuzhiyunconfig LOGLEVEL
275*4882a593Smuzhiyun	int "loglevel"
276*4882a593Smuzhiyun	default 4
277*4882a593Smuzhiyun	range 0 8
278*4882a593Smuzhiyun	help
279*4882a593Smuzhiyun	  All Messages with a loglevel smaller than the console loglevel will
280*4882a593Smuzhiyun	  be compiled in. The loglevels are defined as follows:
281*4882a593Smuzhiyun
282*4882a593Smuzhiyun	  0 (KERN_EMERG)          system is unusable
283*4882a593Smuzhiyun	  1 (KERN_ALERT)          action must be taken immediately
284*4882a593Smuzhiyun	  2 (KERN_CRIT)           critical conditions
285*4882a593Smuzhiyun	  3 (KERN_ERR)            error conditions
286*4882a593Smuzhiyun	  4 (KERN_WARNING)        warning conditions
287*4882a593Smuzhiyun	  5 (KERN_NOTICE)         normal but significant condition
288*4882a593Smuzhiyun	  6 (KERN_INFO)           informational
289*4882a593Smuzhiyun	  7 (KERN_DEBUG)          debug-level messages
290*4882a593Smuzhiyun
291*4882a593Smuzhiyunconfig SPL_LOGLEVEL
292*4882a593Smuzhiyun	int
293*4882a593Smuzhiyun	default LOGLEVEL
294*4882a593Smuzhiyun
295*4882a593Smuzhiyunconfig SILENT_CONSOLE
296*4882a593Smuzhiyun	bool "Support a silent console"
297*4882a593Smuzhiyun	help
298*4882a593Smuzhiyun	  This option allows the console to be silenced, meaning that no
299*4882a593Smuzhiyun	  output will appear on the console devices. This is controlled by
300*4882a593Smuzhiyun	  setting the environment vaariable 'silent' to a non-empty value.
301*4882a593Smuzhiyun	  Note this also silences the console when booting Linux.
302*4882a593Smuzhiyun
303*4882a593Smuzhiyun	  When the console is set up, the variable is checked, and the
304*4882a593Smuzhiyun	  GD_FLG_SILENT flag is set. Changing the environment variable later
305*4882a593Smuzhiyun	  will update the flag.
306*4882a593Smuzhiyun
307*4882a593Smuzhiyunconfig SILENT_U_BOOT_ONLY
308*4882a593Smuzhiyun	bool "Only silence the U-Boot console"
309*4882a593Smuzhiyun	depends on SILENT_CONSOLE
310*4882a593Smuzhiyun	help
311*4882a593Smuzhiyun	  Normally when the U-Boot console is silenced, Linux's console is
312*4882a593Smuzhiyun	  also silenced (assuming the board boots into Linux). This option
313*4882a593Smuzhiyun	  allows the linux console to operate normally, even if U-Boot's
314*4882a593Smuzhiyun	  is silenced.
315*4882a593Smuzhiyun
316*4882a593Smuzhiyunconfig SILENT_CONSOLE_UPDATE_ON_SET
317*4882a593Smuzhiyun	bool "Changes to the 'silent' environment variable update immediately"
318*4882a593Smuzhiyun	depends on SILENT_CONSOLE
319*4882a593Smuzhiyun	default y if SILENT_CONSOLE
320*4882a593Smuzhiyun	help
321*4882a593Smuzhiyun	  When the 'silent' environment variable is changed, update the
322*4882a593Smuzhiyun	  console silence flag immediately. This allows 'setenv' to be used
323*4882a593Smuzhiyun	  to silence or un-silence the console.
324*4882a593Smuzhiyun
325*4882a593Smuzhiyun	  The effect is that any change to the variable will affect the
326*4882a593Smuzhiyun	  GD_FLG_SILENT flag.
327*4882a593Smuzhiyun
328*4882a593Smuzhiyunconfig SILENT_CONSOLE_UPDATE_ON_RELOC
329*4882a593Smuzhiyun	bool "Allow flags to take effect on relocation"
330*4882a593Smuzhiyun	depends on SILENT_CONSOLE
331*4882a593Smuzhiyun	help
332*4882a593Smuzhiyun	  In some cases the environment is not available until relocation
333*4882a593Smuzhiyun	  (e.g. NAND). This option makes the value of the 'silent'
334*4882a593Smuzhiyun	  environment variable take effect at relocation.
335*4882a593Smuzhiyun
336*4882a593Smuzhiyunconfig PRE_CONSOLE_BUFFER
337*4882a593Smuzhiyun	bool "Buffer characters before the console is available"
338*4882a593Smuzhiyun	help
339*4882a593Smuzhiyun	  Prior to the console being initialised (i.e. serial UART
340*4882a593Smuzhiyun	  initialised etc) all console output is silently discarded.
341*4882a593Smuzhiyun	  Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to
342*4882a593Smuzhiyun	  buffer any console messages prior to the console being
343*4882a593Smuzhiyun	  initialised to a buffer. The buffer is a circular buffer, so
344*4882a593Smuzhiyun	  if it overflows, earlier output is discarded.
345*4882a593Smuzhiyun
346*4882a593Smuzhiyun	  Note that this is not currently supported in SPL. It would be
347*4882a593Smuzhiyun	  useful to be able to share the pre-console buffer with SPL.
348*4882a593Smuzhiyun
349*4882a593Smuzhiyunconfig PRE_CON_BUF_SZ
350*4882a593Smuzhiyun	int "Sets the size of the pre-console buffer"
351*4882a593Smuzhiyun	depends on PRE_CONSOLE_BUFFER
352*4882a593Smuzhiyun	default 4096
353*4882a593Smuzhiyun	help
354*4882a593Smuzhiyun	  The size of the pre-console buffer affects how much console output
355*4882a593Smuzhiyun	  can be held before it overflows and starts discarding earlier
356*4882a593Smuzhiyun	  output. Normally there is very little output at this early stage,
357*4882a593Smuzhiyun	  unless debugging is enabled, so allow enough for ~10 lines of
358*4882a593Smuzhiyun	  text.
359*4882a593Smuzhiyun
360*4882a593Smuzhiyun	  This is a useful feature if you are using a video console and
361*4882a593Smuzhiyun	  want to see the full boot output on the console. Without this
362*4882a593Smuzhiyun	  option only the post-relocation output will be displayed.
363*4882a593Smuzhiyun
364*4882a593Smuzhiyunconfig PRE_CON_BUF_ADDR
365*4882a593Smuzhiyun	hex "Address of the pre-console buffer"
366*4882a593Smuzhiyun	depends on PRE_CONSOLE_BUFFER
367*4882a593Smuzhiyun	default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I
368*4882a593Smuzhiyun	default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I
369*4882a593Smuzhiyun	help
370*4882a593Smuzhiyun	  This sets the start address of the pre-console buffer. This must
371*4882a593Smuzhiyun	  be in available memory and is accessed before relocation and
372*4882a593Smuzhiyun	  possibly before DRAM is set up. Therefore choose an address
373*4882a593Smuzhiyun	  carefully.
374*4882a593Smuzhiyun
375*4882a593Smuzhiyun	  We should consider removing this option and allocating the memory
376*4882a593Smuzhiyun	  in board_init_f_init_reserve() instead.
377*4882a593Smuzhiyun
378*4882a593Smuzhiyunconfig CONSOLE_MUX
379*4882a593Smuzhiyun	bool "Enable console multiplexing"
380*4882a593Smuzhiyun	default y if DM_VIDEO || VIDEO || LCD
381*4882a593Smuzhiyun	help
382*4882a593Smuzhiyun	  This allows multiple devices to be used for each console 'file'.
383*4882a593Smuzhiyun	  For example, stdout can be set to go to serial and video.
384*4882a593Smuzhiyun	  Similarly, stdin can be set to come from serial and keyboard.
385*4882a593Smuzhiyun	  Input can be provided from either source. Console multiplexing
386*4882a593Smuzhiyun	  adds a small amount of size to U-Boot.  Changes to the environment
387*4882a593Smuzhiyun	  variables stdout, stdin and stderr will take effect immediately.
388*4882a593Smuzhiyun
389*4882a593Smuzhiyunconfig SYS_CONSOLE_IS_IN_ENV
390*4882a593Smuzhiyun	bool "Select console devices from the environment"
391*4882a593Smuzhiyun	default y if CONSOLE_MUX
392*4882a593Smuzhiyun	help
393*4882a593Smuzhiyun	  This allows multiple input/output devices to be set at boot time.
394*4882a593Smuzhiyun	  For example, if stdout is set to "serial,video" then output will
395*4882a593Smuzhiyun	  be sent to both the serial and video devices on boot. The
396*4882a593Smuzhiyun	  environment variables can be updated after boot to change the
397*4882a593Smuzhiyun	  input/output devices.
398*4882a593Smuzhiyun
399*4882a593Smuzhiyunconfig SYS_CONSOLE_OVERWRITE_ROUTINE
400*4882a593Smuzhiyun	bool "Allow board control over console overwriting"
401*4882a593Smuzhiyun	help
402*4882a593Smuzhiyun	  If this is enabled, and the board-specific function
403*4882a593Smuzhiyun	  overwrite_console() returns 1, the stdin, stderr and stdout are
404*4882a593Smuzhiyun	  switched to the serial port, else the settings in the environment
405*4882a593Smuzhiyun	  are used. If this is not enabled, the console will not be switched
406*4882a593Smuzhiyun	  to serial.
407*4882a593Smuzhiyun
408*4882a593Smuzhiyunconfig SYS_CONSOLE_ENV_OVERWRITE
409*4882a593Smuzhiyun	bool "Update environment variables during console init"
410*4882a593Smuzhiyun	help
411*4882a593Smuzhiyun	  The console environment variables (stdout, stdin, stderr) can be
412*4882a593Smuzhiyun	  used to determine the correct console devices on start-up. This
413*4882a593Smuzhiyun	  option writes the console devices to these variables on console
414*4882a593Smuzhiyun	  start-up (after relocation). This causes the environment to be
415*4882a593Smuzhiyun	  updated to match the console devices actually chosen.
416*4882a593Smuzhiyun
417*4882a593Smuzhiyunconfig SYS_CONSOLE_INFO_QUIET
418*4882a593Smuzhiyun	bool "Don't display the console devices on boot"
419*4882a593Smuzhiyun	help
420*4882a593Smuzhiyun	  Normally U-Boot displays the current settings for stdout, stdin
421*4882a593Smuzhiyun	  and stderr on boot when the post-relocation console is set up.
422*4882a593Smuzhiyun	  Enable this option to supress this output. It can be obtained by
423*4882a593Smuzhiyun	  calling stdio_print_current_devices() from board code.
424*4882a593Smuzhiyun
425*4882a593Smuzhiyunconfig SYS_STDIO_DEREGISTER
426*4882a593Smuzhiyun	bool "Allow deregistering stdio devices"
427*4882a593Smuzhiyun	default y if USB_KEYBOARD
428*4882a593Smuzhiyun	help
429*4882a593Smuzhiyun	  Generally there is no need to deregister stdio devices since they
430*4882a593Smuzhiyun	  are never deactivated. But if a stdio device is used which can be
431*4882a593Smuzhiyun	  removed (for example a USB keyboard) then this option can be
432*4882a593Smuzhiyun	  enabled to ensure this is handled correctly.
433*4882a593Smuzhiyun
434*4882a593Smuzhiyunendmenu
435*4882a593Smuzhiyun
436*4882a593Smuzhiyunmenu "Logging"
437*4882a593Smuzhiyun
438*4882a593Smuzhiyunconfig LOG
439*4882a593Smuzhiyun	bool "Enable logging support"
440*4882a593Smuzhiyun	help
441*4882a593Smuzhiyun	  This enables support for logging of status and debug messages. These
442*4882a593Smuzhiyun	  can be displayed on the console, recorded in a memory buffer, or
443*4882a593Smuzhiyun	  discarded if not needed. Logging supports various categories and
444*4882a593Smuzhiyun	  levels of severity.
445*4882a593Smuzhiyun
446*4882a593Smuzhiyunconfig SPL_LOG
447*4882a593Smuzhiyun	bool "Enable logging support in SPL"
448*4882a593Smuzhiyun	help
449*4882a593Smuzhiyun	  This enables support for logging of status and debug messages. These
450*4882a593Smuzhiyun	  can be displayed on the console, recorded in a memory buffer, or
451*4882a593Smuzhiyun	  discarded if not needed. Logging supports various categories and
452*4882a593Smuzhiyun	  levels of severity.
453*4882a593Smuzhiyun
454*4882a593Smuzhiyunconfig LOG_MAX_LEVEL
455*4882a593Smuzhiyun	int "Maximum log level to record"
456*4882a593Smuzhiyun	depends on LOG
457*4882a593Smuzhiyun	default 5
458*4882a593Smuzhiyun	help
459*4882a593Smuzhiyun	  This selects the maximum log level that will be recorded. Any value
460*4882a593Smuzhiyun	  higher than this will be ignored. If possible log statements below
461*4882a593Smuzhiyun	  this level will be discarded at build time. Levels:
462*4882a593Smuzhiyun
463*4882a593Smuzhiyun	    0 - panic
464*4882a593Smuzhiyun	    1 - critical
465*4882a593Smuzhiyun	    2 - error
466*4882a593Smuzhiyun	    3 - warning
467*4882a593Smuzhiyun	    4 - note
468*4882a593Smuzhiyun	    5 - info
469*4882a593Smuzhiyun	    6 - detail
470*4882a593Smuzhiyun	    7 - debug
471*4882a593Smuzhiyun
472*4882a593Smuzhiyunconfig SPL_LOG_MAX_LEVEL
473*4882a593Smuzhiyun	int "Maximum log level to record in SPL"
474*4882a593Smuzhiyun	depends on SPL_LOG
475*4882a593Smuzhiyun	default 3
476*4882a593Smuzhiyun	help
477*4882a593Smuzhiyun	  This selects the maximum log level that will be recorded. Any value
478*4882a593Smuzhiyun	  higher than this will be ignored. If possible log statements below
479*4882a593Smuzhiyun	  this level will be discarded at build time. Levels:
480*4882a593Smuzhiyun
481*4882a593Smuzhiyun	    0 - panic
482*4882a593Smuzhiyun	    1 - critical
483*4882a593Smuzhiyun	    2 - error
484*4882a593Smuzhiyun	    3 - warning
485*4882a593Smuzhiyun	    4 - note
486*4882a593Smuzhiyun	    5 - info
487*4882a593Smuzhiyun	    6 - detail
488*4882a593Smuzhiyun	    7 - debug
489*4882a593Smuzhiyun
490*4882a593Smuzhiyunconfig LOG_CONSOLE
491*4882a593Smuzhiyun	bool "Allow log output to the console"
492*4882a593Smuzhiyun	depends on LOG
493*4882a593Smuzhiyun	default y
494*4882a593Smuzhiyun	help
495*4882a593Smuzhiyun	  Enables a log driver which writes log records to the console.
496*4882a593Smuzhiyun	  Generally the console is the serial port or LCD display. Only the
497*4882a593Smuzhiyun	  log message is shown - other details like level, category, file and
498*4882a593Smuzhiyun	  line number are omitted.
499*4882a593Smuzhiyun
500*4882a593Smuzhiyunconfig LOG_SPL_CONSOLE
501*4882a593Smuzhiyun	bool "Allow log output to the console in SPL"
502*4882a593Smuzhiyun	depends on LOG_SPL
503*4882a593Smuzhiyun	default y
504*4882a593Smuzhiyun	help
505*4882a593Smuzhiyun	  Enables a log driver which writes log records to the console.
506*4882a593Smuzhiyun	  Generally the console is the serial port or LCD display. Only the
507*4882a593Smuzhiyun	  log message is shown - other details like level, category, file and
508*4882a593Smuzhiyun	  line number are omitted.
509*4882a593Smuzhiyun
510*4882a593Smuzhiyunconfig LOG_TEST
511*4882a593Smuzhiyun	bool "Provide a test for logging"
512*4882a593Smuzhiyun	depends on LOG
513*4882a593Smuzhiyun	default y if SANDBOX
514*4882a593Smuzhiyun	help
515*4882a593Smuzhiyun	  This enables a 'log test' command to test logging. It is normally
516*4882a593Smuzhiyun	  executed from a pytest and simply outputs logging information
517*4882a593Smuzhiyun	  in various different ways to test that the logging system works
518*4882a593Smuzhiyun	  correctly with varoius settings.
519*4882a593Smuzhiyun
520*4882a593Smuzhiyunendmenu
521*4882a593Smuzhiyun
522*4882a593Smuzhiyunconfig DEFAULT_FDT_FILE
523*4882a593Smuzhiyun	string "Default fdt file"
524*4882a593Smuzhiyun	help
525*4882a593Smuzhiyun	  This option is used to set the default fdt file to boot OS.
526*4882a593Smuzhiyun
527*4882a593Smuzhiyunconfig VERSION_VARIABLE
528*4882a593Smuzhiyun	bool "add U-Boot environment variable vers"
529*4882a593Smuzhiyun	default n
530*4882a593Smuzhiyun	help
531*4882a593Smuzhiyun	  If this variable is defined, an environment variable
532*4882a593Smuzhiyun	  named "ver" is created by U-Boot showing the U-Boot
533*4882a593Smuzhiyun	  version as printed by the "version" command.
534*4882a593Smuzhiyun	  Any change to this variable will be reverted at the
535*4882a593Smuzhiyun	  next reset.
536*4882a593Smuzhiyun
537*4882a593Smuzhiyunconfig BOARD_LATE_INIT
538*4882a593Smuzhiyun	bool
539*4882a593Smuzhiyun	help
540*4882a593Smuzhiyun	  Sometimes board require some initialization code that might
541*4882a593Smuzhiyun	  require once the actual init done, example saving board specific env,
542*4882a593Smuzhiyun	  boot-modes etc. which eventually done at late.
543*4882a593Smuzhiyun
544*4882a593Smuzhiyun	  So this config enable the late init code with the help of board_late_init
545*4882a593Smuzhiyun	  function which should defined on respective boards.
546*4882a593Smuzhiyun
547*4882a593Smuzhiyunconfig DISPLAY_CPUINFO
548*4882a593Smuzhiyun	bool "Display information about the CPU during start up"
549*4882a593Smuzhiyun	default y if ARM || NIOS2 || X86 || XTENSA
550*4882a593Smuzhiyun	help
551*4882a593Smuzhiyun	  Display information about the CPU that U-Boot is running on
552*4882a593Smuzhiyun	  when U-Boot starts up. The function print_cpuinfo() is called
553*4882a593Smuzhiyun	  to do this.
554*4882a593Smuzhiyun
555*4882a593Smuzhiyunconfig DISPLAY_BOARDINFO
556*4882a593Smuzhiyun	bool "Display information about the board during start up"
557*4882a593Smuzhiyun	default y if ARM || M68K || MIPS || PPC || SANDBOX || XTENSA
558*4882a593Smuzhiyun	help
559*4882a593Smuzhiyun	  Display information about the board that U-Boot is running on
560*4882a593Smuzhiyun	  when U-Boot starts up. The board function checkboard() is called
561*4882a593Smuzhiyun	  to do this.
562*4882a593Smuzhiyun
563*4882a593Smuzhiyunmenu "Start-up hooks"
564*4882a593Smuzhiyun
565*4882a593Smuzhiyunconfig ARCH_EARLY_INIT_R
566*4882a593Smuzhiyun	bool "Call arch-specific init soon after relocation"
567*4882a593Smuzhiyun	help
568*4882a593Smuzhiyun	  With this option U-Boot will call arch_early_init_r() soon after
569*4882a593Smuzhiyun	  relocation. Driver model is running by this point, and the cache
570*4882a593Smuzhiyun	  is on. Note that board_early_init_r() is called first, if
571*4882a593Smuzhiyun	  enabled. This can be used to set up architecture-specific devices.
572*4882a593Smuzhiyun
573*4882a593Smuzhiyunconfig ARCH_MISC_INIT
574*4882a593Smuzhiyun	bool "Call arch-specific init after relocation, when console is ready"
575*4882a593Smuzhiyun	help
576*4882a593Smuzhiyun	  With this option U-Boot will call arch_misc_init() after
577*4882a593Smuzhiyun	  relocation to allow miscellaneous arch-dependent initialisation
578*4882a593Smuzhiyun	  to be performed. This function should be defined by the board
579*4882a593Smuzhiyun	  and will be called after the console is set up, after relocaiton.
580*4882a593Smuzhiyun
581*4882a593Smuzhiyunconfig BOARD_EARLY_INIT_F
582*4882a593Smuzhiyun	bool "Call board-specific init before relocation"
583*4882a593Smuzhiyun	help
584*4882a593Smuzhiyun	  Some boards need to perform initialisation as soon as possible
585*4882a593Smuzhiyun	  after boot. With this option, U-Boot calls board_early_init_f()
586*4882a593Smuzhiyun	  after driver model is ready in the pre-relocation init sequence.
587*4882a593Smuzhiyun	  Note that the normal serial console is not yet set up, but the
588*4882a593Smuzhiyun	  debug UART will be available if enabled.
589*4882a593Smuzhiyun
590*4882a593Smuzhiyunconfig BOARD_EARLY_INIT_R
591*4882a593Smuzhiyun	bool "Call board-specific init after relocation"
592*4882a593Smuzhiyun	help
593*4882a593Smuzhiyun	  Some boards need to perform initialisation as directly after
594*4882a593Smuzhiyun	  relocation. With this option, U-Boot calls board_early_init_r()
595*4882a593Smuzhiyun	  in the post-relocation init sequence.
596*4882a593Smuzhiyun
597*4882a593Smuzhiyunendmenu
598*4882a593Smuzhiyun
599*4882a593Smuzhiyunmenu "Android features support"
600*4882a593Smuzhiyunconfig ANDROID_BOOTLOADER
601*4882a593Smuzhiyun	bool "Support for Android Bootloader boot flow"
602*4882a593Smuzhiyun	default n
603*4882a593Smuzhiyun	depends on ANDROID_BOOT_IMAGE
604*4882a593Smuzhiyun	help
605*4882a593Smuzhiyun	  If enabled, adds support to boot an Android device following the
606*4882a593Smuzhiyun	  Android Bootloader boot flow. This flow requires an Android Bootloader
607*4882a593Smuzhiyun	  to handle the Android Bootloader Message stored in the Boot Control
608*4882a593Smuzhiyun	  Block (BCB), normally in the "misc" partition of an Android device.
609*4882a593Smuzhiyun	  The BCB is used to determine the boot mode of the device (normal mode,
610*4882a593Smuzhiyun	  recovery mode or bootloader mode) and, if enabled, the slot to boot
611*4882a593Smuzhiyun	  from in devices with multiple boot slots (A/B devices).
612*4882a593Smuzhiyun
613*4882a593Smuzhiyunconfig ANDROID_AB
614*4882a593Smuzhiyun	bool "Support for Android A/B updates"
615*4882a593Smuzhiyun	default n
616*4882a593Smuzhiyun	help
617*4882a593Smuzhiyun	  If enabled, adds support for the new Android A/B update model. This
618*4882a593Smuzhiyun	  allows the bootloader to select which slot to boot from based on the
619*4882a593Smuzhiyun	  information provided by userspace via the Android boot_ctrl HAL. This
620*4882a593Smuzhiyun	  allows a bootloader to try a new version of the system but roll back
621*4882a593Smuzhiyun	  to previous version if the new one didn't boot all the way.
622*4882a593Smuzhiyun
623*4882a593Smuzhiyunconfig ANDROID_WRITE_KEYBOX
624*4882a593Smuzhiyun	bool "Support Write Keybox"
625*4882a593Smuzhiyun	default y
626*4882a593Smuzhiyun	depends on OPTEE_CLIENT
627*4882a593Smuzhiyun	help
628*4882a593Smuzhiyun	  This enable support write keybox to secure storage.
629*4882a593Smuzhiyun
630*4882a593Smuzhiyunconfig ANDROID_AVB
631*4882a593Smuzhiyun	bool"Support Android Verified Boot"
632*4882a593Smuzhiyun	default n
633*4882a593Smuzhiyun	help
634*4882a593Smuzhiyun	  If enabled, adds support the android verified boot. The avb get the
635*4882a593Smuzhiyun	  digital signature and key from vemeta. Then use the RSA2048 and sha256
636*4882a593Smuzhiyun	  to verify the boot images. The vbmeta must be matched with images,
637*4882a593Smuzhiyun	  if not, verify failed.
638*4882a593Smuzhiyun
639*4882a593Smuzhiyunconfig ANDROID_AVB_ROLLBACK_INDEX
640*4882a593Smuzhiyun	bool"Support Android Verified Boot Rollback Index"
641*4882a593Smuzhiyun	default n
642*4882a593Smuzhiyun	help
643*4882a593Smuzhiyun	  If enabled, support the android verified boot rollback index.
644*4882a593Smuzhiyun
645*4882a593Smuzhiyunconfig ANDROID_KEYMASTER_CA
646*4882a593Smuzhiyun	bool "Support Keymaster CA"
647*4882a593Smuzhiyun	default y
648*4882a593Smuzhiyun	depends on OPTEE_CLIENT
649*4882a593Smuzhiyun	help
650*4882a593Smuzhiyun	 This enable support read/write data in keymaster.
651*4882a593Smuzhiyun
652*4882a593Smuzhiyunconfig ANDROID_BOOT_IMAGE
653*4882a593Smuzhiyun	bool "Enable support for Android Boot Images"
654*4882a593Smuzhiyun	help
655*4882a593Smuzhiyun	  This enables support for booting images which use the Android
656*4882a593Smuzhiyun	  image format header.
657*4882a593Smuzhiyun
658*4882a593Smuzhiyunconfig ANDROID_BOOT_IMAGE_HASH
659*4882a593Smuzhiyun	bool "Enable support for Android image hash verify"
660*4882a593Smuzhiyun	depends on ANDROID_BOOT_IMAGE
661*4882a593Smuzhiyun	select SHA1 if !DM_CRYPTO
662*4882a593Smuzhiyun	help
663*4882a593Smuzhiyun	  This enables support for Android image hash verify, the mkbootimg always use
664*4882a593Smuzhiyun	  SHA1 for images.
665*4882a593Smuzhiyunendmenu
666*4882a593Smuzhiyun
667*4882a593Smuzhiyunconfig SKIP_RELOCATE_UBOOT
668*4882a593Smuzhiyun	bool "Skip U-Boot relocation"
669*4882a593Smuzhiyun	default y if !ARM64 && !ARM64_BOOT_AARCH32
670*4882a593Smuzhiyun	help
671*4882a593Smuzhiyun	  This enable support for skipping U-Boot relocation.
672*4882a593Smuzhiyun
673*4882a593Smuzhiyunmenu "Security support"
674*4882a593Smuzhiyun
675*4882a593Smuzhiyunconfig HASH
676*4882a593Smuzhiyun	bool # "Support hashing API (SHA1, SHA256, etc.)"
677*4882a593Smuzhiyun	help
678*4882a593Smuzhiyun	  This provides a way to hash data in memory using various supported
679*4882a593Smuzhiyun	  algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
680*4882a593Smuzhiyun	  and the algorithms it supports are defined in common/hash.c. See
681*4882a593Smuzhiyun	  also CMD_HASH for command-line access.
682*4882a593Smuzhiyun
683*4882a593Smuzhiyunendmenu
684*4882a593Smuzhiyun
685*4882a593Smuzhiyunmenu "MT support"
686*4882a593Smuzhiyun
687*4882a593Smuzhiyunconfig MP_BOOT
688*4882a593Smuzhiyun	bool "Support MT boot"
689*4882a593Smuzhiyun	default n
690*4882a593Smuzhiyun
691*4882a593Smuzhiyunconfig MP_BOOT_BOOTM
692*4882a593Smuzhiyun	bool "MT simple bootm image"
693*4882a593Smuzhiyun	depends on MP_BOOT
694*4882a593Smuzhiyun
695*4882a593Smuzhiyunendmenu
696*4882a593Smuzhiyun
697*4882a593Smuzhiyunsource "common/spl/Kconfig"
698*4882a593Smuzhiyunsource "common/usbplug/Kconfig"
699