xref: /openbmc/u-boot/common/Kconfig (revision a65b25d1)
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
20comment "Commands"
21
22menu "Info commands"
23
24config CMD_BDI
25	bool "bdinfo"
26	help
27	  Print board info
28
29config CMD_CONSOLE
30	bool "coninfo"
31	help
32	  Print console devices and information.
33
34config CMD_CPU
35	bool "cpu"
36	help
37	  Print information about available CPUs. This normally shows the
38	  number of CPUs, type (e.g. manufacturer, architecture, product or
39	  internal name) and clock frequency. Other information may be
40	  available depending on the CPU driver.
41
42config CMD_LICENSE
43	bool "license"
44	help
45	  Print GPL license text
46
47endmenu
48
49menu "Boot commands"
50
51config CMD_BOOTD
52	bool "bootd"
53	help
54	  Run the command stored in the environment "bootcmd", i.e.
55	  "bootd" does the same thing as "run bootcmd".
56
57config CMD_BOOTM
58	bool "bootm"
59	default y
60	help
61	  Boot an application image from the memory.
62
63config CMD_GO
64	bool "go"
65	default y
66	help
67	  Start an application at a given address.
68
69config CMD_RUN
70	bool "run"
71	help
72	  Run the command in the given environment variable.
73
74config CMD_IMI
75	bool "iminfo"
76	help
77	  Print header information for application image.
78
79config CMD_IMLS
80	bool "imls"
81	help
82	  List all images found in flash
83
84config CMD_XIMG
85	bool "imxtract"
86	help
87	  Extract a part of a multi-image.
88
89endmenu
90
91menu "Environment commands"
92
93config CMD_EXPORTENV
94	bool "env export"
95	default y
96	help
97	  Export environments.
98
99config CMD_IMPORTENV
100	bool "env import"
101	default y
102	help
103	  Import environments.
104
105config CMD_EDITENV
106	bool "editenv"
107	help
108	  Edit environment variable.
109
110config CMD_SAVEENV
111	bool "saveenv"
112	help
113	  Run the command in the given environment variable.
114
115endmenu
116
117menu "Memory commands"
118
119config CMD_MEMORY
120	bool "md, mm, nm, mw, cp, cmp, base, loop"
121	help
122	  Memeory commands.
123	    md - memory display
124	    mm - memory modify (auto-incrementing address)
125	    nm - memory modify (constant address)
126	    mw - memory write (fill)
127	    cp - memory copy
128	    cmp - memory compare
129	    base - print or set address offset
130	    loop - initinite loop on address range
131
132config CMD_CRC32
133	bool "crc32"
134	default y
135	help
136	  Compute CRC32.
137
138config LOOPW
139	bool "loopw"
140	help
141	  Infinite write loop on address range
142
143config CMD_MEMTEST
144	bool "memtest"
145	help
146	  Simple RAM read/write test.
147
148config CMD_MX_CYCLIC
149	bool "mdc, mwc"
150	help
151	  mdc - memory display cyclic
152	  mwc - memory write cyclic
153
154config CMD_MEMINFO
155	bool "meminfo"
156	help
157	  Display memory information.
158
159endmenu
160
161menu "Device access commands"
162
163config CMD_DM
164	bool "dm - Access to driver model information"
165	depends on DM
166	default y
167	help
168	  Provides access to driver model data structures and information,
169	  such as a list of devices, list of uclasses and the state of each
170	  device (e.g. activated). This is not required for operation, but
171	  can be useful to see the state of driver model for debugging or
172	  interest.
173
174config CMD_DEMO
175	bool "demo - Demonstration commands for driver model"
176	depends on DM
177	help
178	  Provides a 'demo' command which can be used to play around with
179	  driver model. To use this properly you will need to enable one or
180	  both of the demo devices (DM_DEMO_SHAPE and DM_DEMO_SIMPLE).
181	  Otherwise you will always get an empty list of devices. The demo
182	  devices are defined in the sandbox device tree, so the easiest
183	  option is to use sandbox and pass the -d point to sandbox's
184	  u-boot.dtb file.
185
186config CMD_LOADB
187	bool "loadb"
188	help
189	  Load a binary file over serial line.
190
191config CMD_LOADS
192	bool "loads"
193	help
194	  Load an S-Record file over serial line
195
196config CMD_FLASH
197	bool "flinfo, erase, protect"
198	help
199	  NOR flash support.
200	    flinfo - print FLASH memory information
201	    erase - FLASH memory
202	    protect - enable or disable FLASH write protection
203
204config CMD_ARMFLASH
205	depends on FLASH_CFI_DRIVER
206	bool "armflash"
207	help
208	  ARM Ltd reference designs flash partition access
209
210config CMD_NAND
211	bool "nand"
212	help
213	  NAND support.
214
215config CMD_SPI
216	bool "sspi"
217	help
218	  SPI utility command.
219
220config CMD_I2C
221	bool "i2c"
222	help
223	  I2C support.
224
225config CMD_USB
226	bool "usb"
227	help
228	  USB support.
229
230config CMD_FPGA
231	bool "fpga"
232	help
233	  FPGA support.
234
235endmenu
236
237
238menu "Shell scripting commands"
239
240config CMD_ECHO
241	bool "echo"
242	help
243	  Echo args to console
244
245config CMD_ITEST
246	bool "itest"
247	help
248	  Return true/false on integer compare.
249
250config CMD_SOURCE
251	bool "source"
252	help
253	  Run script from memory
254
255config CMD_SETEXPR
256	bool "setexpr"
257	help
258	  Evaluate boolean and math expressions and store the result in an env
259	    variable.
260	  Also supports loading the value at a memory location into a variable.
261	  If CONFIG_REGEX is enabled, setexpr also supports a gsub function.
262
263endmenu
264
265menu "Network commands"
266
267config CMD_NET
268	bool "bootp, tftpboot"
269        select NET
270	help
271	  Network commands.
272	  bootp - boot image via network using BOOTP/TFTP protocol
273	  tftpboot - boot image via network using TFTP protocol
274
275config CMD_TFTPPUT
276	bool "tftp put"
277	help
278	  TFTP put command, for uploading files to a server
279
280config CMD_TFTPSRV
281	bool "tftpsrv"
282	help
283	  Act as a TFTP server and boot the first received file
284
285config CMD_RARP
286	bool "rarpboot"
287	help
288	  Boot image via network using RARP/TFTP protocol
289
290config CMD_DHCP
291	bool "dhcp"
292	help
293	  Boot image via network using DHCP/TFTP protocol
294
295config CMD_NFS
296	bool "nfs"
297	help
298	  Boot image via network using NFS protocol.
299
300config CMD_PING
301	bool "ping"
302	help
303	  Send ICMP ECHO_REQUEST to network host
304
305config CMD_CDP
306	bool "cdp"
307	help
308	  Perform CDP network configuration
309
310config CMD_SNTP
311	bool "sntp"
312	help
313	  Synchronize RTC via network
314
315config CMD_DNS
316	bool "dns"
317	help
318	  Lookup the IP of a hostname
319
320config CMD_LINK_LOCAL
321	bool "linklocal"
322	help
323	  Acquire a network IP address using the link-local protocol
324
325endmenu
326
327menu "Misc commands"
328
329config CMD_TIME
330	bool "time"
331	help
332	  Run commands and summarize execution time.
333
334# TODO: rename to CMD_SLEEP
335config CMD_MISC
336	bool "sleep"
337	help
338	  Delay execution for some time
339
340config CMD_TIMER
341	bool "timer"
342	help
343	  Access the system timer.
344
345config CMD_SETGETDCR
346	bool "getdcr, setdcr, getidcr, setidcr"
347	depends on 4xx
348	help
349	  getdcr - Get an AMCC PPC 4xx DCR's value
350	  setdcr - Set an AMCC PPC 4xx DCR's value
351	  getidcr - Get a register value via indirect DCR addressing
352	  setidcr - Set a register value via indirect DCR addressing
353
354config CMD_SOUND
355	bool "sound"
356	depends on SOUND
357	help
358	  This provides basic access to the U-Boot's sound support. The main
359	  feature is to play a beep.
360
361	     sound init   - set up sound system
362	     sound play   - play a sound
363
364endmenu
365
366menu "Boot timing"
367
368config BOOTSTAGE
369	bool "Boot timing and reporting"
370	help
371	  Enable recording of boot time while booting. To use it, insert
372	  calls to bootstage_mark() with a suitable BOOTSTAGE_ID from
373	  bootstage.h. Only a single entry is recorded for each ID. You can
374	  give the entry a name with bootstage_mark_name(). You can also
375	  record elapsed time in a particular stage using bootstage_start()
376	  before starting and bootstage_accum() when finished. Bootstage will
377	  add up all the accumated time and report it.
378
379	  Normally, IDs are defined in bootstage.h but a small number of
380	  additional 'user' IDs can be used but passing BOOTSTAGE_ID_ALLOC
381	  as the ID.
382
383	  Calls to show_boot_progress() wil also result in log entries but
384	  these will not have names.
385
386config BOOTSTAGE_REPORT
387	bool "Display a detailed boot timing report before booting the OS"
388	depends on BOOTSTAGE
389	help
390	  Enable output of a boot time report just before the OS is booted.
391	  This shows how long it took U-Boot to go through each stage of the
392	  boot process. The report looks something like this:
393
394		Timer summary in microseconds:
395		       Mark    Elapsed  Stage
396			  0          0  reset
397		  3,575,678  3,575,678  board_init_f start
398		  3,575,695         17  arch_cpu_init A9
399		  3,575,777         82  arch_cpu_init done
400		  3,659,598     83,821  board_init_r start
401		  3,910,375    250,777  main_loop
402		 29,916,167 26,005,792  bootm_start
403		 30,361,327    445,160  start_kernel
404
405config BOOTSTAGE_USER_COUNT
406	hex "Number of boot ID numbers available for user use"
407	default 20
408	help
409	  This is the number of available user bootstage records.
410	  Each time you call bootstage_mark(BOOTSTAGE_ID_ALLOC, ...)
411	  a new ID will be allocated from this stash. If you exceed
412	  the limit, recording will stop.
413
414config CMD_BOOTSTAGE
415	bool "Enable the 'bootstage' command"
416	depends on BOOTSTAGE
417	help
418	  Add a 'bootstage' command which supports printing a report
419	  and un/stashing of bootstage data.
420
421config BOOTSTAGE_FDT
422	bool "Store boot timing information in the OS device tree"
423	depends on BOOTSTAGE
424	help
425	  Stash the bootstage information in the FDT. A root 'bootstage'
426	  node is created with each bootstage id as a child. Each child
427	  has a 'name' property and either 'mark' containing the
428	  mark time in microsecond, or 'accum' containing the
429	  accumulated time for that bootstage id in microseconds.
430	  For example:
431
432		bootstage {
433			154 {
434				name = "board_init_f";
435				mark = <3575678>;
436			};
437			170 {
438				name = "lcd";
439				accum = <33482>;
440			};
441		};
442
443	  Code in the Linux kernel can find this in /proc/devicetree.
444
445config BOOTSTAGE_STASH
446	bool "Stash the boot timing information in memory before booting OS"
447	depends on BOOTSTAGE
448	help
449	  Some OSes do not support device tree. Bootstage can instead write
450	  the boot timing information in a binary format at a given address.
451	  This happens through a call to bootstage_stash(), typically in
452	  the CPU's cleanup_before_linux() function. You can use the
453	  'bootstage stash' and 'bootstage unstash' commands to do this on
454	  the command line.
455
456config BOOTSTAGE_STASH_ADDR
457	hex "Address to stash boot timing information"
458	default 0
459	help
460	  Provide an address which will not be overwritten by the OS when it
461	  starts, so that it can read this information when ready.
462
463config BOOTSTAGE_STASH_SIZE
464	hex "Size of boot timing stash region"
465	default 4096
466	help
467	  This should be large enough to hold the bootstage stash. A value of
468	  4096 (4KiB) is normally plenty.
469
470endmenu
471
472menu "Power commands"
473config CMD_PMIC
474	bool "Enable Driver Model PMIC command"
475	depends on DM_PMIC
476	help
477	  This is the pmic command, based on a driver model pmic's API.
478	  Command features are unchanged:
479	  - list               - list pmic devices
480	  - pmic dev <id>      - show or [set] operating pmic device (NEW)
481	  - pmic dump          - dump registers
482	  - pmic read address  - read byte of register at address
483	  - pmic write address - write byte to register at address
484	  The only one change for this command is 'dev' subcommand.
485
486config CMD_REGULATOR
487	bool "Enable Driver Model REGULATOR command"
488	depends on DM_REGULATOR
489	help
490	  This command is based on driver model regulator's API.
491	  User interface features:
492	  - list               - list regulator devices
493	  - regulator dev <id> - show or [set] operating regulator device
494	  - regulator info     - print constraints info
495	  - regulator status   - print operating status
496	  - regulator value <val] <-f> - print/[set] voltage value [uV]
497	  - regulator current <val>    - print/[set] current value [uA]
498	  - regulator mode <id>        - print/[set] operating mode id
499	  - regulator enable           - enable the regulator output
500	  - regulator disable          - disable the regulator output
501
502	  The '-f' (force) option can be used for set the value which exceeds
503	  the limits, which are found in device-tree and are kept in regulator's
504	  uclass platdata structure.
505
506endmenu
507
508endmenu
509