| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
backend-storage-type is irrelevant for mtd devices, so do not
complain about this option missing. The mtd backend will print
messages if necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's no need to check for the existence of the backend property as
this is done implicitly later anyway. With this check removed of_path
is only assigned, but never used. Remove the unused code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Although the elements of `source_aliases[]` are of type `const char *`,
the elements themselves are not const-qualified. Make them `const`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commands with aliases define an array of alias strings such as:
static const char *<cmd>_aliases[] = { "<alias1>", NULL};
Although the elements are of type `const char *`, the elements
themselves are not `const`-qualified. If the array is declared as:
static const char * const <cmd>_aliases[] = { "<alias1>", NULL};
then the compiler warns about const qualifiers being discarded. This is
because the `aliases` member of `struct command` is declared as `const
char *aliases;`.
Change the declaration of the `aliases` member of `struct command` to
`const char * const *aliases;` so that it can point to a `const` array
of `const char *`. Also change the declaration of the `aliases`
variable in `register_command()` to avoid unnecessary type casts.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In barebox the default mount path for a cdev is /mnt/<cdevname>
which can be mounted with "mount <cdevname>" without specifying
a target path explicitly. Simplify this further by creating automount
entries for the default mount pathes which makes a manual mount
completely unnecessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
The i.MX 6ull secures the fcb with bch 40. This is identical to i.MX 6ul.
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Needed for printing a correct error message when symbolic link
loops are encountered.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | | |
This reverts commit 35d8e858bea17ec4796069c9c27fd0b134125eaf.
|
| | |
| | |
| | |
| | | |
This reverts commit e4f81050e098074792730b61563538d9e394e3d6.
|
| | |
| | |
| | |
| | | |
This reverts commit 1b4a05c9263ae26083526acfabdea1ef96531a1d.
|
| | |
| | |
| | |
| | | |
This reverts commit 0071bacb4c7cab21c9fab8540f5aa9922a270a85.
|
| | |
| | |
| | |
| | | |
This reverts commit b378e8c9427b45d856d052a6df4a879a2cee670c.
|
| | |
| | |
| | |
| | | |
This reverts commit f655902cfad63b9ba5cea7d0c9fc9c3632143e02.
|
| | |
| | |
| | |
| | | |
This reverts commit eaf884ba55def055fd81ff3291a1a534fc8bd8f9.
|
| | |
| | |
| | |
| | | |
This reverts commit f8a177478c1b79e369ecc65501d9d15ff573339f.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ignore requests to switch to RATP mode in input-only or output-only
consoles.
This actually also avoids segfaulting later on:
#0 0x0000000000000000 in ?? ()
#1 0x000000000040b2a4 in console_send (r=<optimized out>, pkt=0x7fffffffd8ec, len=4) at common/ratp.c:102
#2 0x000000000042ab99 in ratp_behaviour_a (pkt=0x7ffff7298780, ri=0x7ffff72766d0) at lib/ratp.c:530
#3 ratp_state_machine (pkt=0x7ffff7298780, ri=0x7ffff72766d0) at lib/ratp.c:1384
#4 ratp_poll (ratp=0x7ffff7277ed8) at lib/ratp.c:1561
#5 0x000000000042b2ab in ratp_establish (ratp=ratp@entry=0x7ffff7277ed8, active=active@entry=false, timeout_ms=timeout_ms@entry=100) at lib/ratp.c:1645
#6 0x000000000040b888 in barebox_ratp (cdev=cdev@entry=0x7ffff7212bd0) at common/ratp.c:470
#7 0x00000000004046c3 in getc_raw () at common/console.c:416
...
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a new globalvar with a value is created and the corresponding
nvvar exists, then the globalvar gets the value of the nvvar, not
from the newly assigned value as expected.
nv quux=foo; global quux=bar; echo ${global.quux}
Should give "bar", not "foo". Fix this.
Reported-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nv variables with the form nv.dev.<devname>.<param> shall be mirrored to
the device parameter <param> of the device named <devname>. This is
broken since:
| commit 35d8e858bea17ec4796069c9c27fd0b134125eaf
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Thu Apr 6 15:23:56 2017 +0200
|
| nv: Do not create globalvars from nvvars
Fix this by attaching the setting of the mirror device parameter
directly to the nv device rather than to the global device.
Reported-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assigning the dummy clocksource in a initcall has the problem that
get_time_ns() crashes before that initcall is executed. This happens
when dmesg support is enabled in conjunction with CONFIG_DEBUG_INITCALLS.
In this case the dmesg code wants to have the timestamp of a log
message.
Solve this by setting the current clocksource to the dummy clock
statically and not at runtime. This way we always have a dummy
clock available.
Fixes:
commit 8972eb7ff17ad058a6c6018305bb912138ab0ca2
Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date: Fri Mar 3 13:34:02 2017 +0100
clocksource: move dummy clock source to init_clock
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
When the kernel device tree is fixed up we assume that it doesn't
have a state node, so we must also assume that it doesn't have
a alias. Create it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The userspace barebox-state utility gets confused when no alias exists.
Make the alias mandatory, so that people make it right^tm without having
to ask.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
People do not seem to know that a state node in the kernel
device tree will be overwritten by barebox. Print a warning
when this happens so that people can get an idea why changes
in the kernel device tree state node do not have any effect.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Arria10 is a SoC + FPGA like the Cyclone5 SoCFPGA that
is already supported in barebox.
Both a the same in some parts, but totaly different in
others. Most of the hardware blocks are the same in the
SoC parts. The OCRAM is larger on the Arria10 and the
SDRAM controller is different.
The serial core only supports 32bit accesses (different to
the 8bit accesses on the Cyclone5).
As Arria10 has 256KB of OCRAM, it is possible to fit a larger
barebox (and/or use PBL) instead of the two stage bootprocess
used on the Cyclone5 and its 64KB OCRAM.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Allow configuring the serial port and clock rate
instead of hardcoding it.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Similar to the device parameter functions also make the globalvar
functions more consistent. This also adds support for readonly
globalvars and changes several existing globalvars which should
really be readonly to readonly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch creates a consitent set of device parameter functions.
With this we have: dev_add_param_<type><access>
"type" is one of: int32, uint32, int64, uint64, string, mac, ipv4, enum, bitmask
The improvement here is that we now can exactly specify the width of the
int type parameters and also correctly distinguish between signed and
unsigned variables which means that a variable no longer ends up with
INT_MAX when it's assigned -1.
"access" can be empty for regular read/write parameter, "_ro" for readonly
parameters which get their value from a variable pointer in the
background or "_fixed" for parameters which are set to a fixed value
(without a pointer in the background).
Some more exotic types are not (yet) implemented, like
dev_add_param_ip_ro.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dev_add_param_string allows to pass a priv * so that the device_d *
argument is not needed and can be removed later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
nv_device isn't used outside of common/globalvar.c
so make it static.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When one of the xfuncs panics we can be a bit more informative. We
can at least print the amount of bytes we wanted to allocate and
how much memory we have left.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
imx6ul secure the fcb with bch 40. The imx-kobs tool use a own modified
bch lib. They reverse the bit order of the data and the ecc.
To use the bch lib in barebox the bytes in the data buffers must be
reversed.
The data layout on nand is bit aligned. But with 40 bits this is not an
issue for imx6ul now.
Signed-off-by: Jan Remmet <J.Remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At the moment barebox crashes if CONFIG_NVVAR is disabled
because of access to unregistered nv_device in
get_param_by_name(&nv_device, "version").
How to reproduce the crash:
barebox$ unset ARCH
barebox$ unset CROSS_COMPILE
barebox$ make sandbox_defconfig
barebox$ sed -i "s/CONFIG_ENV_HANDLING=y/# CONFIG_ENV_HANDLING is not set/" .config
barebox$ make oldconfig
barebox$ ./barebox
Segmentation fault
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In backend_format_raw_pack() digest_length is used before it's
initialized in backend_raw_digest_init() which results in a too small
memory allocation for the raw backend. Fix this and prevent a memory
corruption.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`state_backend_format_dtb_pack()` passes a buffer containing state
packed in flattened DTB format back to its caller via its `buf`
parameter. It then frees the buffer before returning. This means the
caller (`state_save()`) will be working on freed buffer contents before
freeing the buffer a second time itself. Fix it by removing the
spurious call to `free()`.
This should fix a bug reported by Norbert Wiedmann in
<http://lists.infradead.org/pipermail/barebox/2017-April/029980.html>.
Cc: Norbert Wiedmann <info@n-wiedmann.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
When the backend phandle cannot be resolved we jump to the error
return path without initializing ret. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set needs_refresh back to 0 after refreshing so that we do not refresh
it again without need. This would only happen when we read the state
from the storage multiple times, which normally is not the case.
However, it's more consistent like this.
Reported-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
buf was just allocated, free it before returning an error.
Reported-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
Bootchooser isn't worth much without the boot infrastructure, also
it needs at least the simple shell variant to be enabled.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|