
SETENV
LITE5200B User’s Manual, Rev. 0
Freescale Semiconductor
7-55
7.50
SETENV
setenv
– Set environment variables.
setenv name value ...
– Set environment variable 'name' to 'value ...'
setenv name
– Delete environment variable 'name'.
=>
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:
=> printenv foo
foo=This is an example value.
=> setenv foo
=> printenv foo
## Error: "foo" not defined
=>
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.
=> printenv bar
## Error: "bar" not defined
=> setenv bar This is a new example.
=> printenv bar
bar=This is a new example.
=>
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.
=> setenv cons_opts console=tty0 console=ttyS0,\$(baudrate)
=> printenv cons_opts
cons_opts=console=tty0 console=ttyS0,$(baudrate)
=>
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.
A common mistake is to write
setenv name=value
Содержание Lite5200B
Страница 1: ...Lite5200B User s Manual Devices Supported MPC5200B LITE5200BUM Rev 0 10 2005...
Страница 12: ...Getting Started LITE5200B User s Manual Rev 0 3 2 Freescale Semiconductor Figure 3 1 Quick Start Connectors...
Страница 14: ...Getting Started LITE5200B User s Manual Rev 0 3 4 Freescale Semiconductor THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 48: ...Boot Monitor LITE5200B User s Manual Rev 0 5 14 Freescale Semiconductor THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 50: ...Flash Recovery LITE5200B User s Manual Rev 0 6 2 Freescale Semiconductor THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 79: ...IMM LITE5200B User s Manual Rev 0 Freescale Semiconductor 7 29 7 28 IMM imm i2c memory modify auto incrementing...
Страница 80: ...U Boot Commands LITE5200B User s Manual Rev 0 7 30 Freescale Semiconductor 7 29 IMW imw Memory write fill...
Страница 109: ...USB LITE5200B User s Manual Rev 0 Freescale Semiconductor 7 59 7 53 USB usb USB sub system...
Страница 110: ...U Boot Commands LITE5200B User s Manual Rev 0 7 60 Freescale Semiconductor 7 54 USBBoot usbboot Boot from USB device...
Страница 112: ...U Boot Commands LITE5200B User s Manual Rev 0 7 62 Freescale Semiconductor THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 118: ...PCI Compatibility LITE5200B User s Manual Rev 0 B 2 Freescale Semiconductor THIS PAGE INTENTIONALLY LEFT BLANK...