U-boot environment: Difference between revisions
From embeddedTS Manuals
(Corrected SPI to eMMC) |
(Grammar fixups) |
||
Line 1: | Line 1: | ||
The eMMC flash contains both the U-Boot executable binary and U-Boot environment. Our default build has | The eMMC flash contains both the U-Boot executable binary and U-Boot environment. Our default build has 2 MiB of environment space which can be used for variables and boot scripts. The following commands are examples of how to manipulate the U-Boot environment: | ||
<source lang=bash> | <source lang=bash> | ||
Line 14: | Line 14: | ||
env run hellocmd; | env run hellocmd; | ||
# Commit | # Commit environment changes to the SPI flash | ||
# Otherwise changes are lost | # Otherwise changes are lost | ||
env save | env save | ||
# Restore | # Restore environment to default | ||
env default -a | env default -a | ||
Latest revision as of 13:17, 27 September 2018
The eMMC flash contains both the U-Boot executable binary and U-Boot environment. Our default build has 2 MiB of environment space which can be used for variables and boot scripts. The following commands are examples of how to manipulate the U-Boot environment:
# Print all environment variables
env print -a
# Sets the variable bootdelay to 5 seconds
env set bootdelay 5;
# Variables can also contain commands
env set hellocmd 'led red on; echo Hello world; led green on;'
# Execute commands saved in a variable
env run hellocmd;
# Commit environment changes to the SPI flash
# Otherwise changes are lost
env save
# Restore environment to default
env default -a
# Remove a variable
env delete emmcboot