Skip to main content.
Navigation:
DENX
>
DULG
>
UBootCmdGroupEnvironment
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=UBootCmdGroupEnvironment}% Environment Variables Commands %SECTION1{name=UBootCmdPrintenv}% printenv- print environment variables %INCLUDE{DULGData_%BOARD%.UBootPrintenvHelp}% The =printenv= command prints one, several or all variables of the U-Boot environment. When arguments are given, these are interpreted as the names of environment variables which will be printed with their values: %INCLUDE{DULGData_%BOARD%.UBootPrintenvWithArgs}% Without arguments, =printenv= prints all 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. %INCLUDE{DULGData_%BOARD%.UBootPrintenvNoArgs}% %SECTION1{name=UBootCmdSaveenv}% saveenv - save environment variables to persistent storage %INCLUDE{DULGData_%BOARD%.UBootSaveenvHelp}% All changes you make to the U-Boot environment are made in RAM only. They are lost as soon as you reboot the system. If you want to make your changes permanent you have to use the =saveenv= command to write a copy of the environment settings to persistent storage, from where they are automatically loaded during startup: %INCLUDE{DULGData_%BOARD%.UBootSaveenv}% %SECTION1{name=UBootCmdSetenv}% setenv - set environment variables %INCLUDE{DULGData_%BOARD%.UBootSetenvHelp}% To modify the U-Boot environment you have to use the =setenv= command. When called with exactly one argument, it will delete any variable of that name from U-Boot's environment, if such a variable exists. Any storage occupied for such a variable will be automatically reclaimed: %INCLUDE{DULGData_%BOARD%.UBootSetenvDelete}% When called with more arguments, the first one will again be the name of the variable, and all following arguments will (concatenated by single space characters) form the value that gets stored for this variable. New variables will be automatically created, existing ones overwritten. %INCLUDE{DULGData_%BOARD%.UBootSetenvSet}% Remember standard shell quoting rules when the value of a variable shall contain characters that have a special meaning to the command line parser (like the =$= character that is used for variable substitution or the semicolon which separates commands). Use the backslash (=\=) character to escape such special characters, or enclose the whole phrase in apstrophes (='=). Use ="${name}"= for variable expansion (see %REF{type=Section,topic=CommandLineParsing,name=CommandLineParsing}% for details). %INCLUDE{DULGData_%BOARD%.UBootSetenvQuote}% %T% There is no restriction on the characters that can be used in a variable name except the restrictions imposed by the command line parser (like using backslash for quoting, space and tab characters to separate arguments, or semicolon and newline to separate commands). Even strange input like "=-/|()+=" is a perfectly legal variable name in U-Boot. %X% A common mistake is to write <verbatim> setenv name=value </verbatim> instead of <verbatim> setenv name value </verbatim> There will be no error message, which lets you believe everything went OK, but it didn't: instead of setting the variable _name_ to the value _value_ you tried to delete a variable with the name _name<nop>=value_ - this is probably not what you intended! Always remember that name and value have to be separated by space and/or tab characters! %SECTION1{name=UBootCmdRun}% run - run commands in an environment variable %INCLUDE{DULGData_%BOARD%.UBootRunHelp}% You can use U-Boot environment variables to store commands and even sequences of commands. To execute such a command, you use the =run= command: %INCLUDE{DULGData_%BOARD%.UBootRun}% You can call =run= with several variables as arguments, in which case these commands will be executed in sequence: %INCLUDE{DULGData_%BOARD%.UBootRunSequence}% %T% If a U-Boot variable contains several commands (separated by semicolon), and one of these commands fails when you "run" this variable, the remaining commands _will be executed anyway_. %T% If you execute several variables with one call to =run=, any failing command will cause "run" to terminate, i. e. the remaining variables are _not_ executed. %SECTION1{name=UBootCmdBootd}% bootd - boot default, i.e., run 'bootcmd' %INCLUDE{DULGData_%BOARD%.UBootBootdHelp}% The =bootd= (short: =boot=) executes the default boot command, i. e. what happens when you don't interrupt the initial countdown. This is a synonym for the =run bootcmd= command.
5.9.5. Download Commands
1. Abstract
5.9.7. Flattened Device Tree support
Prev
Home
Next