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