June 2017
Intermediate to advanced
478 pages
13h 14m
English
U-Boot uses environment variables extensively to store and pass information between functions and even to create scripts. Environment variables are simple name=value pairs that are stored in an area of memory. The initial population of variables may be coded in the board configuration header file, like this:
#define CONFIG_EXTRA_ENV_SETTINGS "myvar1=value1" "myvar2=value2"[...]
You can create and modify variables from the U-Boot command line using setenv. For example, setenv foo bar creates the variable foo with the value bar. Note that there is no = sign between the variable name and the value. You can delete a variable by setting it to a null string, setenv foo. You can print all the variables to the console using ...
Read now
Unlock full access