9
0
Fork 0
Commit Graph

207 Commits

Author SHA1 Message Date
Marc Kleine-Budde 6a11cd1539 bootstate: add framework for redundant boot scenarios
There are several use cases where a redundant Linux system is needed. The
barebox,bootstate framework provides the building blocks to model different
use cases without the need to start from the scratch over and over again.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-06-10 13:42:33 +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
Sascha Hauer d0064495d3 Merge branch 'for-next/firmware' 2014-10-02 08:54:41 +02:00
Teresa Gámez d21f496aba commands: add of_display_timings
A lot of boards use display-timings nodes to define the timings of one or more
displays. This command makes it possible to list and select displays which are
defined in a device tree.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-01 08:13:02 +02:00
Sascha Hauer 930ce6e142 Introduce message logging support
This adds a buffer for log messages and a 'dmesg' command to
print the messages. The log buffer is implemented as log objects
rather than a string buffer. This makes it easy to implement
limiting the messages, cleaning the buffer and timestamping
the messages.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 15:33:22 +02:00
Juergen Beisert a6982e2e26 Add a Firmware programming framework
This framework handles a list of registered Firmware programming handlers
to unify a firmware programming interface by hiding the details how
to program a specific Firmware in its handler. This is created with FPGAs
in mind but should be usable for other devices aswell.
A user has two possibilities to load a firmware. A device file is create
under /dev/ which can be used to copy a firmware to. Additionally a
firmwareload command is introduced which can list the registered firmware
handlers and also to upload a firmware.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-09 10:30:25 +02:00
Sascha Hauer 7782c08047 Merge branch 'for-next/usb-gadget'
Conflicts:
	commands/Makefile
	common/Kconfig
	common/Makefile
	drivers/usb/gadget/dfu.c
2014-08-07 20:34:28 +02:00
Sascha Hauer 038be0fbb5 Merge branch 'for-next/usb' 2014-08-07 13:13:47 +02:00
Sascha Hauer 9cce00617b Merge branch 'for-next/rtc'
Conflicts:
	arch/mips/dts/jz4755.dtsi
	commands/Makefile
2014-08-07 13:13:45 +02:00
Sascha Hauer 5b7b7ee5d9 Merge branch 'for-next/metadata'
Conflicts:
	arch/arm/dts/Makefile
	common/Makefile
	lib/Makefile
2014-08-07 06:15:16 +02:00
Sascha Hauer 97e81f2d78 Add support for metadata in barebox images
It's often useful to get some information about a barebox image
before starting or flashing it. This patch introduces barebox
Image MetaData (IMD). When enabled a barebox image will contain
a list of tags containing the desired information. We have tags
for:

- the barebox release (2014.07.0-00160-g035de50-dirty)
- the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014)
- the board model the image is intended for
- the device tree toplevel compatible property

Also there is an additional generic key-value store which stores
parameters for which no dedicated tag exists. In this patch it
is used for the memory size an image supports.

Since there is no fixed offset in a barebox image which can be
used for storing the information, the metadata is stored somewhere
in the image and found by iterating over the image. This works
for most image types, but obviously not for SoC images which are
encoded or encrypted in some way.

There is a 'imd' tool compiled from the same sources for barebox,
for the compile host and for the target, so the metadata information
is available whereever needed.

For device tree boards the model and of_compatible tags are automatically
generated.

Example output of the imd tool for a Phytec phyFLEX image:

build: #889 Wed Jul 30 16:08:54 CEST 2014
release: 2014.07.0-00167-g6b2070d-dirty
parameter: memsize=1024
of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl
model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:52 +02:00
Ezequiel Garcia 8df8a3d7a9 trivial: Correct word spelling, s/miscelleanous/miscellaneous
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-04 20:24:15 +02:00
Antony Pavlov 2bcf7f4dc8 commands: add hwclock
The hwclock command allows to query or set the hardware clock (RTC).

Barebox' 'hwclock' command uses busybox' 'date' compatible
time format ccyymmddHHMM[.SS]:

  # /bin/busybox date -s 201407292005.41 ; /bin/date
  Tue Jul 29 20:05:41 MSK 2014
  Tue Jul 29 20:05:41 MSK 2014

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-02 06:45:43 +02:00
Sascha Hauer bfb7aa1e19 USB: gadget: Add a multi function gadget
Similar to the Kernel multi function this gadget driver is used
for creating a USB device with multiple functions. This is
created and removed with the newly created 'usbgadget' command.
Based on the options it creates combinations of DFU, fastboot
and serial USB functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:56 +02:00
Sascha Hauer 4a872ae0ff USB: Kconfig: introduce USB_HOST symbol
This renames USB to USB_HOST since this is what the symbol really
means. Introduce a USB symbol which is selected by both USB_GADGET
and USB_HOST. This gives us a symbol to let common USB code depend
on.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-18 14:42:35 +02:00
Robert P. J. Day 600d312707 at91mux: Fix both help info and Kconfig info.
Correct options are, in fact, -p and -b.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-07 10:02:11 +02:00
Robert P. J. Day 01d3c9a5ed Clean up Kconfig and source for a couple device tree commands.
Correct options listings for a couple device tree-related commands.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-07 08:32:55 +02:00
Antony Pavlov 7a9bfaadab commands: add 'lspci' command
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Holger Schurig 93ba05b5fd bootm: beautify output
* fix indentation of options in 'help bootm'
* add missing help for -m
* put some output into debug/verbose mode

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:12 +02:00
Holger Schurig bfd5d7f112 misc: upper-case some abbreviations
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:12 +02:00
Holger Schurig c19c0da71c drvlist: factor the driver list out of 'devinfo'
The command 'devinfo' was first spitting out all devices, and then
also all drivers. This patch separates them into two commands,
'devinfo' as before, and also the new command 'drvinfo'

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:06:45 +02:00
Sascha Hauer c72a0504c9 oftree: remove dump support
This can now be done with the of_dump command.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:09:13 +02:00
Sascha Hauer 9cd128d6be commands: add of_dump command
The oftree command is overloaded. This adds a dedicated command
which only dumps devicetrees to the console so that the corresponding
functionality in the oftree command can be removed in the next step.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:09:09 +02:00
Holger Schurig 2071940c76 commands: move CONFIG_LONGHELP to commands/Kconfig
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:49 +02:00
Holger Schurig fc0f7eec82 commands: move CMD_IFUP to commands/Kconfig
* this places the command into the "Network commands"
  section of Kconfig
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:49 +02:00
Holger Schurig c524f74d5b commands: NET_DHCP -> CMD_DHCP
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Network commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:49 +02:00
Holger Schurig 5bd055b660 commands: NET_PING -> CMD_PING
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Network commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Holger Schurig 86dda115a7 commands: introduce CMD_HOST
... because NET_RESOLV can be used alone to turn on the functionality
of resolv().

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Holger Schurig c3e8dae409 commands: let all network commands depend on NET
... by using an "if NET" ... "endif" clause.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Holger Schurig 26a34100e8 commands: HUSH_GETOPT -> CMD_GETOPT
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Shell scripting commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Holger Schurig 6e3a969106 commands: move CMD_AT91MIX to commands/Kconfig
* this places the command into the "Information commands"
  section of Kconfig
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00