9
0
Fork 0
Commit Graph

70 Commits

Author SHA1 Message Date
Sascha Hauer bed8fb6de1 Add in-system barebox update infrastructure
Currently in-system update means to write an arbitrary file to
an arbitrary device. There is no sanity check if the flashed image
is of the right type or will fit onto the device. Furthermore some
SoCs need a special preparation step for their images before
flashing them.

This adds a barebox in-system update infrastructure. Boards can
register update handlers which know how to make the board bootable.
The available handlers can be listed to be able to select one,
different force levels give the user the chance to know it better.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:23:41 +02:00
Sascha Hauer c797f3c168 commands: Add clk commands
This adds some basic commands to manupulate clocks on the command
line. Right now we have:

- clk_set_parent
- clk_set_rate
- clk_enable
- clk_disable
- clk_dump

The commands work based on the clock name, otherwise they behave like
the Linux Kernel C functions. clk_dump will dump the clocktree to the
console.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:55 +02:00
Sascha Hauer edf068e9cf Merge branch 'for-next/tftp' 2012-10-03 21:17:39 +02:00
Sascha Hauer 4183b9ab58 net: Add tftp command which uses the new tftp code
Traditionally tftp is a command of its own. Since we can
mount tftp as a filesystem we have duplicated the tftp code, the old
code is used by the tftp command, the new by the filesystem support.
This adds a tftp command based on the filesystem support to preserve
backward compatibility. This allows us to remove the old tftp support
in the next step.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:23:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD a87361dfc3 bmp: rename it to splash
so be can add more format support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:16:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD bf32bc1d9a command: add ln support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD 69a4ea15db command: add readlink support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD d6a50c915f stddev: make it selectable via Kconfig
enable is by default for simple and hush
we do not need to NO_SHELL

this allow to save 1KiB

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 10:06:30 +02:00
Sascha Hauer 4f5862d884 Merge branch 'for-next/poweroff' 2012-07-02 11:04:44 +02:00
Sascha Hauer 62fe47768b Merge branch 'for-next/devnull'
Conflicts:
	commands/mem.c
2012-07-02 11:04:25 +02:00
Sascha Hauer 7f9fc3dbd0 Merge branch 'for-next/watchdog' 2012-07-02 10:59:45 +02:00
Sascha Hauer 6e4b15537b Merge branch 'for-next/misc' 2012-07-02 10:59:30 +02:00
Sascha Hauer c7419bb247 Add dirname command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:59 +02:00
Sascha Hauer 814bc438ce Add basename command
The basename command allows to set an environment variable with
the basename of a path.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:59 +02:00
Antony Pavlov b78f4c986f add 'poweroff' command
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:25 +02:00
Steffen Trumtrar bf5eb000b3 commands: add msleep command
Add a command to sleep for n milliseconds.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Alexander Shiyan 0e4fdcc81b Move /dev/zero to separate unit
This patch allows to present "/dev/zero" always in system and not
depending  of mem-command. Standard files allow to test other memory
devices, not only "mem", such as NOR, NAND, MCI-devices e.t.c.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:01 +02:00
Juergen Beisert 2928591eab Add a simple watchdog framework
This patch adds a simple wd command which can setup, trigger and stop a watchdog
on the platform.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-29 15:16:34 +02:00
Sascha Hauer b8c94a1561 add 'global' command
This implements global shell variable support. This is done by registering
a new device named 'global', so global variables are just plain device
parameters.
Global variables are useful for storing the global state in the environment.
Currently we do this by sourcing scripts instead of executing them which is
quite limiting.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 08:57:01 +02:00
Sascha Hauer b5e5b06d8b Add automount support
This patch adds an automount command which makes it possible
to execute a script when a certain directory is first accessed.
It's the commands responsibility to make this directory available
(bringing devices up and mounting it). This results in automount
support which makes sure that from the shell every file can
be accessed without having to care for device bringup. Bringing
up devices may be expensive (USB, dhcp). The automount support
makes it easy for the environment to bringup devices when they
are actually needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-18 15:03:26 +01:00
Alexander Aring 12fa9c5024 nandtest: add nandtest command
Add nandtest command to test nand devices
and display ecc stats at the end of test.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:25:27 +01:00
Eric Bénard f7aaa22493 serial gadget: enable/disable on request
- add a usbserial command to enable/disable the serial gadget
- allow dfu and usbserial to cohexist in the same barebox
- add a timeout in u_serial so that we don't get locked if the user
enable usbserial from a UART console but doesn't consume the data
on the usbserial port created on the PC
- remove debug or verbose printf
- tested on i.MX25 & i.MX35 & usb-a926x

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:18:46 +01:00
Sascha Hauer e90f67881e remove now obsolete iminfo command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:07:15 +01:00
Sascha Hauer 1d1618a11b add uimage command
The uimage command superseeds the iminfo command. Unlike
the iminfo command the uimage command can also be used
to verify the data crc on demand and to extract uImages
to files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:07:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1e06aef681 sanbox: add linux_execve and linux_exec command
this will allow to execute a program of the host from barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-07 10:35:01 +01:00
Sascha Hauer 32f163f67c add iomem command to show iomem usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-03 10:09:29 +01:00
Sascha Hauer 1f56f81711 add generic uncompress command
Using the new uncompress function we can now implement a command which
can uncompress all known compression types. This supplements the unlzo
command.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:12:42 +01:00
Sascha Hauer ac4854be5e factor out iminfo command
The rests of U-Boots iminfo command are sitting in commands/bootm.c and
are in a nonusable state. Factor it out to its own file and make it work
again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 020a30be0d add magicvar command
The magicvar command gives an overview about all environment variables
with a special meaning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:31 +01:00
Sascha Hauer c0f9d1bad2 initial oftree command support
This adds basic device tree command support. So far we can
parse a flat device tree (-p), which also stores the tree
in memory, dump it (-d) and free (-f) the internally stored tree.

The chosen node can be updated with barebox bootargs, no other
device tree manipulation is implemented yet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:48 +02:00
Antony Pavlov 7d9ee32f05 commands/loads.c: make it compile again
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-23 08:33:24 +02:00
Sascha Hauer 5de95712d9 Add 'time' command to measure execution time of a command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-03 09:16:29 +02:00
Peter Korsgaard 373de3c1c4 commands: add md5/sha1/sha256sum commands using the digest api
The interface emulates the Linux commands, except that you can
specify a sub area - E.G.:

barebox:/ md5sum /dev/fd0 2M+1M /env/config /env/bin/boot 10+2
61c4c0180b044191d28f27545f43562f  /dev/fd0	0x00200000 ... 0x00300000
908b84bcbadd2f263583a65ff31d1cad  /env/config	0x00000000 ... 0x000003a7
f23bd15825cc5006cf5f9fd486d82d2d  /env/bin/boot	0x0000000a ... 0x0000000c

Adds around 1400 bytes (+ size of digest code) with everything enabled.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-05-19 20:36:22 +02:00
Sascha Hauer 7c15f466df commands: seperate usb command from usb core
This patch makes the USB command optional and makes usb_rescan a
global function. This way we can use USB in noninteractive
environments.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:26 +02:00
Sascha Hauer 17a1d71152 commands: Make nand command optional
The nand command is for bad block handling which some do not need.
So make it optional, but with default y.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:40:01 +02:00
Sascha Hauer c840feead1 LED: Add trigger command
This patch allows controlling LED triggers vie the command line.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-20 09:57:36 +01:00
Sascha Hauer 5323cbbbfd LED: Add led command
This patch allows controlling LEDs via the command line.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-20 09:57:36 +01:00
Jean-Christophe PLAGNIOL-VILLARD 782e5fe50f add login support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8b611f099a add passwd command
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD b712b26632 Add Menu Framework
Introduce a menu framework that allow us to create list menu to simplify
barebox and make it more user-frendly

This kind of menu is very usefull when you do not have a keyboard or a
serial console attached to your board to allow you to interract with
barebox

For the develloper part,
The framework introduce two API

1) C
that allow you to create menu, submenu, entry and complex menu action

2) Command
that allow you as the C API to create menu, submenu, entry and complex
menu action but this time the actions will be store in a function and
then be evaluated and excecuted at runtime.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-30 20:57:20 +02:00
Sascha Hauer 1af56abc0c Add UBI commands: ubiattach, ubidetach, ubimkvol, ubirmvol
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 15:07:51 +02:00
Eric Bénard c70443b5c7 commands: add i2c commands
theses commands allow low level access to i2c bus and can be useful
to setup an i2c device without having to add code, compile and flash
barebox.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-26 10:34:58 +02:00
Sascha Hauer 6d079ae2ca add unlzo support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Juergen Beisert 7081093531 Add a special command to load and start a bzImage on x86
Other architectures are supporting the uImage format used by barebox's 'bootm'
command. x86 does'nt. So, we need a special command to be able to boot the
x86 specific bzImage format.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Robert P. J. Day 28e497d52b commands: Remove reference to non-existent CONFIG_CMD_I2C.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 12:21:30 +01:00
Robert P. J. Day 94f8b42c4f commands: correct "CONFIG_SIMPLE_PARSER" to "CONFIG_SHELL_SIMPLE".
Based on suggestion from S. Hauer, fix the obvious typo in
commands/Makefile.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 11:45:38 +01:00
Sascha Hauer 9520362888 command line gpio support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 11740dc01b remove obsolete and broken command 'splash'
Has been replaced with 'bmp'

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer d9345607aa Add USB device support
This patch adds support for USB devices. It uses
the Linux Kernel gadget API. Along with this patch
comes driver support for the Freescale (arc) USB OTG
Core and USB Device Firmware Update (DFU)
The serial gadget support is not working at the moment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 14:31:26 +02:00
Sascha Hauer ce0d6995f6 framebuffer: Add bmp command to show bmp files
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-31 15:08:49 +02:00