blob: 0a9f620b59b3a1b85ca19da8515f8bde4f251b1f [file] [log] [blame]
Simon Glassa0874dc2023-06-01 10:23:02 -06001.. SPDX-License-Identifier: GPL-2.0+:
2
3cedit command
4=============
5
6Synopis
7-------
8
9::
10
11 cedit load <interface> <dev[:part]> <filename>
12 cedit run
Simon Glass2dee81f2023-08-14 16:40:33 -060013 cedit write_fdt <dev[:part]> <filename>
Simon Glass472317c2023-08-14 16:40:34 -060014 cedit read_fdt <dev[:part]> <filename>
Simon Glassa0874dc2023-06-01 10:23:02 -060015
16Description
17-----------
18
19The *cedit* command is used to load a configuration-editor description and allow
20the user to interact with it.
21
22It makes use of the expo subsystem.
23
24The description is in the form of a devicetree file, as documented at
25:ref:`expo_format`.
26
Simon Glassc5aacf52023-08-14 16:40:29 -060027See :doc:`../../develop/cedit` for information about the configuration editor.
28
Simon Glassd65ccbb2023-08-14 16:40:31 -060029cedit load
30~~~~~~~~~~
31
32Loads a configuration-editor description from a file. It creates a new cedit
33structure ready for use. Initially no settings are read, so default values are
34used for each object.
35
36cedit run
37~~~~~~~~~
38
39Runs the default configuration-editor event loop. This is very simple, just
40accepting character input and moving through the objects under user control.
41The implementation is at `cedit_run()`.
42
Simon Glass2dee81f2023-08-14 16:40:33 -060043cedit write_fdt
44~~~~~~~~~~~~~~~
45
46Writes the current user settings to a devicetree file. For each menu item the
47selected ID and its text string are written.
48
Simon Glass472317c2023-08-14 16:40:34 -060049cedit read_fdt
50~~~~~~~~~~~~~~
51
52Reads the user settings from a devicetree file and updates the cedit with those
53settings.
Simon Glassd65ccbb2023-08-14 16:40:31 -060054
Simon Glassa0874dc2023-06-01 10:23:02 -060055Example
56-------
57
58::
59
60 => cedit load hostfs - fred.dtb
61 => cedit run
Simon Glass2dee81f2023-08-14 16:40:33 -060062 => cedit write_fdt hostfs - settings.dtb
63
64That results in::
65
66 / {
67 cedit-values {
68 cpu-speed = <0x00000006>;
69 cpu-speed-str = "2 GHz";
70 power-loss = <0x0000000a>;
71 power-loss-str = "Always Off";
72 };
73 }
Simon Glass472317c2023-08-14 16:40:34 -060074
75 => cedit read_fdt hostfs - settings.dtb