9
0
Fork 0
Commit Graph

236 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 4c29a9511b efi: move x86 efi boot support to x86 arch
prepare to drop the efi arch as efi boot up is not arch sepecific

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-27 08:33:14 +01:00
Marc Kleine-Budde cc532a3f73 boot: add framework for redundant boot scenarios
There are several use cases where a redundant Linux system is needed. The
barebox bootchooser framework provides the building blocks to model different
use cases without the need to start from the scratch over and over again.

The bootchooser works on abstract boot targets, each with a set of properties
and implements an algorithm which selects the highest priority target to boot.

See the documentation contained in this patch for more information.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:44:23 +02:00
Christian Hemp e37faaf185 commands/Kconfig: fix typo in CMD_OF_FIXUP_STATUS help
The command is of_fixup_status and not of_fixup_node.

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-22 07:48:30 +02:00
Sascha Hauer 94e7bdcd9a Merge branch 'for-next/boot' 2016-08-03 08:08:22 +02:00
Sascha Hauer 89c8ac578f boot: Move code to common/
Normally code in commands/ shall only do the option parsing whereas the
functionality shall be in common/ to make the code usable from C aswell.
Do this in the boot code aswell, move it to common/boot.c and add the
function prototypes to include/boot.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Lucas Stach c77af5e5cb commands: fbtest: select IMAGE_RENDERER
2D_PRIMITIVES needs IMAGE_RENDERER.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:21:16 +02:00
Andrey Smirnov c957ace732 GUI: Add fbtest command
Add 'fbtest' - a command to produce test patterns on a screen

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:33:53 +02:00
Sascha Hauer 2b948a834c Merge branch 'for-next/bootm' 2016-06-14 09:13:35 +02:00
Andrey Smirnov 0462427436 commands: Add 'hwmon' command
Add 'hwmon' command which allows to display the readings of all
hardware monitoring sensors registered with Barebox.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-18 07:47:51 +02:00
Sascha Hauer 7839011f61 bootm: Move bootm options to common/Kconfig
bootm has a C API, so the bootm options have to depend on the
option providing the bootm code (CONFIG_BOOTM), not on the
option providing the command (CONFIG_CMD_BOOTM). Fixing the
dependencies makes it possible to fully use bootm from C without
enabling the bootm command support.
This also removes the CMD_ prefix from the options which means
we have to update the defconfigs aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 14:51:58 +02:00
Sascha Hauer 06f5a7c9ad Merge branch 'for-next/ubiformat' 2016-05-09 08:50:02 +02:00
Sascha Hauer 4cb8e17aa3 Merge branch 'for-next/misc' 2016-05-09 08:49:43 +02:00
Sascha Hauer acd643788b Kconfig: Create Kconfig symbol for NVVAR
nvvar support not only needs globalvar, but also persistent
environment storage. Add a separate default-y option which
depends on ENV_HANDLING for this case. Make the option visible
to let the user decide whether he wants to have this option
and add a help text to make this decision easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-28 16:43:15 +02:00
Sascha Hauer 9a7b5d4cdc Kconfig: Make ENV_HANDLING visible
ENV_HANDLING is usable even without explicit loadenv/saveenv command
support. Instead of selecting this option from loadenv/saveenv, make
this option visible. loadenv/saveenv can then depend on ENV_HANDLING
rather than selecting it. This reduces Kconfig dependencies hassles.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-28 16:43:15 +02:00
Sascha Hauer 5c32248bec Kconfig: Make GLOBALVAR visible
Currently global environment variables are only enabled when the
"global" command is enabled. In fact, they could be used even with
the "global" command disabled, so make the GLOBALVAR option visible.
While at it, add a help text for this option.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-28 16:43:15 +02:00
Sascha Hauer 893228f66c commands: ubiformat: move code to common/
This is the final step to separate the ubiformat code from the
command. With this the ubiformat code gains a C API.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-26 08:08:25 +02:00
Sascha Hauer 4ec00a9b3d move FLEXIBLE_BOOTARGS from commands/ to common/
FLEXIBLE_BOOTARGS also works without command support being enabled.
Move this option from commands/Kconfig to common/Kconfig so that
it doesn't depend on COMMAND_SUPPORT.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-25 13:37:38 +02:00
Sascha Hauer 1e6955fdb8 commands: Create nand_bitflip command
This adds a command to flip bits in a Nand flash. This is useful for
testing purposes to check if flipped bits are corrected and if the
driver returns the correct number of bitflips.

The command writes a configurable number of bitflips to a single Nand
page. If the -r option is not given the results are reproducible, so
calling the same command twice will revert the bitflips.

The command uses the raw read/write Nand operations which are probably
less tested than the regular read/write operations, so the command may
produce surprising results.

As of writing the command has been tested with the GPMI Nand driver and
the imx-nand driver with fixes posted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-06 10:17:53 +02:00
Sascha Hauer 81b52d93cb remove now unused libmtd
The only user of libmtd was ubiformat which now uses the mtd-peb API,
so remove the now unused libmtd.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-06 10:17:52 +02:00
Teresa Remmet 11c0f8159d commands: Add of_fixup_status
of_fixup_status enables or disables the status property of a
given node with a device tree fixup.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 08:25:48 +01:00
Jan Luebbe ac55adb321 bootm: add initial FIT support
This implementation is inspired by U-Boot's FIT support. Instead of
using libfdt (which does not exist in barebox), configuration signatures
are verified by using a simplified DT parser based on barebox's own
code.

Currently, only signed configurations with hashed images are supported,
as the other variants are less useful for verified boot. Compatible FIT
images can be created using U-Boot's mkimage tool.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:42 +01:00
Wjatscheslaw Stoljarski eda3453331 readline: Kconfig: fix typo
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 07:53:13 +01:00
Daniel Schultz 319d5c1ffc commands: Add MMC ext. CSD register tool
This tools can read/write to the extended CSD register of MMC devices.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-24 19:33:27 +02:00
Sascha Hauer 049fb66d21 Merge branch 'for-next/login' 2015-09-01 09:43:54 +02:00
Sascha Hauer 2b5bdb47cf crypto: fix selecting of digests
SHA1 is meant as a boolean option which is true when sha1 support is available.
This works because the providers (DIGEST_SHA1_GENERIC and DIGEST_SHA1_ARM) have
a 'select SHA1'. However, consumers like the sha1sum command do a 'select SHA1'
to enable SHA1 support. This of course does not work; selecting SHA1 will not
select any of the SHA1 providers.

This is broken for all digest consumers. We have to explicitly select a digest
provider, that is DIGEST_*_GENERIC to enable the corresponding digest.

This means now we will always have the generic digest in the binary, even
when an optimized one is enabled. There is no sane way in Kconfig to
"select provider for feature xy", so let's live with the overhead in the binary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:30 +02:00
Sascha Hauer 960a6feb9a splash command: depend on CONFIG_VIDEO
The splash command only makes sense with framebuffer support enabled, so
add the corresponding dependency to Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-20 12:57:07 +02:00
Sascha Hauer fd58dc84cb Merge branch 'for-next/spd' 2015-08-06 12:33:24 +02:00
Daniel Schultz 99b03a709d commands: Add dhrystone
This tool will help to measure the system performance.

Some SoCs haven't the possibility to route their clocks to the output pins.
So you can use dhrystone to get a feedback about the clock speed.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-06 12:30:17 +02:00
Alexander Smirnov 5a7deee7d5 commands: add spd_decode command
spd_decode command is used for decoding and printing
in human-readable format the information found
in memory module SPD EEPROMs.

There is the decode-dimms program from i2c-tools linux
package (see http://www.lm-sensors.org/wiki/I2CTools)
just for the same purpose.

Though spd_decode source code is based on decode-dimms
perl code there is a difference.

Signed-off-by: Alexander Smirnov <alllecs@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-14 07:09:19 +02:00
Wadim Egorov e9bd26c7a7 net: dhcp: Split dhcp funcionality & add dhcp command
dhcp/bootp was bound to the command functionality.
This patch splits the dhcp command.
We are now able to use bootp without a shell.

This patch adds also a check for environment variables and globalvar.
So only when ENVIRONMENT_VARIABLES and GLOBALVAR is set, all received
dhcp data will be stored.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-05 13:32:39 +02:00
Marc Kleine-Budde 82d21cf155 commands/Kconfig: fix typo in CMD_BOOTM_OFTREE help
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 09:19:31 +02:00
Sascha Hauer ee0035e5cc Merge branch 'for-next/state' 2015-04-13 12:57:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD b0be99fc10 command: add generic digest command
That can be used for digest calculation and verify

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-20 11:45:55 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1f91b3e6da command: rename digest.c to hashsum.c
as I'll add a new generic command named digest

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-19 07:46:22 +01:00
Sascha Hauer 1487e6b9ad state: add framework for persistent state handling
This patch adds a framework to describe, access, store and restore a set of
variables. A state variable set can be fully described in a devicetree node.
This node could be part of the regular devicetree blob or it could be an extra
devicetree solely for the state. The state variable set contains variables of
different types and a place to store the variable set.

For more information see:
    Documentation/devicetree/bindings/barebox/barebox,state.rst

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 08:28:31 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2505dd9b41 command: add sha384sum and sha512sum support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-12 07:58:24 +01:00
Wadim Egorov f0f6a7477b Fix spelling: pathes -> paths
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:02:56 +01:00
Sascha Hauer 9b1d12fff0 Merge branch 'for-next/randconfig' 2014-12-08 14:54:11 +01:00
Sascha Hauer 3eade89c75 Merge branch 'for-next/persistent-vars'
Conflicts:
	arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/config
2014-12-08 14:54:09 +01:00
Sascha Hauer c2b5a7015b Merge branch 'for-next/misc' 2014-12-08 14:53:59 +01:00
Sascha Hauer 7a9bf3b079 command: load[sbxy]: Depend on CONSOLE_FULL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:15:00 +01:00
Sascha Hauer 2fd1b13969 command: dmesg: depend on !CONSOLE_NONE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 14:34:01 +01:00
Sascha Hauer 8c3b230807 command: passwd: depend on CMD_LOGIN rather than selecting it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 14:33:57 +01:00
Sascha Hauer d014f7fd0f command: login: depend on !CONSOLE_NONE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 14:33:52 +01:00
Jan Weitzel 8e2c7b3de3 xymodem: select CRC16 from lib
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-12 09:22:22 +01:00
Sascha Hauer b25d333493 Add defaultenv command
This adds a command to explicitly restore the environment (or
parts thereof) from the default environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 12:23:12 +01:00
Sascha Hauer 3249006a2f Add support for non volatile variables
This adds (back) support for non volatile variables. Non volatile
variables are variables which are stored in the environment over
reboot. They are used in the same way as the global variables, but
with a 'nv' command and device. The variables are stored under
/env/nv/, one variable per file. Adding a nv variable automatically
adds a global variable with the same name. Changing a nv variable
also changes the same global variable, but not the other way round.
This allows for example to configure the username as:

nv user=sha; saveenv

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:54 +01:00
Sascha Hauer 6aaba64b0c commands: implement 'cmp' command
This command compares two files. It does not show the differences,
it only returns successfully if both files are identical and with
an error if they differ.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:36:19 +01:00
Robert Schwebel 3b0b828186 commands: select FILE_LIST for usbgadget
Otherwhise we get this error message:

commands/built-in.o: In function `do_usbgadget':
barebox-2014.10.0/commands/usbgadget.c:77: undefined reference to `file_list_parse'

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-06 07:44:20 +02:00
Sascha Hauer 9d7cd03e2a Merge branch 'for-next/of' 2014-10-02 08:54:42 +02:00