directly type `$name' at the command prompt.
Global environment variables are those you use
- env set/printenv to work with. To run a command stored
+ env set/env print to work with. To run a command stored
in such a variable, you need to use the run command,
and you must not use the '$' sign to access them.
memory (RAM or Flash). In case of a Linux kernel image, the contents
of the "bootargs" environment variable is passed to the kernel as
parameters. You can check and modify this variable using the
-"printenv" and "env set" commands:
+"env print" and "env set" commands:
- => printenv bootargs
+ => env print bootargs
bootargs=root=/dev/ram
=> env set bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
- => printenv bootargs
+ => env print bootargs
bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
=> bootm 40020000
Note that this automatically sets the many IP address related variables in
U-Boot that is obtained from the DHCP server.
-Odroid # printenv ipaddr netmask gatewayip dnsip
+Odroid # env print ipaddr netmask gatewayip dnsip
ipaddr=192.168.1.10
netmask=255.255.255.0
gatewayip=192.168.1.1
40 KiB/s
done
Bytes transferred = 46935 (b757 hex)
-Odroid # printenv bootargs
+Odroid # env print bootargs
bootargs=Please use defined boot
Odroid # env set bootargs console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait
Odroid # bootz 40080000 - 42000000
Result::
- => printenv slot_name
+ => env print slot_name
slot_name=a
Based on this slot information, the current boot partition should be defined,
=> askenv env1
Please enter 'env1': val1
- => printenv env1
+ => env print env1
env1=val1
Value of a environment variable env2 with message and size parameters:
=> askenv env2 Please type-in a value for env2: 10
Please type-in a value for env2: 1234567890123
- => printenv env2
+ => env print env2
env2=1234567890
Value of a environment variable env3 with size parameter only:
=> askenv env3 10
Please enter 'env3': val3
- => printenv env3
+ => env print env3
env3=val3
Configuration
::
=> memsize memsz
- => printenv memsz
+ => env print memsz
memsz=8192
Return value