SBC35-C398/Setup
v1.0
www.winsystems.com
Page 9
U-Boot commands, Formats, and Functions
.
7.8
U-Boot Environment Variables
U-Boot parameters configure the SBC35-C398 during OS boot. Many should remain
unchanged, but others can be modified to reflect a board’s hardware specific
configuration. Each U-Boot variable is stored as a character array (a string) in the
board’s memory. As shipped from the factory, the U-Boot parameters are stored in the
same SPI flash device as U-Boot. When used in U-Boot commands, parameter names
are replaced with the contents of the string associated with the variable. If you enter the
U-Boot command ‘
printenv
’ on the U-Boot command line, all of the parameters will
be printed followed by their string contents.
The use of an environment variable is indicated to U-Boot by surrounding the variable
name with the U-Boot variable ‘
${
’ and ‘
}
’. For example, to use the environment
variable ‘
serverip
’ in a U-Boot command, it must be specified as follows:
${serverip}
The environment variables depicted below are the defaults for the SBC35-C398Q (Quad
Core).
NOTE
Since the environment variables depicted below are not part of a command line (they
are a screen printout of global environment variables), there are no single line quotes
required; it is merely a list.
Command
Example Format in Context
Command Definition
printenv
printenv
Prints a list with all variables in the environment and
their values, plus some statistics about the current
usage and the total size of the memory available for
the environment
setenv
setenv <variable name>
<variable settings>
Used to define the value of environment variables,
and if no argument is given (used alone), it displays
all environment valuables.
saveenv
saveenv
This command saves environment variables to
persistent storage; saving is required after making
changes to any variable; without doing so, changes
are lost when the system is reset
destroyenv
destroyenv
Erases entire contents of the U-Boot environment and
restores variables to default values; it will not save
the default environment to persistent storage, such
as with
saveenv
help
or
?
help
or
?
Lists all of the available U-Boot commands, and when
used with an argument, such as “
help run
” it will
list all the run commands under the help environment
variable
reset
reset
Resets the system and restarts the boot process
run
run <executable>
Executes (Runs) the selected executable
boot
boot = run bootcmd
Executes default boot command