So far cedit does not support reading and writing the configuration. This series add several features related to this:
First, it adds support for using a file on a filesystem. This is in FDT format and provides enough information to reset the cedit back to the saved settings. Second, it adds support for using the U-Boot environment. Since the environment is generally saved across reboots, this feature provides an easy way of storing the state on most boards. The variables all have a 'c.' prefix to avoid confusion with other variables. Finally it adds support for using CMOS RAM. This is commonly used on x86 devices to store BIOS settings. The expo schema provides information on the register layout. Some other minor tweaks and improvements are included along the way. Simon Glass (19): expo: Make scene_obj_find() take a const scene abuf: Allow incrementing the size expo: Provide a way to iterate through all scene objects expo: Refactor menu_build() to return the object created expo: Split out cedit into its own header expo: Move cedit test into its own file and tidy expo: Add a function to prepare a cedit expo: Tidy up the expo.py tool and usage expo: Add documentation for the configuration editor expo: Move cedit theme under bootstd doc: Expand documentation for the cedit command expo: Export scene_menuitem_find() for use in internal code expo: cedit: Support writing settings to a file expo: cedit: Support reading settings from a file expo: cedit: Support writing settings to environment vars expo: cedit: Support reading settings from environment vars expo: cedit: Support writing settings to CMOS RAM expo: cedit: Support reading settings from CMOS RAM expo: doc: Update documentation for persistent settings arch/sandbox/dts/sandbox.dtsi | 12 +- arch/sandbox/dts/test.dts | 12 +- boot/cedit.c | 569 +++++++++++++++++++++++++++++++- boot/expo.c | 15 + boot/expo_build.c | 22 +- boot/scene.c | 18 +- boot/scene_internal.h | 50 ++- boot/scene_menu.c | 20 +- cmd/cedit.c | 209 +++++++++++- doc/develop/cedit.rst | 169 ++++++++++ doc/develop/expo.rst | 48 ++- doc/develop/index.rst | 1 + doc/usage/cmd/cedit.rst | 117 +++++++ include/abuf.h | 9 + include/cedit.h | 125 +++++++ include/expo.h | 33 +- lib/abuf.c | 5 + test/boot/Makefile | 1 + test/boot/cedit.c | 198 +++++++++++ test/boot/expo.c | 88 ++--- test/boot/files/expo_ids.h | 25 ++ test/boot/files/expo_layout.dts | 28 +- test/lib/abuf.c | 25 ++ test/py/tests/test_ut.py | 4 +- tools/expo.py | 22 +- 25 files changed, 1679 insertions(+), 146 deletions(-) create mode 100644 doc/develop/cedit.rst create mode 100644 include/cedit.h create mode 100644 test/boot/cedit.c create mode 100644 test/boot/files/expo_ids.h -- 2.41.0.694.ge786442a9b-goog