9
0
Fork 0
Commit Graph

13 Commits

Author SHA1 Message Date
Holger Schurig f1f532084a commands: harmonize in-barebox documentation
This patch does probably too much, but it's hard (and very
cumbersome/time consuming) to break it out. What is does is this:

* each command has one short description, e.g. "list MUX configuration"
* made sure the short descriptions start lowercase
* each command has one usage. That string contains just the
  options, e.g. "[-npn]". It's not part of the long help text.
* that is, it doesn't say "[OPTIONS]" anymore, every usable option
  is listed by character in this (short) option string (the long
  description is in the long help text, as before)
* help texts have been reworked, to make them
  - sometimes smaller
  - sometimes describe the options better
  - more often present themselves in a nicer format
* all long help texts are now created with BUSYBOX_CMD_HELP_
  macros, no more 'static const __maybe_unused char cmd_foobar_help[]'
* made sure the long help texts starts uppercase
* because cmdtp->name and cmdtp->opts together provide the new usage,
  all "Usage: foobar" texts have been removed from the long help texts
* BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this
  is nicer in the source code
* BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself
* made sure no line gets longer than 77 characters
* delibertely renamed cmdtp->usage, so that we can get compile-time
  errors (e.g. in out-of-tree modules that use register_command()
* the 'help' command can now always emit the usage, even without
  compiled long help texts
* 'help -v' gives a list of commands with their short description, this
  is similar like the old "help" command before my patchset
* 'help -a' gives out help of all commands

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:43 +02:00
Holger Schurig ab23d0bb3f commands: group 'help' output
The old output of "help" was just producing a long list, that usually
scrolled of the screen (even on a X11 terminal). This list is more
compact, and also sorted by groups.

The old output format (plus grouping) is now available with 'help -v'.

Example:

   Information commands:
     ?, devinfo, help, iomem, meminfo, version
   Boot commands:
     boot, bootm, go, loadb, loads, loadx, loady, saves, uimage
   ...

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 07:59:55 +02:00
Sascha Hauer f30b191e36 of: make of_get_fixed_tree more universally usable
Currently the bootm code uses of_fix_tree to apply the fixups
to the devicetree given on the command line. This function assumes
that there is enough space for the fixups available. Also on ARM
we have to make sure the tree does not cross 1Mib boundaries.

This patch moves the space allocation and alignment ensurance
to of_get_fixed_tree and uses it in bootm. This is the first
step for making of_get_fixed_tree the single point of devicetree
handling in barebox.
of_get_fixed_tree now takes an argument of the input fdt. If it is
given, this one is used, otherwise an internal oftree is used which
will be created in subsequent patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:08:30 +01:00
Robert P. J. Day a0a6262c91 arm lib: Remove redundant boot usage info from boot[uz].c
There is no need to add the command name to the "usage" info when
defining a command.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:14:11 +01:00
Sascha Hauer da290d3fa3 ARM bootz: use request_sdram_region
We now have request_sdram_region to request a region. Use
it instead of a comparison with MALLOC_BASE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-16 09:31:22 +02:00
Sascha Hauer 33d1cc4bf2 commands: remove struct command pointer from commands
This is unused in all commands and thus can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:07 +01:00
Sascha Hauer bb2a1ea60c ARM boot[zu]: return COMMAND_ERROR_USAGE instead of calling barebox_cmd_usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:08:09 +01:00
Sascha Hauer 296cd8d638 ARM: call start_linux directly with initrd start/size and oftree
whoever calls this function is not necessarily aware of a struct
image_data, so remove the dependency from the function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 10:26:03 +01:00
Juergen Beisert 2b5d8792ac Really fix the 'bootz' command
Running the 'bootz' command always fails with

could not read <some file>

due to wrong usage of pointers and structures. This is the second try to fix
the 'bootz' command. At least on my target it is now be able again to load a
kernel without any error.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:17:35 +02:00
Juergen Beisert c66af9fe05 'bootz' command fails to load the zImage's header
Running the 'bootz' command always fails with

could not read <some file>

due to it loads only a size of a pointer, instead of the size of the expected
header structure.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-14 14:14:45 +02:00
Sascha Hauer deef916d9c ARM: switch to generic memory banks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-23 16:32:49 +02:00
Sascha Hauer e064ad3628 ARM linux: support Linux images with CONFIG_AUTO_ZRELADDR
These images have to be located in the first 128MB of SDRAM, so
use the following strategy:

- first try to map the image. If the pointer is within the first
  128MB of sdram everything is fine.
- if we can't map the image, check for SDRAM being smaller than
  128MB we can use malloc for allocating space for the image.
- As a last fallback we simply put the image to 8MB into SDRAM.
  This is not very clean. We try our best by checking that we
  won't overwrite the malloc space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-24 10:34:44 +02:00
Sascha Hauer f103a9843e ARM: move bootz code to its own file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:27:58 +02:00