2019-02-07 |
state: fix typo
...
This ports the following barebox commit:
| commit 69b16bc
| Author: Ulrich Ölmann <u.oelmann@pengutronix.de>
| Date: Wed Feb 6 11:34:02 2019 +0100
|
| common: state: fix typo
|
| Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| M common/state/backend_format_raw.c
| M common/state/state.c
| M common/state/state.h
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 7 Feb 2019
Roland Hieber
committed
on 7 Feb 2019
|
2019-01-07 |
state: Add property to protect existing data
...
This ports the following barebox commit:
| commit 67c1c08
| Author: Daniel Schultz <d.schultz@phytec.de>
| Date: Thu Apr 12 11:13:01 2018 +0200
|
| 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>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
state: find backend node with its reproducible name
...
This ports the following barebox commit and removes the now no longer used noop
definition of of_find_node_by_devpath() that was introduced in commit "state:
find device node from device path, not from device node path":
| commit 1eddb0d
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Tue Feb 20 12:41:26 2018 +0100
|
| state: find backend node with its reproducible name
|
| When fixing up the kernels state nodes we depended on the full node path
| of the input device tree. This does not work when the kernel device tree
| has different names. This has happened lately when the i.MX6 device
| trees got their leading zeroes removed from the node names.
|
| Use of_find_node_by_reproducible_name() to find the node corresponding
| to the storage backend node in the kernel device tree.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
state: Add 'init_from_defaults' parameter
...
This ports the following barebox commit:
| commit 6a77d1c
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Wed May 4 12:01:05 2016 +0200
|
| state: Add 'init_from_defaults' parameter
|
| The init_from_defaults parameter allows to detect if a state has been
| initialized from default values, i.e. state_load failed.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
state: refactor variable type
...
This ports the following barebox commits and adjusts the handling of type
information of state variables in barebox-state:
| commit 7b3d284
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Mon Apr 3 22:51:58 2017 +0200
|
| state: remove unused variable type
|
| enum state_variable_type is never used. Remove it.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| commit 7126dff
| Author: Daniel Schultz <d.schultz@phytec.de>
| Date: Fri Nov 3 11:48:26 2017 +0100
|
| common: state: Add variable_type to state_variable
|
| Add a pointer in state_variable to the corresponding variable_type array
| element.
|
| Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| commit dc74265
| Author: Daniel Schultz <d.schultz@phytec.de>
| Date: Fri Nov 3 11:48:27 2017 +0100
|
| common: state: Add variable type as enum
|
| The variable_type struct holds a name of its type. Checking the type of
| a variable with this string needs much resources.
|
| This patch introduce a enum of the variable type for better type
| checking.
|
| Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
[rhi: fixed function parameter alignment in common/state/state_variables.c,
and submitted those changes as patches for barebox:
https://www.mail-archive.com/barebox@lists.infradead.org/msg29427.html
https://www.mail-archive.com/barebox@lists.infradead.org/msg29462.html ]
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
state: find device node from device path, not from device node path
...
This adds a dummy version of of_find_node_by_devpath() to make the linker happy
and ports the following barebox commit:
| commit e627903
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Thu Mar 30 16:33:26 2017 +0200
|
| state: find device node from device path, not from device node path
|
| The device node path may change from the internal device tree to the
| one Linux is started with, so using this path to fixup the tree is
| not very robust. Instead, use of_find_node_by_devpath() which has
| been created for exactly this purpose.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
2017-03-31 |
state: Allow to load without authentification
...
Sometimes it's useful to be able to load a state even when it
can't be authentificated. Add an option for this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: backend: Add more fields to struct state_backend_storage
...
To save a few function arguments.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: bucket: Make output more informative
...
Print offset and number of the bucket along with the bucket
specific messages to give a hint which bucket a message is for.
Also it's pretty much expected that buckets sometimes have no
data or need cleanup, so instead of complaining loudly, only
write which bucket is used and which buckets are cleaned up.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: Drop cache bucket
...
The cache bucket sits between the storage functions and the backend
storage. We only read from the storage once, so there is no need to cache
anything. The real purpose of the cache bucket is to keep the -EUCLEAN
information when a NAND block needs to be rewritten and to keep the read
buffers as long as the backend iterates over all buckets trying to find
the one we want to use.
This can be coded easier and more obvious in the backend code, so drop
the cache bucket.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: Convert all bufs to void *
...
A void * is a much better type for a buffer than a u8 * as it
can be casted to any other type implicitly. Convert all buffers
used by the state framework to void *.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: replace len_hint logic
...
The len_hint mechanism is rather hard to understand as it's not clear
from where to where the hint is passed and also it's not clear what
happens if the hint is empty or wrong.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: drop lazy_init
...
lazy_init is an optimization that makes it possible to read only up to
the first valid bucket when starting. However, when restoring consistency,
immediately afterwards we have we have to initialize all buckets anyway,
so being lazy doesn't give us any gain. Remove it to simplify the code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: pass struct state * to storage functions
...
We can get a state_backend_storage * and the device * from struct state,
so pass this to the storage functions rather than the two pointers.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: merge backend.c into state.c
...
The code in backend.c is too small to justify an extra file. Merge it
into state.c.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: Drop backend as extra struct type
...
struct state_backend is embedded into struct state. This additional
indirection does not have any real gain. Drop it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: backend: remove len_hint argument from state_storage_read
...
The argument is 0 in the only caller, so remove the argument.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: backend: remove .get_packed_len
...
.get_packed_len isn't implemented by any backend, so remove the
hook and its potential caller.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
barebox-state: Sync pieces with barebox
...
dev_add_param_bool are no-ops, save_on_shutdown is irrelevant for the
userspace part. Sync with barebox as of v2017.03.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: don't keep pointers to device tree nodes
...
Caching pointers to device tree nodes or is not save. The barebox internal
device tree may be changed by loading a new device tree or through fixup
handlers. As a result, the node may be deleted and replaced with a new one.
Keep a copy of the full path instead and resolve the node as needed.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Michael Olbrich
authored
on 16 Sep 2016
Sascha Hauer
committed
on 31 Mar 2017
|
state: make locally used function static
...
state_set_dirty() is only used in one file, make it static.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: Add state to state_variable
...
A state variable should know which state it belongs to. Add field
for it to struct state_variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: copy backend of_path string
...
Caching pointers to device tree nodes or names is not safe. The barebox
internal device tree may be changed by loading a new device tree or through
fixup handlers. As a result, the string may be deleted.
Use local copies of the full path instead.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Michael Olbrich
authored
on 16 Sep 2016
Sascha Hauer
committed
on 31 Mar 2017
|
Revert "barebox-state: Add force switch"
...
This reverts commit 89135e5 .
Sascha Hauer
committed
on 31 Mar 2017
|
2017-03-16 |
barebox-state: Add force switch
...
The force switch allows to read from a state even when the
keystore blobs cannot be read.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 16 Mar 2017
|
2016-07-05 |
Update barebox-state
...
Fixed direct bucket
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Markus Pargmann
committed
on 5 Jul 2016
|
2016-05-27 |
barebox-state: Import updated state code
...
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Markus Pargmann
committed
on 27 May 2016
|