xref: /openbmc/u-boot/common/Kconfig (revision 62e92077)
1menu "Command line interface"
2
3config HUSH_PARSER
4	bool "Use hush shell"
5	select SYS_HUSH_PARSER
6	help
7	  This option enables the "hush" shell (from Busybox) as command line
8	  interpreter, thus enabling powerful command line syntax like
9	  if...then...else...fi conditionals or `&&' and '||'
10	  constructs ("shell scripts").
11
12	  If disabled, you get the old, much simpler behaviour with a somewhat
13	  smaller memory footprint.
14
15config SYS_HUSH_PARSER
16	bool
17	help
18	  Backward compatibility.
19
20config SYS_PROMPT
21	string "Shell prompt"
22	default "=> "
23	help
24	  This string is displayed in the command line to the left of the
25	  cursor.
26
27menu "Autoboot options"
28
29config AUTOBOOT_KEYED
30	bool "Stop autobooting via specific input key / string"
31	default n
32	help
33	  This option enables stopping (aborting) of the automatic
34	  boot feature only by issuing a specific input key or
35	  string. If not enabled, any input key will abort the
36	  U-Boot automatic booting process and bring the device
37	  to the U-Boot prompt for user input.
38
39config AUTOBOOT_PROMPT
40	string "Autoboot stop prompt"
41	depends on AUTOBOOT_KEYED
42	default "Autoboot in %d seconds\\n"
43	help
44	  This string is displayed before the boot delay selected by
45	  CONFIG_BOOTDELAY starts. If it is not defined	there is no
46	  output indicating that autoboot is in progress.
47
48	  Note that this define is used as the (only) argument to a
49	  printf() call, so it may contain '%' format specifications,
50	  provided that it also includes, sepearated by commas exactly
51	  like in a printf statement, the required arguments. It is
52	  the responsibility of the user to select only such arguments
53	  that are valid in the given context.
54
55config AUTOBOOT_ENCRYPTION
56	bool "Enable encryption in autoboot stopping"
57	depends on AUTOBOOT_KEYED
58	default n
59
60config AUTOBOOT_DELAY_STR
61	string "Delay autobooting via specific input key / string"
62	depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
63	help
64	  This option delays the automatic boot feature by issuing
65	  a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR
66	  or the environment variable "bootdelaykey" is specified
67	  and this string is received from console input before
68	  autoboot starts booting, U-Boot gives a command prompt. The
69	  U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is
70	  used, otherwise it never times out.
71
72config AUTOBOOT_STOP_STR
73	string "Stop autobooting via specific input key / string"
74	depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
75	help
76	  This option enables stopping (aborting) of the automatic
77	  boot feature only by issuing a specific input key or
78	  string. If CONFIG_AUTOBOOT_STOP_STR or the environment
79	  variable "bootstopkey" is specified and this string is
80	  received from console input before autoboot starts booting,
81	  U-Boot gives a command prompt. The U-Boot prompt never
82	  times out, even if CONFIG_BOOT_RETRY_TIME is used.
83
84config AUTOBOOT_KEYED_CTRLC
85	bool "Enable Ctrl-C autoboot interruption"
86	depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
87	default n
88	help
89	  This option allows for the boot sequence to be interrupted
90	  by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey".
91	  Setting this variable	provides an escape sequence from the
92	  limited "password" strings.
93
94config AUTOBOOT_STOP_STR_SHA256
95	string "Stop autobooting via SHA256 encrypted password"
96	depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
97	help
98	  This option adds the feature to only stop the autobooting,
99	  and therefore boot into the U-Boot prompt, when the input
100	  string / password matches a values that is encypted via
101	  a SHA256 hash and saved in the environment.
102
103endmenu
104
105comment "Commands"
106
107menu "Info commands"
108
109config CMD_BDI
110	bool "bdinfo"
111	default y
112	help
113	  Print board info
114
115config CMD_CONSOLE
116	bool "coninfo"
117	default y
118	help
119	  Print console devices and information.
120
121config CMD_CPU
122	bool "cpu"
123	help
124	  Print information about available CPUs. This normally shows the
125	  number of CPUs, type (e.g. manufacturer, architecture, product or
126	  internal name) and clock frequency. Other information may be
127	  available depending on the CPU driver.
128
129config CMD_LICENSE
130	bool "license"
131	help
132	  Print GPL license text
133
134endmenu
135
136menu "Boot commands"
137
138config CMD_BOOTD
139	bool "bootd"
140	default y
141	help
142	  Run the command stored in the environment "bootcmd", i.e.
143	  "bootd" does the same thing as "run bootcmd".
144
145config CMD_BOOTM
146	bool "bootm"
147	default y
148	help
149	  Boot an application image from the memory.
150
151config CMD_ELF
152	bool "bootelf, bootvx"
153	default y
154	help
155	  Boot an ELF/vxWorks image from the memory.
156
157config CMD_GO
158	bool "go"
159	default y
160	help
161	  Start an application at a given address.
162
163config CMD_RUN
164	bool "run"
165	default y
166	help
167	  Run the command in the given environment variable.
168
169config CMD_IMI
170	bool "iminfo"
171	default y
172	help
173	  Print header information for application image.
174
175config CMD_IMLS
176	bool "imls"
177	default y
178	help
179	  List all images found in flash
180
181config CMD_XIMG
182	bool "imxtract"
183	default y
184	help
185	  Extract a part of a multi-image.
186
187endmenu
188
189menu "Environment commands"
190
191config CMD_EXPORTENV
192	bool "env export"
193	default y
194	help
195	  Export environments.
196
197config CMD_IMPORTENV
198	bool "env import"
199	default y
200	help
201	  Import environments.
202
203config CMD_EDITENV
204	bool "editenv"
205	default y
206	help
207	  Edit environment variable.
208
209config CMD_SAVEENV
210	bool "saveenv"
211	default y
212	help
213	  Save all environment variables into the compiled-in persistent
214	  storage.
215
216config CMD_ENV_EXISTS
217	bool "env exists"
218	default y
219	help
220	  Check if a variable is defined in the environment for use in
221	  shell scripting.
222
223endmenu
224
225menu "Memory commands"
226
227config CMD_MEMORY
228	bool "md, mm, nm, mw, cp, cmp, base, loop"
229	default y
230	help
231	  Memeory commands.
232	    md - memory display
233	    mm - memory modify (auto-incrementing address)
234	    nm - memory modify (constant address)
235	    mw - memory write (fill)
236	    cp - memory copy
237	    cmp - memory compare
238	    base - print or set address offset
239	    loop - initinite loop on address range
240
241config CMD_CRC32
242	bool "crc32"
243	default y
244	help
245	  Compute CRC32.
246
247config LOOPW
248	bool "loopw"
249	help
250	  Infinite write loop on address range
251
252config CMD_MEMTEST
253	bool "memtest"
254	help
255	  Simple RAM read/write test.
256
257config CMD_MX_CYCLIC
258	bool "mdc, mwc"
259	help
260	  mdc - memory display cyclic
261	  mwc - memory write cyclic
262
263config CMD_MEMINFO
264	bool "meminfo"
265	help
266	  Display memory information.
267
268endmenu
269
270menu "Device access commands"
271
272config CMD_DM
273	bool "dm - Access to driver model information"
274	depends on DM
275	default y
276	help
277	  Provides access to driver model data structures and information,
278	  such as a list of devices, list of uclasses and the state of each
279	  device (e.g. activated). This is not required for operation, but
280	  can be useful to see the state of driver model for debugging or
281	  interest.
282
283config CMD_DEMO
284	bool "demo - Demonstration commands for driver model"
285	depends on DM
286	help
287	  Provides a 'demo' command which can be used to play around with
288	  driver model. To use this properly you will need to enable one or
289	  both of the demo devices (DM_DEMO_SHAPE and DM_DEMO_SIMPLE).
290	  Otherwise you will always get an empty list of devices. The demo
291	  devices are defined in the sandbox device tree, so the easiest
292	  option is to use sandbox and pass the -d point to sandbox's
293	  u-boot.dtb file.
294
295config CMD_LOADB
296	bool "loadb"
297	default y
298	help
299	  Load a binary file over serial line.
300
301config CMD_LOADS
302	bool "loads"
303	default y
304	help
305	  Load an S-Record file over serial line
306
307config CMD_FLASH
308	bool "flinfo, erase, protect"
309	default y
310	help
311	  NOR flash support.
312	    flinfo - print FLASH memory information
313	    erase - FLASH memory
314	    protect - enable or disable FLASH write protection
315
316config CMD_ARMFLASH
317	depends on FLASH_CFI_DRIVER
318	bool "armflash"
319	help
320	  ARM Ltd reference designs flash partition access
321
322config CMD_NAND
323	bool "nand"
324	help
325	  NAND support.
326
327config CMD_SF
328	bool "sf"
329	help
330	  SPI Flash support
331
332config CMD_SPI
333	bool "sspi"
334	help
335	  SPI utility command.
336
337config CMD_I2C
338	bool "i2c"
339	help
340	  I2C support.
341
342config CMD_USB
343	bool "usb"
344	help
345	  USB support.
346
347config CMD_FPGA
348	bool "fpga"
349	default y
350	help
351	  FPGA support.
352
353config CMD_REMOTEPROC
354	bool "remoteproc"
355	depends on REMOTEPROC
356	help
357	  Support for Remote Processor control
358endmenu
359
360
361menu "Shell scripting commands"
362
363config CMD_ECHO
364	bool "echo"
365	default y
366	help
367	  Echo args to console
368
369config CMD_ITEST
370	bool "itest"
371	default y
372	help
373	  Return true/false on integer compare.
374
375config CMD_SOURCE
376	bool "source"
377	default y
378	help
379	  Run script from memory
380
381config CMD_SETEXPR
382	bool "setexpr"
383	default y
384	help
385	  Evaluate boolean and math expressions and store the result in an env
386	    variable.
387	  Also supports loading the value at a memory location into a variable.
388	  If CONFIG_REGEX is enabled, setexpr also supports a gsub function.
389
390endmenu
391
392menu "Network commands"
393
394config CMD_NET
395	bool "bootp, tftpboot"
396        select NET
397	default y
398	help
399	  Network commands.
400	  bootp - boot image via network using BOOTP/TFTP protocol
401	  tftpboot - boot image via network using TFTP protocol
402
403config CMD_TFTPPUT
404	bool "tftp put"
405	help
406	  TFTP put command, for uploading files to a server
407
408config CMD_TFTPSRV
409	bool "tftpsrv"
410	help
411	  Act as a TFTP server and boot the first received file
412
413config CMD_RARP
414	bool "rarpboot"
415	help
416	  Boot image via network using RARP/TFTP protocol
417
418config CMD_DHCP
419	bool "dhcp"
420	help
421	  Boot image via network using DHCP/TFTP protocol
422
423config CMD_NFS
424	bool "nfs"
425	default y
426	help
427	  Boot image via network using NFS protocol.
428
429config CMD_PING
430	bool "ping"
431	help
432	  Send ICMP ECHO_REQUEST to network host
433
434config CMD_CDP
435	bool "cdp"
436	help
437	  Perform CDP network configuration
438
439config CMD_SNTP
440	bool "sntp"
441	help
442	  Synchronize RTC via network
443
444config CMD_DNS
445	bool "dns"
446	help
447	  Lookup the IP of a hostname
448
449config CMD_LINK_LOCAL
450	bool "linklocal"
451	help
452	  Acquire a network IP address using the link-local protocol
453
454endmenu
455
456menu "Misc commands"
457
458config CMD_TIME
459	bool "time"
460	help
461	  Run commands and summarize execution time.
462
463# TODO: rename to CMD_SLEEP
464config CMD_MISC
465	bool "sleep"
466	default y
467	help
468	  Delay execution for some time
469
470config CMD_TIMER
471	bool "timer"
472	help
473	  Access the system timer.
474
475config CMD_SETGETDCR
476	bool "getdcr, setdcr, getidcr, setidcr"
477	depends on 4xx
478	default y
479	help
480	  getdcr - Get an AMCC PPC 4xx DCR's value
481	  setdcr - Set an AMCC PPC 4xx DCR's value
482	  getidcr - Get a register value via indirect DCR addressing
483	  setidcr - Set a register value via indirect DCR addressing
484
485config CMD_SOUND
486	bool "sound"
487	depends on SOUND
488	help
489	  This provides basic access to the U-Boot's sound support. The main
490	  feature is to play a beep.
491
492	     sound init   - set up sound system
493	     sound play   - play a sound
494
495endmenu
496
497menu "Boot timing"
498
499config BOOTSTAGE
500	bool "Boot timing and reporting"
501	help
502	  Enable recording of boot time while booting. To use it, insert
503	  calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
504	  bootstage.h. Only a single entry is recorded for each ID. You can
505	  give the entry a name with bootstage_mark_name(). You can also
506	  record elapsed time in a particular stage using bootstage_start()
507	  before starting and bootstage_accum() when finished. Bootstage will
508	  add up all the accumated time and report it.
509
510	  Normally, IDs are defined in bootstage.h but a small number of
511	  additional 'user' IDs can be used but passing BOOTSTAGE_ID_ALLOC
512	  as the ID.
513
514	  Calls to show_boot_progress() wil also result in log entries but
515	  these will not have names.
516
517config BOOTSTAGE_REPORT
518	bool "Display a detailed boot timing report before booting the OS"
519	depends on BOOTSTAGE
520	help
521	  Enable output of a boot time report just before the OS is booted.
522	  This shows how long it took U-Boot to go through each stage of the
523	  boot process. The report looks something like this:
524
525		Timer summary in microseconds:
526		       Mark    Elapsed  Stage
527			  0          0  reset
528		  3,575,678  3,575,678  board_init_f start
529		  3,575,695         17  arch_cpu_init A9
530		  3,575,777         82  arch_cpu_init done
531		  3,659,598     83,821  board_init_r start
532		  3,910,375    250,777  main_loop
533		 29,916,167 26,005,792  bootm_start
534		 30,361,327    445,160  start_kernel
535
536config BOOTSTAGE_USER_COUNT
537	hex "Number of boot ID numbers available for user use"
538	default 20
539	help
540	  This is the number of available user bootstage records.
541	  Each time you call bootstage_mark(BOOTSTAGE_ID_ALLOC, ...)
542	  a new ID will be allocated from this stash. If you exceed
543	  the limit, recording will stop.
544
545config CMD_BOOTSTAGE
546	bool "Enable the 'bootstage' command"
547	depends on BOOTSTAGE
548	help
549	  Add a 'bootstage' command which supports printing a report
550	  and un/stashing of bootstage data.
551
552config BOOTSTAGE_FDT
553	bool "Store boot timing information in the OS device tree"
554	depends on BOOTSTAGE
555	help
556	  Stash the bootstage information in the FDT. A root 'bootstage'
557	  node is created with each bootstage id as a child. Each child
558	  has a 'name' property and either 'mark' containing the
559	  mark time in microsecond, or 'accum' containing the
560	  accumulated time for that bootstage id in microseconds.
561	  For example:
562
563		bootstage {
564			154 {
565				name = "board_init_f";
566				mark = <3575678>;
567			};
568			170 {
569				name = "lcd";
570				accum = <33482>;
571			};
572		};
573
574	  Code in the Linux kernel can find this in /proc/devicetree.
575
576config BOOTSTAGE_STASH
577	bool "Stash the boot timing information in memory before booting OS"
578	depends on BOOTSTAGE
579	help
580	  Some OSes do not support device tree. Bootstage can instead write
581	  the boot timing information in a binary format at a given address.
582	  This happens through a call to bootstage_stash(), typically in
583	  the CPU's cleanup_before_linux() function. You can use the
584	  'bootstage stash' and 'bootstage unstash' commands to do this on
585	  the command line.
586
587config BOOTSTAGE_STASH_ADDR
588	hex "Address to stash boot timing information"
589	default 0
590	help
591	  Provide an address which will not be overwritten by the OS when it
592	  starts, so that it can read this information when ready.
593
594config BOOTSTAGE_STASH_SIZE
595	hex "Size of boot timing stash region"
596	default 4096
597	help
598	  This should be large enough to hold the bootstage stash. A value of
599	  4096 (4KiB) is normally plenty.
600
601endmenu
602
603menu "Power commands"
604config CMD_PMIC
605	bool "Enable Driver Model PMIC command"
606	depends on DM_PMIC
607	help
608	  This is the pmic command, based on a driver model pmic's API.
609	  Command features are unchanged:
610	  - list               - list pmic devices
611	  - pmic dev <id>      - show or [set] operating pmic device (NEW)
612	  - pmic dump          - dump registers
613	  - pmic read address  - read byte of register at address
614	  - pmic write address - write byte to register at address
615	  The only one change for this command is 'dev' subcommand.
616
617config CMD_REGULATOR
618	bool "Enable Driver Model REGULATOR command"
619	depends on DM_REGULATOR
620	help
621	  This command is based on driver model regulator's API.
622	  User interface features:
623	  - list               - list regulator devices
624	  - regulator dev <id> - show or [set] operating regulator device
625	  - regulator info     - print constraints info
626	  - regulator status   - print operating status
627	  - regulator value <val] <-f> - print/[set] voltage value [uV]
628	  - regulator current <val>    - print/[set] current value [uA]
629	  - regulator mode <id>        - print/[set] operating mode id
630	  - regulator enable           - enable the regulator output
631	  - regulator disable          - disable the regulator output
632
633	  The '-f' (force) option can be used for set the value which exceeds
634	  the limits, which are found in device-tree and are kept in regulator's
635	  uclass platdata structure.
636
637endmenu
638
639menu "Security commands"
640config CMD_TPM
641	bool "Enable the 'tpm' command"
642	depends on TPM
643	help
644	  This provides a means to talk to a TPM from the command line. A wide
645	  range of commands if provided - see 'tpm help' for details. The
646	  command requires a suitable TPM on your board and the correct driver
647	  must be enabled.
648
649config CMD_TPM_TEST
650	bool "Enable the 'tpm test' command"
651	depends on CMD_TPM
652	help
653	  This provides a a series of tests to confirm that the TPM is working
654	  correctly. The tests cover initialisation, non-volatile RAM, extend,
655	  global lock and checking that timing is within expectations. The
656	  tests pass correctly on Infineon TPMs but may need to be adjusted
657	  for other devices.
658
659endmenu
660
661endmenu
662