summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-06-11 11:33:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-11 11:33:34 +0200
commitad06295b2983cc46cb6c4dcf2b482f37731f7a3e (patch)
tree7c8aec2fb29c565dadcc40ef5b6b9dfc2d922fc9 /Documentation
parent06b8bc4d708b8ff4eba1dd9b48ec110a8019d2c8 (diff)
parent25d6c568a867821e419e4a6b5cdb41a0c98b3ad8 (diff)
downloadbarebox-ad06295b2983cc46cb6c4dcf2b482f37731f7a3e.tar.gz
barebox-ad06295b2983cc46cb6c4dcf2b482f37731f7a3e.tar.xz
Merge branch 'for-next/ubootenv'
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst43
-rw-r--r--Documentation/filesystems/ubootvarfs.rst28
2 files changed, 71 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst b/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst
new file mode 100644
index 0000000000..da0ccd2c25
--- /dev/null
+++ b/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst
@@ -0,0 +1,43 @@
+U-Boot environment device
+=========================
+
+This driver provides a unified device exposing U-Boot environment
+varaible data, sans the low-level parts. Resulting device is intended
+to be used with corresponding filesystem driver to expose environment
+data as a filesystem.
+
+Required properties:
+
+* ``compatible``: should be ``barebox,uboot-environment``
+* ``device-path``: phandle of the partition the device environment is
+ on (single partiton configuration)
+* ``device-path-0`` and ``device-path-1``: phandle of the partition
+ the environment is on (redundant configuration)
+
+Example:
+
+.. code-block:: none
+
+ environment {
+ compatible = "barebox,uboot-environment";
+ device-path-0 = &uboot_env_0;
+ device-path-1 = &uboot_env_1;
+ };
+
+ &usdhc4 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot_env_0: partition@c0000 {
+ label = "uboot-environment-0";
+ reg = <0xc0000 0x4000>;
+ };
+
+ uboot_env_1: partition@cc800 {
+ label = "uboot-environment-1";
+ reg = <0xcc800 0x4000>;
+ };
+ };
+ };
diff --git a/Documentation/filesystems/ubootvarfs.rst b/Documentation/filesystems/ubootvarfs.rst
new file mode 100644
index 0000000000..0433b12944
--- /dev/null
+++ b/Documentation/filesystems/ubootvarfs.rst
@@ -0,0 +1,28 @@
+.. index:: ubootvarfs (filesystem)
+
+.. _filesystems_ubootvarfs:
+
+U-Boot environment filesystem
+=============================
+
+barebox supports accessing U-Boot environment contents as a regular
+filesystems in both read and write modes. U-Boot environment data
+(ubootvar) device supports automount, so no explicit mount command
+should be necessary and accessing the environment should be as easy
+as:
+
+.. code-block:: console
+
+ barebox:/ ls -l /mnt/ubootvar0
+
+However the filesystem can be explicitly mounted with the following
+command:
+
+.. code-block:: console
+
+ barebox:/ mount -t ubootvarfs /dev/device /mnt/path
+
+**NOTE** Current implementation of the filesystem driver uses lazy
+synchronization, any changes made to the environment will not be
+written to the medium until the filesystem is unmounted (will happen
+automatically on Barebox shutdown)