summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2018-04-12 11:13:01 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-04-16 09:54:11 +0200
commit67c1c0853fa06bcbc1725e93b6ad9942e80a1e56 (patch)
treee7595ca6de862364a112767a6c3ca09995f62833 /Documentation/devicetree
parent6377d27b951bfddc67bba16e83f79ae1d9fa8eb9 (diff)
downloadbarebox-67c1c0853fa06bcbc1725e93b6ad9942e80a1e56.tar.gz
barebox-67c1c0853fa06bcbc1725e93b6ad9942e80a1e56.tar.xz
common: state: Add property to protect existing data
After an update to a newer barebox version with an enabled state framework, existing data in storage memories could be overwritten. Add a new property to check in front of every write task, if the meta magic field only contains the magic number, zeros or ones. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/bindings/barebox/barebox,state.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/barebox/barebox,state.rst b/Documentation/devicetree/bindings/barebox/barebox,state.rst
index 872bac061b..2893937820 100644
--- a/Documentation/devicetree/bindings/barebox/barebox,state.rst
+++ b/Documentation/devicetree/bindings/barebox/barebox,state.rst
@@ -55,6 +55,9 @@ Optional Properties
* ``algo``: A HMAC algorithm used to detect manipulation of the data
or header, sensible values follow this pattern ``hmac(<HASH>)``,
e.g. ``hmac(sha256)``. Only available for the ``backend-type`` ``raw``.
+* ``keep-previous-content``: Check if a the bucket meta magic field contains
+ other data than the magic value. If so, the backend will not write the state
+ to prevent unconditionally overwrites of existing data.
.. note:: For the ``backend-storage-type`` the keyword ``noncircular`` is still
supported as a fall back to an old storage format. Recommendation is to not