1 .. SPDX-License-Identifier: GPL-2.0+
6 The command line is available in U-Boot proper, enabled by CONFIG_CMDLINE which
7 is on by default. It is not enabled in SPL.
9 There are two different command-line parsers available with U-Boot:
10 the old "simple" one, and the much more powerful "hush" shell:
12 Simple command-line parser
13 --------------------------
15 This takes very little code space and offers only basic features:
17 - supports environment variables (through setenv / saveenv commands)
18 - several commands on one line, separated by ';'
19 - variable substitution using "... ${name} ..." syntax
20 - special characters ('$', ';') can be escaped by prefixing with '\',
23 setenv bootcmd bootm \${address}
25 - You can also escape text by enclosing in single apostrophes, for example::
27 setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off'
32 This is similar to Bourne shell, with control structures like:
34 - `if`... `then` ... `else`... `fi`
35 - `for`... `do` ... `done`
36 - `while` ... `do` ... `done`
37 - `until` ... `do` ... `done`
39 Hush supports environment ("global") variables (through setenv / saveenv
40 commands) and local shell variables (through standard shell syntax
41 `name=value`); only environment variables can be used with the "run" command
43 The Hush shell is enabled with `CONFIG_HUSH_PARSER`.
48 #. If a command line (or an environment variable executed by a "run"
49 command) contains several commands separated by semicolon, and
50 one of these commands fails, then the remaining commands will be
53 #. If you execute several variables with one call to run (i. e.
54 calling run with a list of variables as arguments), any failing
55 command will cause "run" to terminate, i. e. the remaining
56 variables are not executed.
61 Most U-Boot commands use hexadecimal (hex) as the default base, for convenient
62 use of addresses, for example::
65 00001000: 2c786f62 00697073 03000000 0c000000 box,spi.........
66 00001010: 67020000 00000000 ...g....
68 There is no need to add a `0x` prefix to the arguments and the output is shown
69 in hex also, without any prefixes. This helps to avoid clutter.
71 Some commands use decimal where it is more natural::
76 Current bus speed=400000
78 Setting bus speed to 100000 Hz
80 In some cases the default is decimal but it is possible to use octal if that is
89 It is possible to use a `0x` prefix to use a hex value if that is more
93 Setting bus speed to 196608 Hz