summaryrefslogtreecommitdiff
path: root/doc/usage/cmd/cedit.rst
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-14 16:40:36 -0600
committerTom Rini <trini@konsulko.com>2023-08-25 13:54:33 -0400
commitbcf2b7202e960e7fb3df8d5e8ed0d6fa00a5a9fa (patch)
tree75f46b69fa13368405aafeb36e2b1adcfcdf6a35 /doc/usage/cmd/cedit.rst
parentfc9c0e0771cad76b24f73bb64c105b6ea39721ca (diff)
expo: cedit: Support reading settings from environment vars
Add a command to read cedit settings from environment variables so that they can be restored as part of the environment. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/usage/cmd/cedit.rst')
-rw-r--r--doc/usage/cmd/cedit.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/usage/cmd/cedit.rst b/doc/usage/cmd/cedit.rst
index 426470a82ac..1f92b7306a7 100644
--- a/doc/usage/cmd/cedit.rst
+++ b/doc/usage/cmd/cedit.rst
@@ -13,6 +13,7 @@ Synopis
cedit write_fdt <dev[:part]> <filename>
cedit read_fdt <dev[:part]> <filename>
cedit write_env [-v]
+ cedit read_env [-v]
Description
-----------
@@ -53,6 +54,16 @@ cedit read_fdt
Reads the user settings from a devicetree file and updates the cedit with those
settings.
+cedit read_env
+~~~~~~~~~~~~~~
+
+Reads the settings from the environment variables. For each menu item `<name>`,
+cedit looks for a variable called `c.<name>` with the ID of the selected menu
+item.
+
+The `-v` flag enables verbose mode, where each variable is printed after it is
+read.
+
cedit write_env
~~~~~~~~~~~~~~~
@@ -91,6 +102,10 @@ That results in::
This shows settings being stored in the environment::
=> cedit write_env -v
+ c.cpu-speed=7
+ c.cpu-speed-str=2.5 GHz
+ c.power-loss=12
+ c.power-loss-str=Memory
=> print
...
c.cpu-speed=6
@@ -98,3 +113,7 @@ This shows settings being stored in the environment::
c.power-loss=10
c.power-loss-str=Always Off
...
+
+ => cedit read_env -v
+ c.cpu-speed=7
+ c.power-loss=12