The partition layout is board-specific, so only the barebox partitions
need to be in the fixed location expected by the MLO code.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
We need to wait some time between activating the ethernet and
being able to send the first frame. I have not investigated why
that is the case.
Fixes: SYS#488
Returning other values causes problems for client code which wants to
perform calculations with the returned value.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
state must be loaded after the nand driver, otherwise it fails because the
backend is missing. For similar reasons bootstate must come after state.
Move them to the late stage until barebox can do deferred probing.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
UBI devices used to show up with a dynamically assigned number
which is bad for scripting. After a 'ubiattach' a script cannot
know the number of the ubi to continue with. Change this to use
the parent mtd name and extend it with ".ubi".
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The ubi number is a dynamically assigned number, so once multiple
ubis are attached, scripts cannot know the ubi number they want
to detach anymore. Convert the ubidetach command to take the mtd
device file instead which is the same argument that was previously
passed to ubiattach.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When bootloader spec is used to boot devices it is often desirable
to boot the same image from different media. Since the fs images
need to contain the root= parameters to tell Linux where to boot
from the images can't be identical on different media.
This patch changes this by introducing a 'appendroot' option for
bootloader spec. If set to true, barebox will construct a Linux
commandline option for the device the bootloader spec entry is found
on.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Support for default/once entries was lost earlier. This fixes this
and also looks for default/once entries in the loader directory instead
of the loader parent directory. This keeps the bootloader spec files
together under a common loader directory.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.
This patch fixes the problem.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: v2015.06.0, commit:6da925f87c66cd9132018b4b08a84fa98c382aa7
The length of the data must fit into the remaining available space until the
next copy of the data.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch factors out the state_backend_raw_file_get_size() into a separate
function and adds some ifdefs to make this code work under Linux aswell.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch makes it easier to share the code with linux, on Linux the ease and
write size have to be aligned. Use stride (which is already aligned to erase
block size) during erase, align size_full to writesize and use it while
writing.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch renames the member "step" of the struct state_backend_raw to
"stride" and tries to clarifies its meaning.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Although there is the define RAW_BACKEND_COPIES, the state_backend_raw_save()
function silently assumes exactly two copies. This patch removes that assumtion
by looping over all copies, but saving the one we're read from at the end.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch registeres a DT fixup, that copies the statate nodes from the active
to the kernel DT. The backend reference will be a phandles.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[ukl: add call to of_unregister_fixup]
This patch improves the backend property, it can be either a phandle or a
of_path. During probe() of the state driver the backend property is
dereferenced and the resulting of_path is saved in the state context. In a
later patch it will be used to generate a phandle reference to the backend
during DT fixup.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch adds the functionality to export the description of the state, but
not the contents of the variables to a DT node. This will be used in a later
patch to "copy" the state description to the kernel device tree during DT
fixup.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This function is needed when a device that already registered a fixup in
the probe routine fails later to probe completely. Without unregistering
the fixup the function might later be called with invalid data.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:1431771149-27265-1-git-send-email-u.kleine-koenig@pengutronix.de