| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
state_set_dirty() is only used in one file, make it static.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The different dev_add_param_* calls all use different types as private
data. This is unnecessary, use struct state_variable * for all of them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This reverts commit 898a46705d8e672932e8668149e94bb0c9f9a878.
|
|
|
|
| |
This reverts commit 89135e5522720bc75615a6ec22bb8bcb7b4994e2.
|
|
|
|
|
|
|
|
|
|
|
| |
These structs are used for on-storage data layouts. They should be not
affected by different integer precisions and alignment optimizations of
32bit or 64bit machines. Using the architecture independent integer data
types, like uint32_t, achieves the former, using the packed attribute
the later.
Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
-EUCLEAN returned from state_mtd_peb_read() means that the
data shall still be used. This fixes initialization of buckets
which need cleanup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
When the raw device returns -EUCLEAN we have to return
successfully to the upper layer, otherwise it will discard the
data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This makes no sense in the user space tool, remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
We already use pr_* and dev_* functions. Replace some more
fprintf(stderr,...) with appropriate pr_* function calls. Also
provide control over which urgency level is printed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
src/libdt.c: In function ‘of_print_property’:
src/libdt.c:97:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘const void *’ [-Wformat=]
Calm the compiler with an explicit cast.
|
| |
|
|
|
|
|
|
| |
If a backing device for a partition is neither an eeprom nor an mtd nor a
block device I don't know what it should be. Still fall back to the generic
case where the partition doesn't have a related of_node.
|
|
|
|
|
|
|
| |
So the function should return success and not fall back to the "there is no
associated device" case.
Fixes: d83976b8163d ("libdt: add block devicepath extraction")
|
|
|
|
|
|
|
|
|
| |
This reduces indention level and makes the code more easy to follow.
There is no semantic change (but now it's obvious there is a bug which
is fixed in the next commit).
Fixes: d83976b8163d ("libdt: add block devicepath extraction")
|
|
|
|
| |
Fixes: 53df62ae2fe3 ("state: describe backend with phandle")
|
|
|
|
|
|
|
| |
Writes are always beginning at a page and pages can't be erased.
It's 'eraseblock' that is meant here.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
|
|
|
|
|
|
| |
This patch fixes commit d4c997a3.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
|
|
|
|
|
|
|
| |
It's used later while setting state variables.
Fixes: feb64890a302 ("barebox-state: fall back to /state if there is no alias defined")
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
state_get() already supports this if no state name is given. This just
removes the default state name to make use of this feature.
Without this, an alias named 'state' is needed for barebox-state work
without specifying the state node.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Only devices of certain subsystems can have device nodes. Limit
the enumeration to these subsystems, namely platform, i2c, spi
and mtd. pci maybe missing here, but let's see once we are there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Scanning udev for devices with a OF_FULLNAME property can take
a long time. Since we may do this multiple times cache the results
during first run to speed up subsequent runs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
This make barebox-state return non-zero exit-code in case of a missing
parameter (':') or an invalid/unknown argument ('?').
No extra printing of error messages is performed as this is handled by
getopt itself in this configuration.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Tested-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
|
|
|
| |
676e2a13e90fb8bf37d6777dc3d21d2406916885 accidentally
removed the printf call.
Signed-off-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows barebox state to find the backend node on block
devices.
This is a reworked version of the patch. The outdated patch
did not specify the parent correctly resulting in an
incorrect subtree. This lead to the wrong block device
being returned.
Signed-off-by: Bastian Stender <bst@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
The reset values had bits set that were not in the writeable mask.
|
|
|
|
|
|
| |
Fixed direct bucket
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
|
|
|
| |
barebox-state outputs should be parsable by other applications.
Therefore normal info outputs should be redirected to stderr.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|