2023-06-01 16:23:02 +00:00
|
|
|
.. SPDX-License-Identifier: GPL-2.0+:
|
|
|
|
|
|
|
|
cedit command
|
|
|
|
=============
|
|
|
|
|
|
|
|
Synopis
|
|
|
|
-------
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
cedit load <interface> <dev[:part]> <filename>
|
|
|
|
cedit run
|
2023-08-14 22:40:33 +00:00
|
|
|
cedit write_fdt <dev[:part]> <filename>
|
2023-08-14 22:40:34 +00:00
|
|
|
cedit read_fdt <dev[:part]> <filename>
|
2023-08-14 22:40:35 +00:00
|
|
|
cedit write_env [-v]
|
2023-06-01 16:23:02 +00:00
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The *cedit* command is used to load a configuration-editor description and allow
|
|
|
|
the user to interact with it.
|
|
|
|
|
|
|
|
It makes use of the expo subsystem.
|
|
|
|
|
|
|
|
The description is in the form of a devicetree file, as documented at
|
|
|
|
:ref:`expo_format`.
|
|
|
|
|
2023-08-14 22:40:29 +00:00
|
|
|
See :doc:`../../develop/cedit` for information about the configuration editor.
|
|
|
|
|
2023-08-14 22:40:31 +00:00
|
|
|
cedit load
|
|
|
|
~~~~~~~~~~
|
|
|
|
|
|
|
|
Loads a configuration-editor description from a file. It creates a new cedit
|
|
|
|
structure ready for use. Initially no settings are read, so default values are
|
|
|
|
used for each object.
|
|
|
|
|
|
|
|
cedit run
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
|
|
Runs the default configuration-editor event loop. This is very simple, just
|
|
|
|
accepting character input and moving through the objects under user control.
|
|
|
|
The implementation is at `cedit_run()`.
|
|
|
|
|
2023-08-14 22:40:33 +00:00
|
|
|
cedit write_fdt
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Writes the current user settings to a devicetree file. For each menu item the
|
|
|
|
selected ID and its text string are written.
|
|
|
|
|
2023-08-14 22:40:34 +00:00
|
|
|
cedit read_fdt
|
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Reads the user settings from a devicetree file and updates the cedit with those
|
|
|
|
settings.
|
2023-08-14 22:40:31 +00:00
|
|
|
|
2023-08-14 22:40:35 +00:00
|
|
|
cedit write_env
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Writes the settings to environment variables. For each menu item the selected
|
|
|
|
ID and its text string are written, similar to:
|
|
|
|
|
|
|
|
setenv c.<name> <selected_id>
|
|
|
|
setenv c.<name>-str <selected_id's text string>
|
|
|
|
|
|
|
|
The `-v` flag enables verbose mode, where each variable is printed before it is
|
|
|
|
set.
|
|
|
|
|
|
|
|
|
2023-06-01 16:23:02 +00:00
|
|
|
Example
|
|
|
|
-------
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
=> cedit load hostfs - fred.dtb
|
|
|
|
=> cedit run
|
2023-08-14 22:40:33 +00:00
|
|
|
=> cedit write_fdt hostfs - settings.dtb
|
|
|
|
|
|
|
|
That results in::
|
|
|
|
|
|
|
|
/ {
|
|
|
|
cedit-values {
|
|
|
|
cpu-speed = <0x00000006>;
|
|
|
|
cpu-speed-str = "2 GHz";
|
|
|
|
power-loss = <0x0000000a>;
|
|
|
|
power-loss-str = "Always Off";
|
|
|
|
};
|
|
|
|
}
|
2023-08-14 22:40:34 +00:00
|
|
|
|
|
|
|
=> cedit read_fdt hostfs - settings.dtb
|
2023-08-14 22:40:35 +00:00
|
|
|
|
|
|
|
This shows settings being stored in the environment::
|
|
|
|
|
|
|
|
=> cedit write_env -v
|
|
|
|
=> print
|
|
|
|
...
|
|
|
|
c.cpu-speed=6
|
|
|
|
c.cpu-speed-str=2 GHz
|
|
|
|
c.power-loss=10
|
|
|
|
c.power-loss-str=Always Off
|
|
|
|
...
|