9
0
Fork 0
Commit Graph

950 Commits

Author SHA1 Message Date
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 837e517669 cp: Add recursive copy
This adds the -r option to the cp command.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:55 +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 fe39e8aadc magicvar: Add support for dynamically added magicvars
Add support to add a new magicvar using the magicvar command.
This is useful for magicvars assigned and used only in the
environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:54 +01:00
Sascha Hauer 7b4cc54579 Merge branch 'for-next/tegra' 2014-11-05 15:47:39 +01:00
Sascha Hauer da1a9005c2 Merge branch 'for-next/fs' 2014-11-05 15:47:38 +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
Sascha Hauer 15f8f9282e saveenv: Fix saving to specified file
Since e805b7d saveenv: provide a zeroed/empty/ignore environment
barebox no longer honors the file argument when the directory
argument is also givin. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-23 23:02:57 +02:00
Steffen Trumtrar 11632790da commands: firmwareload: add CMD_GROUP
To be able to build the documentation the CMD_GROUP macro needs
to be defined. Without this the firmwareload command breaks "make docs".

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-10 08:36:32 +02:00
Lucas Stach 9b93e2aa59 commands: lspci: go down into subordinate busses
This way we also list devices that are behind
bridges.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02: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
Sascha Hauer 9fd083eae1 Merge branch 'for-next/dmesg' 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
Wjatscheslaw Stoljarski 68805a19b9 commands: usb: drop help for force rescan option
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:45:18 +02:00
Teresa Gámez 48199fd57c commands: of_dump: Fix return value
In an error case the return value is set nicely
but 0 is always beeing returned.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-12 07:42:29 +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
Jan Weitzel 8446708391 commands: of_dump switch to get fixed devictree
Add a switch to get the devicetree processed by the registered fixups.
This is also whats the kernel gets.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-01 12:40:53 +02:00
Michael Grzeschik 57bba7bcda ubi: add setting devnum to ubiattach
Sometimes we need to have a defined devicenumber for the ubi partitions.
This patch adds the option to ubiattach.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-01 09:49:35 +02:00
Sascha Hauer 45615e3ec1 Merge branch 'for-next/usb-host'
Conflicts:
	drivers/usb/core/Makefile
2014-08-07 20:34:39 +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 c138893990 Merge branch 'for-next/led' 2014-08-07 06:14:59 +02:00
Sascha Hauer f64760777b Merge branch 'for-next/i2c' 2014-08-07 06:14:58 +02:00
Sascha Hauer 50d10b224e Merge branch 'for-next/env' 2014-08-07 06:14:58 +02:00
Sascha Hauer 8a11a59b37 Merge branch 'for-next/efi'
Conflicts:
	.gitignore
	Makefile
	drivers/serial/Makefile
2014-08-07 06:14:56 +02:00
Sascha Hauer 8b464dc6ee Merge branch 'for-next/doc'
Conflicts:
	Makefile
2014-08-07 06:14:27 +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
Sascha Hauer 3cfa4bc00c move file helper functions to separate file
We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:51 +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 14963b8c46 Merge branch 'for-next/i2c' into HEAD 2014-08-02 06:45:39 +02:00
Sascha Hauer 95bd1a07a3 commands: saveenv: Fix comment about directories in help text
envfs indeed handles directories, at least since 2007:

| commit 913691eccd
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Tue Sep 25 12:58:52 2007 +0200
|
|     add directory handling for environment

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:24:01 +02:00
Juergen Borleis e805b7dcb0 saveenv: provide a zeroed/empty/ignore environment
If an external environment storage should be used in very rare and special cases,
the intentional behaviour should be to ignore the external environment and always
fall back to the built-in environment. By storing an empty "to be ignored" environment
into the external environment a confusing error message about invalid CRC sums will go
away and still the built-in environment is used.
With this new option we can force the intentional behaviour.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:24:00 +02:00
Juergen Borleis 72ce27f8e0 envfs: change API to be able to forward special flags into the envfs superblock
In order to be able to mark an stored envfs image with special features
(intentional ignore for example), we now can feed forward these flags.
By forwarding a '0' for the flags nothing changes because the envfs superblock
was already allocated with xzalloc.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:24:00 +02:00
Juergen Borleis 1b937547b9 saveenv: make clear how to use the command's parameters
Both parameters can be omitted and DIRECTORY can be omitted, but the
DIRECTORY parameter requires the ENVFS parameter as well.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:07:19 +02:00
Antony Pavlov 2c16fa4080 commands: trigger: check trigger disable return code too
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +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
Holger Schurig 7ac222cbad Documentation: revamp dfu's help text
... so that it looks a bit nicer in the HTML generated docs.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig f837350635 Documentation: lowercase help short texts
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig 43f4c1d3c9 Documentation: remove "all all" in help's help text.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Sascha Hauer ade522c6dd USB: gadget: DFU: register as USB function
Register DFU as usb_function_instance to make it work with composite
gadgets. Also use this internally for registering as DFU device (with
the 'dfu' command).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:49 +02:00
Sascha Hauer 057a57448d Add function to parse a string in dfu format
The dfu command parses a string which contains a list of
devices and flags. This format is useful for other users
aswell, so add common helper functions to parse it and
let the dfu command use this format.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:08 +02:00
Sascha Hauer 62735eec55 USB: gadget: specify vendor/product id with device parameters
This introduces the device parameters:

usbgadget.product
usbgadget.vendor
usbgadget.manufacturer
usbgadget.productname

These variables are used to configure the USB vendor id, product id,
manufacturer name and product name.

Previously these were configured with arguments to the usbserial
and dfu command. The parameters are device static, so it's nice to
configure it somewhere in the environment instead of when calling
dfu/usbserial. Also when other gadget drivers are added we do not
have to duplicate the option parsing further.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:09:28 +02:00
Sascha Hauer 2776d53d7a USB: gadget: Update to 3.15
This updates the USB Gadget stack to Linux-3.15.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Conflicts:
	drivers/usb/core/Makefile
2014-07-22 08:08:44 +02:00
Sascha Hauer ccf0e4b4d1 Merge branch 'for-next/usb' into for-next/usb-gadget 2014-07-22 08:06:36 +02:00
Pavel Machek 54533366d1 tftp: more helpful help text
It took me a while to figure out syntax of tftp command, document that
server address is taken from environment.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 07:43:23 +02:00
Sascha Hauer 81a2205228 USB: host: drop force rescan
We can now detect changes in the USB device hierarchy properly, so
the 'force' option to the usb command is no longer necessary. We just
scan the busses each time the usb command is called.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-18 14:50:21 +02:00
Antony Pavlov 9fc0d34763 commands: usb: add tree view capability
This patch adds U-Boot 'usb tree' command functionality to barebox.

Here is an example output:

  1 ID 0000:0000
  |  u-boot EHCI Host Controller
  |
  +-2 ID 05e3:0606
    |   USB2.0 Hub
    |
    +-3 ID 10c4:ea60
    |    Silicon Labs CP2102 USB to UART Bridge Contr P-00-00669
    |
    +-4 ID 05e3:0606
    | |   USB2.0 Hub
    | |
    | +-5 ID 05e3:0608
    | | |   USB2.0 Hub
    | | |
    | | +-6 ID 0d8c:000c
    | |       C-Media USB Headphone Set
    | |
    | +-7 ID 0d8c:000c
    |       C-Media USB Headphone Set
    |
    +-8 ID 0846:1040
         NETGEAR NETGEAR FA120 Adapter

The tree view is enabled with 'usb -t'

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-18 14:48:27 +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
Sascha Hauer e4caa90188 serial: Add EFI stdio driver
This adds a driver which uses the EFI stdin/stdout interfaces to
implement a barebox console. Keyboard input should be fairly complete,
but not all vt100 needed by barebox work properly. The clear-to-eol
escape is missing causing garbled output in the editor.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-16 10:46:18 +02:00
Silvio Fricke 21c5b4ff13 commands: i2c: add message if write is not successful
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:04:04 +02:00
Silvio Fricke 32a9bb7e9d commands: i2c: simplify i2c wide access logic
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:04:04 +02:00
Silvio Fricke 100ca65b1e commands: i2c: verbose option doesn't need argument
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:04:04 +02:00
Sascha Hauer a0962885af oftree command: Use size_t for size
read_file takes a size_t argument as size, so use this type for the
size variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-11 08:14:42 +02:00
Sascha Hauer 3f4e7adae9 Fix crc32 compile error
This fixes a compile error introduced with:

| commit 37f47a2a8c
| Author: Robert P. J. Day <rpjday@crashcourse.ca>
| Date:   Mon Jul 7 05:36:33 2014 -0400
|
|     crc32: Proper name of command is "crc32".
|
|     Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-08 10:53:14 +02:00
Sascha Hauer deef1e80f3 Do not use macros in command help
The help texts are parsed by sphinx which cannot handle macros, so
replace them with their values.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-08 07:52:36 +02:00
Robert P. J. Day 37f47a2a8c crc32: Proper name of command is "crc32".
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-08 07:45:45 +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
Robert P. J. Day 24adc2b69d bootm.c: "-o" option should refer to "DTB", not "DTS"
Fix option explanation, and a couple grammar fixes.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-07 08:29:34 +02:00
Sascha Hauer efa4d684d8 Merge branch 'for-next/misc'
Conflicts:
	arch/arm/boards/chumby_falconwing/falconwing.c
	arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
	arch/x86/mach-x86.dox
	scripts/setupmbr/setupmbr.c
2014-07-04 17:27:06 +02:00
Sascha Hauer 45d593bc5e Merge branch 'for-next/mips' 2014-07-04 17:26:05 +02:00
Sascha Hauer ce1b0d4ae3 Merge branch 'for-next/doc' 2014-07-04 17:19:40 +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
Robert P. J. Day 0ad478b4c2 splash.c: Add that .png files are suitable as splash images.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:34:10 +02:00
Sascha Hauer 10d6391399 ls: sort files with -l
Always collect directory entries in a string_list and evaluate it
later. This makes sure that the files are printed alphabetically
even when -l is given.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-03 09:39:28 +02:00
Antony Pavlov 9b0c2e47ef mii-tool: make the 'No MII transceiver present!' message more clear
Suppose you have two network controllers.
The first one is ENC28J60 (it is in low power mode
after start) the second one is always-enabled eth1.

As ENC28J60 is in low power mode before enc28j60_eth_open()
is called. ENC28J60's mii traceiver is in low power mode too
so the mii traceiver's register are inaccessable.

Here is a sample log just after barebox start:

  barebox:/ miitool
  miibus0: registered phy as /dev/phy0
    No MII transceiver present!.
  miibus1: registered phy as /dev/phy1
  phy1: eth1: negotiated 100baseTx-FD, link ok
  barebox:/ miitool
    No MII transceiver present!.
  phy1: eth1: negotiated 100baseTx-FD, link ok

The 'No MII transceiver present!.' message is confusing here.

This patch fixes the problem so the miitool output
looks like this:

  barebox:/ miitool
  phy0: spieth0:  No MII transceiver present!.
  phy1: eth1: negotiated 100baseTx-FD, link ok

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-02 07:46:31 +02:00
Rolf Evers-Fischer 3746d5ebc6 boot: fix typo
Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@delphi.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-01 08:44:56 +02:00
Holger Schurig 8eaa3b0fd8 commands: include missing header
When compiled for ARCH=sandbox, we get a compiler warning
if we don't include the needed header file as well.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 21:16:13 +02:00
Sascha Hauer 98360be0fe Documentation: remove doxygen documentation
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 10:09:52 +02:00
Sascha Hauer 7b82f54858 commands: addpart: Improve description
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 09:45:14 +02:00
Jan Luebbe 5bda5b7764 automount: fix description typo
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2014-06-26 09:45:14 +02:00
Jan Luebbe e195321a03 ubiformat: avoid macros in help text
To simplify parsing of the help strings, we need to avoid using
macros there.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2014-06-26 09:45:14 +02:00
Jan Luebbe 5c2852ff9e commands: ls: add ll as an alias for ls -l
This saves one second of user time on every interactive boot.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-23 08:41:53 +02:00
Sascha Hauer 429717b48c boot: Fix boot -m
We have to continue when bootentries_collect succeeds, not when it fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-19 09:43:09 +02:00
Antony Pavlov 636052ce1d commands: gpio_direction_output: add missed VALUE parameter to help message
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-17 20:35:40 +02:00
Sascha Hauer 7eb8f2a59c mii-tool: Fix gigabit advertise / link partner ability mixup
bmcr2 contains the gigabit advertise bits and lpa2 contains the gigabit
link partner ability bits, not the other way round.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:47:40 +02:00
Sascha Hauer e5a0223b9e mii-tool: Fix gigabit link test
media_list tests for gigabit phys like this:

if (mask & BMCR_SPEED1000)

mask does not contain the value of the BMCR register though, so the
test is completely bogus. Test for mask2 instead which is only
nonzero when the phy has gigabit capabilities.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:47:40 +02:00
Sascha Hauer 68376f82e8 mii-tool: Fix string length
media_list writes into a static string. Worst case length of this string
is 125 bytes, but the function only allocates 100 bytes. Use 256 bytes which
is long enough for some extensions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:47:40 +02:00
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 811a79e07e Merge branch 'pu/warnings' 2014-06-06 06:37:09 +02:00
Alexander Shiyan 905d36b841 2048: Reset score on startup
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-06 06:33:53 +02:00
Sascha Hauer 4cbecde30c commands: drvinfo: Make locally used function static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 10:18:06 +02:00
Sascha Hauer 6331e58a2c Merge branch 'for-next/misc'
Conflicts:
	commands/devinfo.c
2014-06-04 21:03:36 +02:00
Holger Schurig 561ed0a393 devinfo: reduce indentation
This patch reduces the indentation of "devinfo", to reduce the amount of
overly long lines.

And while we're at it, also remove the fixed-size of the human-readable
area. As entries didn't align anyway (because of indentation), this was
just eating more space without giving much more readability.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:19:50 +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 287c03267e devinfo: make the output of "devinfo DEVICE" nicer
* some output sections started with "foo: bar", some with "foo = bar". Unify this.
* there was a fixed size to the "foo =" parameters, which wasn't fitting, this
  was especially visible at "devinfo global"
* don't output "resources:", "driver:" and "bus:" lines if there are none
  resources, drivers or busses involved.
* remove some empty lines
* harmonize differentiation between headlines (e.g. "resources:") and values
  by indenting values slightly
* uppercase some texts

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:11 +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 4d1ebec9da oftree command: make devicetree file optargs to -l/-s
When loading or saving a devicetree it seems logical to add the
filename to the option specifying the command. This is also slightly
easier to parse.
While at it add missing documentation for the -s option.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:09:13 +02:00
Sascha Hauer d384b5639f of: Drop devicetree merge support
I assume I am the only person knowing that barebox is able to
merge devicetrees. This feature seems broken for a while now since
trying to merge devicetress results in:

unflatten: too many end nodes

Remove this feature to save the complexity.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:09:13 +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
Franck Jullien 28a0770e23 devinfo: add human readable size after memory range
It's not always easy to know what is the size of a parition.

This patch adds the size of a memory range in human readable
format. We now have for example:

`---- cfi_flash0
     `---- nor0
          `---- 0x00000000-0x00ffffff (    16 MiB): /dev/nor0
          `---- 0x00000000-0x0001ffff (   128 KiB): /dev/env0
          `---- 0x00020000-0x0011ffff (     1 MiB): /dev/fpga0
          `---- 0x00120000-0x0019ffff (   512 KiB): /dev/self0
          `---- 0x001a0000-0x00d9ffff (    12 MiB): /dev/linux
          `---- 0x00da0000-0x00ffffff (   2.4 MiB): /dev/elf

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:05:54 +02:00
Sascha Hauer e275b2653f complete: Add devicetree completion
The of_* commands take devicetree nodes as parameters. Add a
devicetree completion function to ease passing nodes to these
commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-19 22:23:56 +02:00