mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 00/19] commands rework patch series
@ 2014-05-13  8:28 Holger Schurig
  2014-05-13  8:28 ` [PATCH 01/19] commands: group 'help' output Holger Schurig
                   ` (21 more replies)
  0 siblings, 22 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

Hi,

this is my current patch series that should improve barebox'
documentation about it's commands.

* when I started barebox and typed "help", the list of commands
  was scrolling up quickly. Almost always did I had to use the
  mouse and scroll my x-terminal backwards to see what I
  actually wanted to see. So I reduced the output of the "help"
  command to just spit out the command names, however grouped
  by functions. This is now much smaller and fits in one
  screen. The old list is available with "help -l".
* Usage (synopsis) documention (e.g. "ls [-lCR]") was only in
  the CONFIG_LONGHELP, but it's often usable if one forget the
  exact command option letter. It's now part of the help even
  without CONFIG_LONGHELP.
* I reworked the long help texts to make them better understandable
  (hopefully), and also tried to recuce their size if possible.
* when I was new to barebox, I was wandering if I need some
  of the commands in "make xconfig". I didn't have further
  information, because almost no command had a help text.
  This has now changed, the help texts in Kconfig are almost the
  same as the help texts of "help FOOBAR" (with CONFIG_LONGHELP) on.
* now that "help" has the commands grouped nicely, it was time
  to group them in "make xconfig", too
* many Kconfig entries turned on commands, but they were located
  at various places (a.g. common, net, arch-depended). Moved them
  all into commands/Kconfig
* some CONFIG_CMD_foobar things didn't turn on commands. I renamed
  them (and their occurences in the _defconfig)s.

What I deliberately did not: I ignored the Doxygen. That beast lacks
around 70% of all commands anyway. It builds quite slow. Still I would
not remove it, becausee occassinally it contains additional
information that isn't suitable (too long) for CONFIG_LONGHELP.

Holger Schurig (19):
  commands: group 'help' output
  commands: harmonize in-barebox documentation
  commands: harmonize in-barebox docs with Kconfig docs
  commands: CMD_MEMORY -> COMPILE_MEMORY
  commands: CMD_DIGEST -> COMPILE_DIGEST
  commands: move CMD_ARM_CPUINFO to commands/Kconfig
  commands: move CMD_ARM_MMUINFO to commands/Kconfig
  commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  commands: move CMD_BOOT_ORDER to commands/Kconfig
  commands: move CMD_AT91_BOOT_TEST to commands/Kconfig
  commands: move CMD_AT91MUX to commands/Kconfig
  commands: move CMD_AT91MIX to commands/Kconfig
  commands: HUSH_GETOPT -> CMD_GETOPT
  commands: let all network commands depend on NET
  commands: introduce CMD_HOST
  commands: NET_PING -> CMD_PING
  commands: NET_DHCP -> CMD_DHCP
  commands: move CMD_IFUP to commands/Kconfig
  commands: move CONFIG_LONGHELP to commands/Kconfig

 arch/arm/Kconfig                                   |   15 -
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c  |    9 +-
 arch/arm/boards/guf-cupid/board.c                  |   10 +-
 arch/arm/boards/phytec-phycore-imx35/pcm043.c      |   10 +-
 arch/arm/configs/a9m2410_defconfig                 |    4 +-
 arch/arm/configs/a9m2440_defconfig                 |    4 +-
 arch/arm/configs/am335x_beaglebone_defconfig       |    4 +-
 arch/arm/configs/animeo_ip_defconfig               |    4 +-
 arch/arm/configs/archosg9_defconfig                |    4 +-
 arch/arm/configs/at91rm9200ek_defconfig            |    4 +-
 arch/arm/configs/at91sam9260ek_defconfig           |    4 +-
 arch/arm/configs/at91sam9261ek_defconfig           |    4 +-
 .../configs/at91sam9261ek_first_stage_defconfig    |    4 +-
 arch/arm/configs/at91sam9263ek_defconfig           |    4 +-
 arch/arm/configs/at91sam9g10ek_defconfig           |    4 +-
 arch/arm/configs/at91sam9g20ek_defconfig           |    4 +-
 arch/arm/configs/at91sam9m10g45ek_defconfig        |    4 +-
 arch/arm/configs/at91sam9m10ihd_defconfig          |    4 +-
 arch/arm/configs/at91sam9n12ek_defconfig           |    4 +-
 arch/arm/configs/at91sam9x5ek_defconfig            |    4 +-
 arch/arm/configs/ccmx51_defconfig                  |    4 +-
 arch/arm/configs/chumbyone_defconfig               |    6 +-
 arch/arm/configs/cupid_defconfig                   |    4 +-
 arch/arm/configs/datamodul-edm-qmx6_defconfig      |    4 +-
 arch/arm/configs/dss11_defconfig                   |    4 +-
 arch/arm/configs/edb93xx_defconfig                 |    4 +-
 arch/arm/configs/efika-mx-smartbook_defconfig      |    4 +-
 arch/arm/configs/eukrea_cpuimx25_defconfig         |    4 +-
 arch/arm/configs/eukrea_cpuimx27_defconfig         |    4 +-
 arch/arm/configs/eukrea_cpuimx35_defconfig         |    4 +-
 arch/arm/configs/eukrea_cpuimx51_defconfig         |    4 +-
 arch/arm/configs/freescale-mx21-ads_defconfig      |    4 +-
 arch/arm/configs/freescale-mx25-3ds_defconfig      |    4 +-
 arch/arm/configs/freescale-mx27-ads_defconfig      |    4 +-
 arch/arm/configs/freescale-mx28-evk_defconfig      |    4 +-
 arch/arm/configs/freescale-mx35-3ds_defconfig      |    4 +-
 arch/arm/configs/freescale-mx51-babbage_defconfig  |    4 +-
 arch/arm/configs/freescale-mx53-qsb_defconfig      |    4 +-
 arch/arm/configs/freescale-mx53-smd_defconfig      |    4 +-
 arch/arm/configs/freescale-mx6-arm2_defconfig      |    4 +-
 arch/arm/configs/freescale-mx6-sabrelite_defconfig |    4 +-
 arch/arm/configs/freescale-mx6-sabresd_defconfig   |    4 +-
 arch/arm/configs/friendlyarm_mini2440_defconfig    |    4 +-
 arch/arm/configs/friendlyarm_mini6410_defconfig    |    4 +-
 arch/arm/configs/friendlyarm_tiny6410_defconfig    |    4 +-
 arch/arm/configs/highbank_defconfig                |    4 +-
 arch/arm/configs/imx233-olinuxino_defconfig        |    4 +-
 arch/arm/configs/imx_v7_defconfig                  |    4 +-
 arch/arm/configs/mioa701_defconfig                 |    2 +-
 arch/arm/configs/mmccpu_defconfig                  |    4 +-
 arch/arm/configs/neso_defconfig                    |    4 +-
 arch/arm/configs/netx_nxdb500_defconfig            |    4 +-
 arch/arm/configs/nhk8815_defconfig                 |    4 +-
 .../configs/omap3430_sdp3430_per_uart_defconfig    |    2 +-
 arch/arm/configs/omap3530_beagle_defconfig         |    4 +-
 arch/arm/configs/omap3_evm_defconfig               |    2 +-
 arch/arm/configs/panda_defconfig                   |    4 +-
 arch/arm/configs/phytec-phycard-imx27_defconfig    |    4 +-
 arch/arm/configs/phytec-phycard-omap3_defconfig    |   10 +-
 arch/arm/configs/phytec-phycard-omap4_defconfig    |    6 +-
 arch/arm/configs/phytec-phycore-am335x_defconfig   |    4 +-
 arch/arm/configs/phytec-phycore-imx27_defconfig    |    4 +-
 arch/arm/configs/phytec-phycore-imx31_defconfig    |    4 +-
 arch/arm/configs/phytec-phycore-imx35_defconfig    |    4 +-
 arch/arm/configs/phytec-phycore-omap4460_defconfig |    4 +-
 arch/arm/configs/phytec-phycore-pxa270_defconfig   |    4 +-
 arch/arm/configs/pm9261_defconfig                  |    4 +-
 arch/arm/configs/pm9263_defconfig                  |    4 +-
 arch/arm/configs/pm9g45_defconfig                  |    4 +-
 arch/arm/configs/qil_a9260_128mib_defconfig        |    4 +-
 arch/arm/configs/qil_a9260_defconfig               |    4 +-
 arch/arm/configs/qil_a9g20_128mib_defconfig        |    4 +-
 arch/arm/configs/qil_a9g20_defconfig               |    4 +-
 arch/arm/configs/rockchip_defconfig                |    4 +-
 arch/arm/configs/sama5d3xek_defconfig              |    4 +-
 arch/arm/configs/scb9328_defconfig                 |    4 +-
 arch/arm/configs/socfpga_defconfig                 |    4 +-
 arch/arm/configs/solidrun_cubox_defconfig          |    2 +-
 arch/arm/configs/telit_evk_pro3_defconfig          |    4 +-
 arch/arm/configs/tny_a9260_defconfig               |    4 +-
 arch/arm/configs/tny_a9263_defconfig               |    4 +-
 arch/arm/configs/tny_a9g20_defconfig               |    4 +-
 arch/arm/configs/tqma53_defconfig                  |    4 +-
 arch/arm/configs/tx25stk5_defconfig                |    4 +-
 arch/arm/configs/tx28stk5_defconfig                |    2 +-
 arch/arm/configs/tx51stk5_defconfig                |    8 +-
 arch/arm/configs/tx53stk5_defconfig                |    4 +-
 arch/arm/configs/usb_a9260_defconfig               |    4 +-
 arch/arm/configs/usb_a9263_128mib_defconfig        |    4 +-
 arch/arm/configs/usb_a9263_defconfig               |    4 +-
 arch/arm/configs/usb_a9g20_128mib_defconfig        |    4 +-
 arch/arm/configs/usb_a9g20_defconfig               |    4 +-
 arch/arm/configs/versatilepb_defconfig             |    4 +-
 arch/arm/configs/vexpress_ca9_defconfig            |    4 +-
 arch/arm/configs/vexpress_defconfig                |    4 +-
 arch/arm/configs/vincell_defconfig                 |    4 +-
 arch/arm/configs/zedboard_defconfig                |    2 +-
 arch/arm/cpu/cpuinfo.c                             |    3 +-
 arch/arm/cpu/mmuinfo.c                             |   10 +-
 arch/arm/lib/bootu.c                               |    4 +-
 arch/arm/lib/bootz.c                               |    9 +-
 arch/arm/mach-at91/Kconfig                         |   18 -
 arch/arm/mach-at91/boot_test_cmd.c                 |    9 +-
 arch/arm/mach-at91/clock.c                         |    9 +-
 arch/arm/mach-at91/gpio.c                          |   12 +-
 arch/arm/mach-mxs/bcb.c                            |    9 +-
 arch/arm/mach-netx/generic.c                       |    4 +-
 arch/arm/mach-omap/Kconfig                         |    7 -
 arch/arm/mach-omap/boot_order.c                    |   13 +-
 arch/blackfin/boards/ipe337/cmd_alternate.c        |   10 +-
 arch/blackfin/configs/ipe337_defconfig             |    4 +-
 arch/mips/Kconfig                                  |    7 -
 arch/mips/configs/dlink-dir-320_defconfig          |    6 +-
 arch/mips/configs/loongson-ls1b_defconfig          |    2 +-
 arch/mips/configs/qemu-malta_defconfig             |    6 +-
 arch/mips/configs/ritmix-rzx50_defconfig           |    2 +-
 arch/mips/lib/cpuinfo.c                            |    3 +-
 arch/nios2/configs/generic_defconfig               |    2 +-
 arch/openrisc/configs/generic_defconfig            |    4 +-
 arch/openrisc/lib/cpuinfo.c                        |    3 +-
 arch/ppc/configs/da923rc_defconfig                 |    4 +-
 arch/ppc/configs/p1022ds_defconfig                 |    2 +-
 arch/ppc/configs/p2020rdb_defconfig                |    2 +-
 arch/ppc/configs/pcm030_defconfig                  |    4 +-
 arch/sandbox/configs/sandbox_defconfig             |    4 +-
 commands/2048.c                                    |    7 +-
 commands/Kconfig                                   | 2250 +++++++++++++++-----
 commands/Makefile                                  |    4 +-
 commands/automount.c                               |   13 +-
 commands/barebox-update.c                          |   18 +-
 commands/basename.c                                |    7 +-
 commands/boot.c                                    |   45 +-
 commands/bootm.c                                   |   34 +-
 commands/cat.c                                     |    9 +-
 commands/cd.c                                      |    8 +-
 commands/clear.c                                   |    7 +-
 commands/clk.c                                     |   43 +-
 commands/cp.c                                      |   10 +-
 commands/crc.c                                     |   21 +-
 commands/detect.c                                  |   12 +-
 commands/devinfo.c                                 |   17 +-
 commands/dfu.c                                     |   28 +-
 commands/digest.c                                  |   28 +-
 commands/dirname.c                                 |   11 +-
 commands/echo.c                                    |   17 +-
 commands/edit.c                                    |    7 +-
 commands/exec.c                                    |    3 +-
 commands/export.c                                  |    7 +-
 commands/false.c                                   |    3 +-
 commands/filetype.c                                |   15 +-
 commands/flash.c                                   |   43 +-
 commands/global.c                                  |   11 +-
 commands/go.c                                      |   15 +-
 commands/gpio.c                                    |   39 +-
 commands/help.c                                    |  112 +-
 commands/i2c.c                                     |   51 +-
 commands/insmod.c                                  |    8 +-
 commands/iomemport.c                               |    6 +-
 commands/led.c                                     |   12 +-
 commands/let.c                                     |   44 +-
 commands/linux16.c                                 |   17 +-
 commands/linux_exec.c                              |   10 +-
 commands/ln.c                                      |   10 +-
 commands/loadb.c                                   |   20 +-
 commands/loadenv.c                                 |   16 +-
 commands/loads.c                                   |   21 +-
 commands/loadxy.c                                  |   53 +-
 commands/login.c                                   |   17 +-
 commands/ls.c                                      |   13 +-
 commands/lsmod.c                                   |    3 +-
 commands/magicvar.c                                |    3 +-
 commands/md.c                                      |   38 +-
 commands/memcmp.c                                  |   29 +-
 commands/memcpy.c                                  |   23 +-
 commands/meminfo.c                                 |    3 +-
 commands/memset.c                                  |   21 +-
 commands/memtest.c                                 |   15 +-
 commands/menu.c                                    |   55 +-
 commands/menutree.c                                |   37 +-
 commands/miitool.c                                 |   12 +-
 commands/mkdir.c                                   |   13 +-
 commands/mm.c                                      |   20 +-
 commands/mount.c                                   |   27 +-
 commands/msleep.c                                  |    4 +-
 commands/mw.c                                      |   19 +-
 commands/nand.c                                    |   16 +-
 commands/nandtest.c                                |   22 +-
 commands/net.c                                     |    8 +-
 commands/of_node.c                                 |   10 +-
 commands/of_property.c                             |   21 +-
 commands/oftree.c                                  |   16 +-
 commands/partition.c                               |   27 +-
 commands/passwd.c                                  |   14 +-
 commands/poweroff.c                                |    3 +-
 commands/printenv.c                                |    9 +-
 commands/pwd.c                                     |    3 +-
 commands/readf.c                                   |   11 +-
 commands/readline.c                                |   11 +-
 commands/readlink.c                                |   11 +-
 commands/reginfo.c                                 |    3 +-
 commands/regulator.c                               |    3 +-
 commands/reset.c                                   |    9 +-
 commands/rm.c                                      |   12 +-
 commands/rmdir.c                                   |   11 +-
 commands/saveenv.c                                 |   13 +-
 commands/setenv.c                                  |   10 +-
 commands/sleep.c                                   |    4 +-
 commands/spi.c                                     |   25 +-
 commands/splash.c                                  |   20 +-
 commands/test.c                                    |   15 +-
 commands/tftp.c                                    |   10 +-
 commands/time.c                                    |    9 +-
 commands/timeout.c                                 |   21 +-
 commands/trigger.c                                 |   13 +-
 commands/true.c                                    |    3 +-
 commands/ubi.c                                     |   43 +-
 commands/ubiformat.c                               |   48 +-
 commands/uimage.c                                  |   16 +-
 commands/umount.c                                  |   11 +-
 commands/uncompress.c                              |   11 +-
 commands/usb.c                                     |   11 +-
 commands/usbserial.c                               |   29 +-
 commands/version.c                                 |    3 +-
 commands/wd.c                                      |   11 +-
 common/Kconfig                                     |   19 +-
 common/command.c                                   |   34 +-
 common/hush.c                                      |   67 +-
 drivers/gpio/gpiolib.c                             |    9 +-
 drivers/mtd/nand/nand_imx_bbm.c                    |    6 +-
 drivers/mtd/nand/nand_s3c24xx.c                    |    8 +-
 drivers/of/base.c                                  |    2 +
 drivers/usb/gadget/u_serial.c                      |    1 +
 include/command.h                                  |   29 +-
 net/Kconfig                                        |   15 -
 net/Makefile                                       |    4 +-
 net/dhcp.c                                         |   32 +-
 net/dns.c                                          |   11 +-
 net/ifup.c                                         |   15 +-
 net/nfs.c                                          |    9 +-
 net/ping.c                                         |    4 +-
 240 files changed, 3119 insertions(+), 1746 deletions(-)

-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 01/19] commands: group 'help' output
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13 13:48   ` Sascha Hauer
  2014-05-13  8:28 ` [PATCH 02/19] commands: harmonize in-barebox documentation Holger Schurig
                   ` (20 subsequent siblings)
  21 siblings, 1 reply; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

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>
---
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |    1 +
 arch/arm/boards/guf-cupid/board.c                 |    1 +
 arch/arm/boards/phytec-phycore-imx35/pcm043.c     |    1 +
 arch/arm/cpu/cpuinfo.c                            |    1 +
 arch/arm/cpu/mmuinfo.c                            |    1 +
 arch/arm/lib/bootu.c                              |    1 +
 arch/arm/lib/bootz.c                              |    1 +
 arch/arm/mach-at91/boot_test_cmd.c                |    1 +
 arch/arm/mach-at91/clock.c                        |    1 +
 arch/arm/mach-at91/gpio.c                         |    1 +
 arch/arm/mach-mxs/bcb.c                           |    1 +
 arch/arm/mach-netx/generic.c                      |    1 +
 arch/arm/mach-omap/boot_order.c                   |    1 +
 arch/blackfin/boards/ipe337/cmd_alternate.c       |    1 +
 arch/mips/lib/cpuinfo.c                           |    1 +
 arch/openrisc/lib/cpuinfo.c                       |    1 +
 commands/2048.c                                   |    1 +
 commands/automount.c                              |    1 +
 commands/barebox-update.c                         |    1 +
 commands/basename.c                               |    1 +
 commands/boot.c                                   |    1 +
 commands/bootm.c                                  |    1 +
 commands/cat.c                                    |    1 +
 commands/cd.c                                     |    1 +
 commands/clear.c                                  |    1 +
 commands/clk.c                                    |    5 ++
 commands/cp.c                                     |    1 +
 commands/crc.c                                    |    1 +
 commands/detect.c                                 |    1 +
 commands/devinfo.c                                |    1 +
 commands/dfu.c                                    |    1 +
 commands/digest.c                                 |    4 +
 commands/dirname.c                                |    1 +
 commands/echo.c                                   |    1 +
 commands/edit.c                                   |    1 +
 commands/exec.c                                   |    1 +
 commands/export.c                                 |    1 +
 commands/false.c                                  |    1 +
 commands/filetype.c                               |    1 +
 commands/flash.c                                  |    3 +
 commands/global.c                                 |    1 +
 commands/go.c                                     |    1 +
 commands/gpio.c                                   |    4 +
 commands/help.c                                   |   87 ++++++++++++++++++---
 commands/i2c.c                                    |    3 +
 commands/insmod.c                                 |    3 +-
 commands/iomemport.c                              |    2 +
 commands/led.c                                    |    1 +
 commands/let.c                                    |    1 +
 commands/linux16.c                                |    1 +
 commands/linux_exec.c                             |    1 +
 commands/ln.c                                     |    1 +
 commands/loadb.c                                  |    1 +
 commands/loadenv.c                                |    1 +
 commands/loads.c                                  |    2 +
 commands/loadxy.c                                 |    2 +
 commands/login.c                                  |    1 +
 commands/ls.c                                     |    1 +
 commands/lsmod.c                                  |    1 +
 commands/magicvar.c                               |    1 +
 commands/md.c                                     |    1 +
 commands/memcmp.c                                 |    1 +
 commands/memcpy.c                                 |    1 +
 commands/meminfo.c                                |    1 +
 commands/memset.c                                 |    1 +
 commands/memtest.c                                |    1 +
 commands/menu.c                                   |    1 +
 commands/menutree.c                               |    1 +
 commands/miitool.c                                |    1 +
 commands/mkdir.c                                  |    1 +
 commands/mm.c                                     |    1 +
 commands/mount.c                                  |    1 +
 commands/msleep.c                                 |    1 +
 commands/mw.c                                     |    1 +
 commands/nand.c                                   |    1 +
 commands/nandtest.c                               |    1 +
 commands/net.c                                    |    1 +
 commands/of_node.c                                |    1 +
 commands/of_property.c                            |    1 +
 commands/oftree.c                                 |    1 +
 commands/partition.c                              |    2 +
 commands/passwd.c                                 |    1 +
 commands/poweroff.c                               |    1 +
 commands/printenv.c                               |    1 +
 commands/pwd.c                                    |    1 +
 commands/readf.c                                  |    1 +
 commands/readline.c                               |    1 +
 commands/readlink.c                               |    1 +
 commands/reginfo.c                                |    1 +
 commands/regulator.c                              |    1 +
 commands/reset.c                                  |    1 +
 commands/rm.c                                     |    1 +
 commands/rmdir.c                                  |    1 +
 commands/saveenv.c                                |    1 +
 commands/setenv.c                                 |    1 +
 commands/sleep.c                                  |    1 +
 commands/spi.c                                    |    1 +
 commands/splash.c                                 |    1 +
 commands/test.c                                   |    1 +
 commands/tftp.c                                   |    1 +
 commands/time.c                                   |    1 +
 commands/timeout.c                                |    1 +
 commands/trigger.c                                |    1 +
 commands/true.c                                   |    1 +
 commands/ubi.c                                    |    4 +
 commands/ubiformat.c                              |    1 +
 commands/uimage.c                                 |    1 +
 commands/umount.c                                 |    1 +
 commands/uncompress.c                             |    1 +
 commands/usb.c                                    |    1 +
 commands/usbserial.c                              |    1 +
 commands/version.c                                |    1 +
 commands/wd.c                                     |    1 +
 common/hush.c                                     |    4 +
 drivers/gpio/gpiolib.c                            |    1 +
 drivers/mtd/nand/nand_imx_bbm.c                   |    1 +
 drivers/mtd/nand/nand_s3c24xx.c                   |    1 +
 drivers/of/base.c                                 |    2 +
 drivers/usb/gadget/u_serial.c                     |    1 +
 include/command.h                                 |   16 ++++
 net/dhcp.c                                        |    1 +
 net/dns.c                                         |    1 +
 net/ifup.c                                        |    1 +
 net/nfs.c                                         |    1 +
 net/ping.c                                        |    1 +
 125 files changed, 239 insertions(+), 14 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index 9df2d64..f7b7a23 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -360,5 +360,6 @@ static const __maybe_unused char cmd_cpufreq_help[] =
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
 	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index 356bf56..793d845 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -354,5 +354,6 @@ static const __maybe_unused char cmd_cpufreq_help[] =
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
 	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/boards/phytec-phycore-imx35/pcm043.c b/arch/arm/boards/phytec-phycore-imx35/pcm043.c
index 6abfc92..f6e370f 100644
--- a/arch/arm/boards/phytec-phycore-imx35/pcm043.c
+++ b/arch/arm/boards/phytec-phycore-imx35/pcm043.c
@@ -332,6 +332,7 @@ static const __maybe_unused char cmd_cpufreq_help[] =
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
 	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
index 260d47b..2cee48b 100644
--- a/arch/arm/cpu/cpuinfo.c
+++ b/arch/arm/cpu/cpuinfo.c
@@ -211,6 +211,7 @@ static int do_cpuinfo(int argc, char *argv[])
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
 	.usage          = "Show info about CPU",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/cpu/mmuinfo.c b/arch/arm/cpu/mmuinfo.c
index 6bea34e..032798e 100644
--- a/arch/arm/cpu/mmuinfo.c
+++ b/arch/arm/cpu/mmuinfo.c
@@ -107,5 +107,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(mmuinfo)
 	.cmd            = do_mmuinfo,
 	.usage		= "mmuinfo <address>",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_mmuinfo_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/lib/bootu.c b/arch/arm/lib/bootu.c
index fdb0362..14a8566 100644
--- a/arch/arm/lib/bootu.c
+++ b/arch/arm/lib/bootu.c
@@ -37,6 +37,7 @@ static const __maybe_unused char cmd_bootu_help[] =
 BAREBOX_CMD_START(bootu)
 	.cmd            = do_bootu,
 	.usage          = "start a raw linux image",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_bootu_help)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c
index e32a77b..7ddd882 100644
--- a/arch/arm/lib/bootz.c
+++ b/arch/arm/lib/bootz.c
@@ -134,6 +134,7 @@ static const __maybe_unused char cmd_bootz_help[] =
 BAREBOX_CMD_START(bootz)
 	.cmd            = do_bootz,
 	.usage          = "start a zImage",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_bootz_help)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/mach-at91/boot_test_cmd.c b/arch/arm/mach-at91/boot_test_cmd.c
index aa5c020..5f80666 100644
--- a/arch/arm/mach-at91/boot_test_cmd.c
+++ b/arch/arm/mach-at91/boot_test_cmd.c
@@ -91,5 +91,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(at91_boot_test)
 	.cmd		= do_at91_boot_test,
 	.usage		= "upload the binary to sram and jump as will do the romcode",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_at91_boot_test_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index a10d7f6..c4fc698 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -889,6 +889,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(at91clk)
 	.cmd		= do_at91clk,
 	.usage		= "dump current clock configuration",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_at91clk_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index 91de85d..c175cfd 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -516,6 +516,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(at91mux)
 	.cmd		= do_at91mux,
 	.usage		= "dump current mux configuration",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_at91mux_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index a7f4ba9..0da8d3b 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -395,5 +395,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(bcb)
 	.cmd = update_bcb,
 	.usage = "Writes a MX23/28 BCB data structure to flash",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_bcb_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 866d6ae..0b6b3b2 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -146,5 +146,6 @@ void __noreturn reset_cpu(unsigned long addr)
 BAREBOX_CMD_START(loadxc)
 	.cmd		= do_loadxc,
 	.usage		= "load xmac/xpec engine with ethernet firmware",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/mach-omap/boot_order.c b/arch/arm/mach-omap/boot_order.c
index 2f2846d..4af86e6 100644
--- a/arch/arm/mach-omap/boot_order.c
+++ b/arch/arm/mach-omap/boot_order.c
@@ -78,6 +78,7 @@ static const __maybe_unused char cmd_boot_order_help[] =
 BAREBOX_CMD_START(boot_order)
 	.cmd		= cmd_boot_order,
 	.usage		= "boot_order <device 1> [<device n>]",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_boot_order_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/arch/blackfin/boards/ipe337/cmd_alternate.c b/arch/blackfin/boards/ipe337/cmd_alternate.c
index 86eaa11..aee9560 100644
--- a/arch/blackfin/boards/ipe337/cmd_alternate.c
+++ b/arch/blackfin/boards/ipe337/cmd_alternate.c
@@ -51,6 +51,7 @@ static const __maybe_unused char cmd_alternate_help[] =
 BAREBOX_CMD_START(alternate)
 	.cmd		= do_alternate,
 	.usage		= "count zero bits in a file",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_alternate_help)
 BAREBOX_CMD_END
 
diff --git a/arch/mips/lib/cpuinfo.c b/arch/mips/lib/cpuinfo.c
index de2055e..b541f70 100644
--- a/arch/mips/lib/cpuinfo.c
+++ b/arch/mips/lib/cpuinfo.c
@@ -55,4 +55,5 @@ static int do_cpuinfo(int argc, char *argv[])
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
 	.usage          = "Show info about CPU",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/arch/openrisc/lib/cpuinfo.c b/arch/openrisc/lib/cpuinfo.c
index 1f137f0..2a055aa 100644
--- a/arch/openrisc/lib/cpuinfo.c
+++ b/arch/openrisc/lib/cpuinfo.c
@@ -149,4 +149,5 @@ static int do_cpuinfo(int argc, char *argv[])
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
 	.usage          = "Show info about CPU",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/commands/2048.c b/commands/2048.c
index 5d6c766..6d4f927 100644
--- a/commands/2048.c
+++ b/commands/2048.c
@@ -385,5 +385,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(2048)
 	.cmd		= do_2048,
 	.usage		= "Usage: 2048",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_2048_help)
 BAREBOX_CMD_END
diff --git a/commands/automount.c b/commands/automount.c
index 511d18b..d1e5cb0 100644
--- a/commands/automount.c
+++ b/commands/automount.c
@@ -67,6 +67,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(automount)
 	.cmd		= do_automount,
 	.usage		= "automount [OPTIONS] <PATH> <cmd>",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_automount_help)
 BAREBOX_CMD_END
 
diff --git a/commands/barebox-update.c b/commands/barebox-update.c
index f550572..819bf4d 100644
--- a/commands/barebox-update.c
+++ b/commands/barebox-update.c
@@ -82,5 +82,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(barebox_update)
 	.cmd		= do_barebox_update,
 	.usage		= "update barebox",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_barebox_update_help)
 BAREBOX_CMD_END
diff --git a/commands/basename.c b/commands/basename.c
index b47ff8c..835c299 100644
--- a/commands/basename.c
+++ b/commands/basename.c
@@ -43,5 +43,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(basename)
 	.cmd		= do_basename,
 	.usage		= "strip directory and suffix from filenames",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_basename_help)
 BAREBOX_CMD_END
diff --git a/commands/boot.c b/commands/boot.c
index 4a83979..1b88ffe 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -481,6 +481,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(boot)
 	.cmd	= do_boot,
 	.usage		= "boot the machine",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_boot_help)
 BAREBOX_CMD_END
 
diff --git a/commands/bootm.c b/commands/bootm.c
index 5dff7dd..af2cb69 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -162,6 +162,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(bootm)
 	.cmd		= do_bootm,
 	.usage		= "boot an application image",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_bootm_help)
 BAREBOX_CMD_END
 
diff --git a/commands/cat.c b/commands/cat.c
index 1c112fc..f51af4e 100644
--- a/commands/cat.c
+++ b/commands/cat.c
@@ -91,5 +91,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(cat)
 	.cmd		= do_cat,
 	.usage		= "concatenate file(s)",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cat_help)
 BAREBOX_CMD_END
diff --git a/commands/cd.c b/commands/cd.c
index 936fec8..caa368d 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -53,5 +53,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(cd)
 	.cmd		= do_cd,
 	.usage		= "change working directory",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cd_help)
 BAREBOX_CMD_END
diff --git a/commands/clear.c b/commands/clear.c
index e6d553d..a67ece8 100644
--- a/commands/clear.c
+++ b/commands/clear.c
@@ -37,5 +37,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clear)
 	.cmd		= do_clear,
 	.usage		= "clear screen",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/clk.c b/commands/clk.c
index 241dc79..6718ae8 100644
--- a/commands/clk.c
+++ b/commands/clk.c
@@ -26,6 +26,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clk_enable)
 	.cmd		= do_clk_enable,
 	.usage		= "enable a clock",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_enable_help)
 BAREBOX_CMD_END
 
@@ -53,6 +54,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clk_disable)
 	.cmd		= do_clk_disable,
 	.usage		= "disable a clock",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_disable_help)
 BAREBOX_CMD_END
 
@@ -81,6 +83,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clk_set_rate)
 	.cmd		= do_clk_set_rate,
 	.usage		= "set a clocks rate",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_set_rate_help)
 BAREBOX_CMD_END
 
@@ -112,6 +115,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clk_dump)
 	.cmd		= do_clk_dump,
 	.usage		= "show information about registered clocks",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_clk_dump_help)
 BAREBOX_CMD_END
 
@@ -140,5 +144,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(clk_set_parent)
 	.cmd		= do_clk_set_parent,
 	.usage		= "set a parent of a clock",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_set_parent_help)
 BAREBOX_CMD_END
diff --git a/commands/cp.c b/commands/cp.c
index 45f08d8..2a289f8 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -105,6 +105,7 @@ If you want to copy between memory blocks, use 'memcpy'.
 BAREBOX_CMD_START(cp)
 	.cmd		= do_cp,
 	.usage		= "copy files",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cp_help)
 BAREBOX_CMD_END
 
diff --git a/commands/crc.c b/commands/crc.c
index 824dda4..89b4fb2 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -121,5 +121,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(crc32)
 	.cmd		= do_crc,
 	.usage		= "crc32 checksum calculation",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_crc_help)
 BAREBOX_CMD_END
diff --git a/commands/detect.c b/commands/detect.c
index 499994b..50317fe 100644
--- a/commands/detect.c
+++ b/commands/detect.c
@@ -89,6 +89,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(detect)
 	.cmd		= do_detect,
 	.usage		= "detect devices",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_COMPLETE(device_complete)
 	BAREBOX_CMD_HELP(cmd_detect_help)
 BAREBOX_CMD_END
diff --git a/commands/devinfo.c b/commands/devinfo.c
index 806e45c..3aa8a94 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -153,6 +153,7 @@ Example from an MPC5200 based system:
 BAREBOX_CMD_START(devinfo)
 	.cmd		= do_devinfo,
 	.usage		= "Show information about devices and drivers.",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_devinfo_help)
 	BAREBOX_CMD_COMPLETE(device_complete)
 BAREBOX_CMD_END
diff --git a/commands/dfu.c b/commands/dfu.c
index 2513ed8..514c487 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -197,5 +197,6 @@ device1(name1)[sr],device2(name2)[sr]
 BAREBOX_CMD_START(dfu)
 	.cmd		= do_dfu,
 	.usage		= "Device firmware update",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_dfu_help)
 BAREBOX_CMD_END
diff --git a/commands/digest.c b/commands/digest.c
index c9bb132..9980740 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -90,6 +90,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(md5sum)
 	.cmd		= do_md5,
 	.usage		= "md5 checksum calculation",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_md5sum_help)
 BAREBOX_CMD_END
 
@@ -110,6 +111,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(sha1sum)
 	.cmd		= do_sha1,
 	.usage		= "sha1 checksum calculation",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha1sum_help)
 BAREBOX_CMD_END
 
@@ -130,6 +132,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(sha224sum)
 	.cmd		= do_sha224,
 	.usage		= "sha224 checksum calculation",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha224sum_help)
 BAREBOX_CMD_END
 
@@ -150,6 +153,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(sha256sum)
 	.cmd		= do_sha256,
 	.usage		= "sha256 checksum calculation",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha256sum_help)
 BAREBOX_CMD_END
 
diff --git a/commands/dirname.c b/commands/dirname.c
index f34d88d..aa7f183 100644
--- a/commands/dirname.c
+++ b/commands/dirname.c
@@ -61,5 +61,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(dirname)
 	.cmd		= do_dirname,
 	.usage		= "strip last component from file name",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_dirname_help)
 BAREBOX_CMD_END
diff --git a/commands/echo.c b/commands/echo.c
index 4dfd870..f9ce43e 100644
--- a/commands/echo.c
+++ b/commands/echo.c
@@ -122,6 +122,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(echo)
 	.cmd		= do_echo,
 	.usage		= "echo args to console",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_echo_help)
 BAREBOX_CMD_END
 
diff --git a/commands/edit.c b/commands/edit.c
index b0fcf69..c1a9815 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -565,6 +565,7 @@ BAREBOX_CMD_START(edit)
 	.cmd		= do_edit,
 	.aliases	= edit_aliases,
 	.usage		= "Usage: (s)edit <file>",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_edit_help)
 BAREBOX_CMD_END
 
diff --git a/commands/exec.c b/commands/exec.c
index 8d12b30..52b2ba3 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -53,4 +53,5 @@ out:
 BAREBOX_CMD_START(exec)
 	.cmd		= do_exec,
 	.usage		= "execute a script",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 BAREBOX_CMD_END
diff --git a/commands/export.c b/commands/export.c
index c6196e0..e27cf18 100644
--- a/commands/export.c
+++ b/commands/export.c
@@ -56,6 +56,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(export)
 	.cmd		= do_export,
 	.usage		= "export environment variables",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_export_help)
 BAREBOX_CMD_END
 
diff --git a/commands/false.c b/commands/false.c
index 60d6989..6488b87 100644
--- a/commands/false.c
+++ b/commands/false.c
@@ -29,6 +29,7 @@ static int do_false(int argc, char *argv[])
 BAREBOX_CMD_START(false)
 	.cmd		= do_false,
 	.usage		= "do nothing, unsuccessfully",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 
diff --git a/commands/filetype.c b/commands/filetype.c
index f82a461..1d6b047 100644
--- a/commands/filetype.c
+++ b/commands/filetype.c
@@ -93,5 +93,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(filetype)
 	.cmd		= do_filetype,
 	.usage		= "detect file type",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_filetype_help)
 BAREBOX_CMD_END
diff --git a/commands/flash.c b/commands/flash.c
index d22d6a0..e6c30bf 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -82,6 +82,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(erase)
 	.cmd		= do_flerase,
 	.usage		= "erase FLASH memory",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_erase_help)
 BAREBOX_CMD_END
 
@@ -156,6 +157,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(protect)
 	.cmd		= do_protect,
 	.usage		= "enable flash write protection",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_protect_help)
 BAREBOX_CMD_END
 
@@ -184,6 +186,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(unprotect)
 	.cmd		= do_protect,
 	.usage		= "disable flash write protection",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_unprotect_help)
 BAREBOX_CMD_END
 
diff --git a/commands/global.c b/commands/global.c
index c526e65..20a8623 100644
--- a/commands/global.c
+++ b/commands/global.c
@@ -69,5 +69,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(global)
 	.cmd		= do_global,
 	.usage		= "create or set global variables",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_global_help)
 BAREBOX_CMD_END
diff --git a/commands/go.c b/commands/go.c
index 2e7bc1e..4a40608 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -87,6 +87,7 @@ static const __maybe_unused char cmd_go_help[] =
 BAREBOX_CMD_START(go)
 	.cmd		= do_go,
 	.usage		= "start application at address or file",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_go_help)
 	BAREBOX_CMD_COMPLETE(command_var_complete)
 BAREBOX_CMD_END
diff --git a/commands/gpio.c b/commands/gpio.c
index a91e6e0..9d0802c 100644
--- a/commands/gpio.c
+++ b/commands/gpio.c
@@ -40,6 +40,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(gpio_get_value)
 	.cmd		= do_gpio_get_value,
 	.usage		= "return value of a gpio pin",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_gpio_get_value_help)
 BAREBOX_CMD_END
 
@@ -66,6 +67,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(gpio_set_value)
 	.cmd		= do_gpio_set_value,
 	.usage		= "set a gpio's output value",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_gpio_set_value_help)
 BAREBOX_CMD_END
 
@@ -93,6 +95,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(gpio_direction_input)
 	.cmd		= do_gpio_direction_input,
 	.usage		= "set direction of a gpio pin to input",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_gpio_direction_input_help)
 BAREBOX_CMD_END
 
@@ -121,6 +124,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(gpio_direction_output)
 	.cmd		= do_gpio_direction_output,
 	.usage		= "set direction of a gpio pin to output",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_gpio_direction_output_help)
 BAREBOX_CMD_END
 
diff --git a/commands/help.c b/commands/help.c
index a12d9c3..7f31ce1 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -19,8 +19,68 @@
 
 #include <common.h>
 #include <command.h>
+#include <getopt.h>
 #include <complete.h>
 
+
+static void list_group(int verbose, const char *grpname, uint32_t group)
+{
+	struct command *cmdtp;
+	bool first = true;
+	int pos = 0;
+	int len;
+
+	for_each_command(cmdtp) {
+		if (cmdtp->group != group)
+			continue;
+		if (first) {
+			first = false;
+			printf("%s commands:\n", grpname);
+			if (!verbose) {
+				printf("  ");
+				pos = 2;
+			}
+		}
+		if (verbose) {
+			printf("  %-21s %s\n", cmdtp->name, cmdtp->usage);
+			continue;
+		}
+		len = strlen(cmdtp->name);
+		if (pos + len + 2 > 77) {
+			printf("\n  %s", cmdtp->name);
+			pos = len + 2;
+		} else {
+			if (pos != 2) {
+				printf(", ");
+				pos += 2;
+			}
+			printf(cmdtp->name);
+			pos += len;
+		}
+	}
+	if (!first)
+		printf("\n");
+}
+
+static void list_commands(int verbose)
+{
+	putchar('\n');
+	list_group(verbose, "Information",           CMD_GRP_INFO);
+	list_group(verbose, "Boot",                  CMD_GRP_BOOT);
+	list_group(verbose, "Environment",           CMD_GRP_ENV);
+	list_group(verbose, "Partition",             CMD_GRP_PART);
+	list_group(verbose, "File",                  CMD_GRP_FILE);
+	list_group(verbose, "Scripting",             CMD_GRP_SCRIPT);
+	list_group(verbose, "Network",               CMD_GRP_NET);
+	list_group(verbose, "Console",               CMD_GRP_CONSOLE);
+	list_group(verbose, "Memory",                CMD_GRP_MEM);
+	list_group(verbose, "Hardware manipulation", CMD_GRP_HWMANIP);
+	list_group(verbose, "Miscellaneous",         CMD_GRP_MISC);
+	list_group(verbose, "Ungrouped",             0);
+	printf("Use 'help COMMAND' for more details.\n\n");
+}
+
+
 /*
  * Use puts() instead of printf() to avoid printf buffer overflow
  * for long help messages
@@ -28,23 +88,23 @@
 static int do_help(int argc, char *argv[])
 {
 	struct command *cmdtp;
-	int max_length = 0;
-
-	if (argc == 1) {	/* show list of commands */
-		for_each_command(cmdtp)
-			if(strlen(cmdtp->name) > max_length)
-				max_length = strlen(cmdtp->name);
+	int opt, verbose = 0;
 
-		for_each_command(cmdtp) {
-			if (!cmdtp->usage)
-				continue;
-			printf("%*s - %s\n", max_length, cmdtp->name, cmdtp->usage);
+	while ((opt = getopt(argc, argv, "v")) > 0) {
+		switch (opt) {
+		case 'v':
+			verbose = 1;
+			break;
 		}
+	}
+
+	if (optind == argc) {	/* show list of commands */
+		list_commands(verbose);
 		return 0;
 	}
 
 	/* command help (long version) */
-	if ((cmdtp = find_cmd(argv[1])) != NULL) {
+	if ((cmdtp = find_cmd(argv[optind])) != NULL) {
 		barebox_cmd_usage(cmdtp);
 		return 0;
 	} else {
@@ -59,9 +119,9 @@ static int do_help(int argc, char *argv[])
 static const __maybe_unused char cmd_help_help[] =
 "Show help information (for 'command')\n"
 "'help' prints online help for the monitor commands.\n\n"
-"Without arguments, it prints a short usage message for all commands.\n\n"
+"Without arguments, it lists all all commands.\n\n"
 "To get detailed help information for specific commands you can type\n"
-"'help' with one or more command names as arguments.\n";
+"'help' with a command names as argument.\n";
 
 static const char *help_aliases[] = { "?", NULL};
 
@@ -69,6 +129,7 @@ BAREBOX_CMD_START(help)
 	.cmd		= do_help,
 	.aliases	= help_aliases,
 	.usage		= "print online help",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_help_help)
 	BAREBOX_CMD_COMPLETE(command_complete)
 BAREBOX_CMD_END
diff --git a/commands/i2c.c b/commands/i2c.c
index 626255d..137cd85 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -63,6 +63,7 @@ static const __maybe_unused char cmd_i2c_probe_help[] =
 BAREBOX_CMD_START(i2c_probe)
 	.cmd		= do_i2c_probe,
 	.usage		= "probe for an i2c device",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_probe_help)
 BAREBOX_CMD_END
 
@@ -140,6 +141,7 @@ static const __maybe_unused char cmd_i2c_write_help[] =
 BAREBOX_CMD_START(i2c_write)
 	.cmd		= do_i2c_write,
 	.usage		= "write to an i2c device",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_write_help)
 BAREBOX_CMD_END
 
@@ -214,5 +216,6 @@ static const __maybe_unused char cmd_i2c_read_help[] =
 BAREBOX_CMD_START(i2c_read)
 	.cmd		= do_i2c_read,
 	.usage		= "read from an i2c device",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_read_help)
 BAREBOX_CMD_END
diff --git a/commands/insmod.c b/commands/insmod.c
index f547e9d..5c7c43e 100644
--- a/commands/insmod.c
+++ b/commands/insmod.c
@@ -33,10 +33,11 @@ static int do_insmod(int argc, char *argv[])
 }
 
 static const __maybe_unused char cmd_insmod_help[] =
-"Usage: insmod <module>\n"; 
+"Usage: insmod <module>\n";
 
 BAREBOX_CMD_START(insmod)
 	.cmd		= do_insmod,
 	.usage		= "insert a module",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_insmod_help)
 BAREBOX_CMD_END
diff --git a/commands/iomemport.c b/commands/iomemport.c
index 652708c..d4a1672 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -50,6 +50,7 @@ static int do_iomem(int argc, char *argv[])
 BAREBOX_CMD_START(iomem)
 	.cmd		= do_iomem,
 	.usage		= "show iomem usage",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
 
 #if IO_SPACE_LIMIT > 0
@@ -63,5 +64,6 @@ static int do_ioport(int argc, char *argv[])
 BAREBOX_CMD_START(ioport)
 	.cmd		= do_ioport,
 	.usage		= "show ioport usage",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
 #endif
diff --git a/commands/led.c b/commands/led.c
index a4f117b..0e57d7e 100644
--- a/commands/led.c
+++ b/commands/led.c
@@ -88,5 +88,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(led)
 	.cmd		= do_led,
 	.usage		= "led <led> <value>",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_led_help)
 BAREBOX_CMD_END
diff --git a/commands/let.c b/commands/let.c
index 644ede5..68c98e3 100644
--- a/commands/let.c
+++ b/commands/let.c
@@ -89,5 +89,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(let)
 	.cmd            = do_let,
 	.usage          = "evaluate arithmetic expressions",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_let_help)
 BAREBOX_CMD_END
diff --git a/commands/linux16.c b/commands/linux16.c
index 30fa2de..ac1265a 100644
--- a/commands/linux16.c
+++ b/commands/linux16.c
@@ -338,6 +338,7 @@ x86_boot_preparation for more info about how to use this command.</p>
 BAREBOX_CMD_START(linux16)
 	.cmd		= do_linux16,
 	.usage		= "boot a linux kernel",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_linux16_help)
 BAREBOX_CMD_END
 
diff --git a/commands/linux_exec.c b/commands/linux_exec.c
index ef00ee7..a057fc5 100644
--- a/commands/linux_exec.c
+++ b/commands/linux_exec.c
@@ -53,5 +53,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(linux_exec)
 	.cmd		= do_linux_exec,
 	.usage		= "Execute a command on the host",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_linux_exec_help)
 BAREBOX_CMD_END
diff --git a/commands/ln.c b/commands/ln.c
index 0237447..f622819 100644
--- a/commands/ln.c
+++ b/commands/ln.c
@@ -47,5 +47,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(ln)
 	.cmd		= do_ln,
 	.usage		= "symlink - make a new name for a file",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_ln_help)
 BAREBOX_CMD_END
diff --git a/commands/loadb.c b/commands/loadb.c
index b527e00..6ff36dc 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -708,5 +708,6 @@ static const __maybe_unused char cmd_loadb_help[] =
 BAREBOX_CMD_START(loadb)
 	.cmd = do_load_serial_bin,
 	.usage = "Load binary file over serial line (kermit mode)",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_loadb_help)
 BAREBOX_CMD_END
diff --git a/commands/loadenv.c b/commands/loadenv.c
index a39ca8c..ef7ad13 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -122,5 +122,6 @@ ENVFS can only handle files, directories are skipped silently.
 BAREBOX_CMD_START(loadenv)
 	.cmd		= do_loadenv,
 	.usage		= "Load environment from ENVFS into DIRECTORY (default: /dev/env0 -> /env).",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_loadenv_help)
 BAREBOX_CMD_END
diff --git a/commands/loads.c b/commands/loads.c
index 58cd24b..d67372b 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -277,6 +277,7 @@ static const __maybe_unused char cmd_loads_help[] =
 BAREBOX_CMD_START(loads)
 	.cmd		= do_load_serial,
 	.usage		= "load S-Record file over serial line",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_loads_help)
 BAREBOX_CMD_END
 
@@ -293,6 +294,7 @@ static const __maybe_unused char cmd_saves_help[] =
 BAREBOX_CMD_START(saves)
 	.cmd		= do_save_serial,
 	.usage		= "save S-Record file over serial line",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_saves_help)
 BAREBOX_CMD_END
 #endif	/* CONFIG_CMD_SAVES */
diff --git a/commands/loadxy.c b/commands/loadxy.c
index 93a423c..acc800b 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -236,6 +236,7 @@ static const __maybe_unused char cmd_loadx_help[] =
 BAREBOX_CMD_START(loadx)
 	.cmd = do_loadx,
 	.usage = "Load binary file over serial line (X-Modem)",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 BAREBOX_CMD_HELP(cmd_loadx_help)
 BAREBOX_CMD_END
 
@@ -248,6 +249,7 @@ static const __maybe_unused char cmd_loady_help[] =
 BAREBOX_CMD_START(loady)
 	.cmd = do_loady,
 	.usage = "Load binary file over serial line (Y-Modem or Y-Modem/G)",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 BAREBOX_CMD_HELP(cmd_loady_help)
 BAREBOX_CMD_END
 #endif
diff --git a/commands/login.c b/commands/login.c
index d9297fa..35ab84a 100644
--- a/commands/login.c
+++ b/commands/login.c
@@ -87,6 +87,7 @@ static const __maybe_unused char cmd_login_help[] =
 BAREBOX_CMD_START(login)
 	.cmd		= do_login,
 	.usage		= "login",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_login_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/ls.c b/commands/ls.c
index f2d9903..60bbfe3 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -212,5 +212,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(ls)
 	.cmd		= do_ls,
 	.usage		= "list a file or directory",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_ls_help)
 BAREBOX_CMD_END
diff --git a/commands/lsmod.c b/commands/lsmod.c
index e54eadc..751ecfe 100644
--- a/commands/lsmod.c
+++ b/commands/lsmod.c
@@ -16,5 +16,6 @@ static int do_lsmod(int argc, char *argv[])
 BAREBOX_CMD_START(lsmod)
 	.cmd		= do_lsmod,
 	.usage		= "list modules",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/magicvar.c b/commands/magicvar.c
index b208d33..8f93227 100644
--- a/commands/magicvar.c
+++ b/commands/magicvar.c
@@ -17,4 +17,5 @@ static int do_magicvar(int argc, char *argv[])
 BAREBOX_CMD_START(magicvar)
 	.cmd		= do_magicvar,
 	.usage		= "List information about magic variables",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 BAREBOX_CMD_END
diff --git a/commands/md.c b/commands/md.c
index 03c5905..e5eb705 100644
--- a/commands/md.c
+++ b/commands/md.c
@@ -112,5 +112,6 @@ static const __maybe_unused char cmd_md_help[] =
 BAREBOX_CMD_START(md)
 	.cmd		= do_mem_md,
 	.usage		= "memory display",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_md_help)
 BAREBOX_CMD_END
diff --git a/commands/memcmp.c b/commands/memcmp.c
index 4a03862..ea178c9 100644
--- a/commands/memcmp.c
+++ b/commands/memcmp.c
@@ -144,5 +144,6 @@ static const __maybe_unused char cmd_memcmp_help[] =
 BAREBOX_CMD_START(memcmp)
 	.cmd		= do_memcmp,
 	.usage		= "memory compare",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memcmp_help)
 BAREBOX_CMD_END
diff --git a/commands/memcpy.c b/commands/memcpy.c
index 98f099f..5a791b0 100644
--- a/commands/memcpy.c
+++ b/commands/memcpy.c
@@ -141,5 +141,6 @@ static const __maybe_unused char cmd_memcpy_help[] =
 BAREBOX_CMD_START(memcpy)
 	.cmd		= do_memcpy,
 	.usage		= "memory copy",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memcpy_help)
 BAREBOX_CMD_END
diff --git a/commands/meminfo.c b/commands/meminfo.c
index 6e1e8c3..a73c462 100644
--- a/commands/meminfo.c
+++ b/commands/meminfo.c
@@ -31,5 +31,6 @@ static int do_meminfo(int argc, char *argv[])
 BAREBOX_CMD_START(meminfo)
 	.cmd		= do_meminfo,
 	.usage		= "print info about memory usage",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/memset.c b/commands/memset.c
index 48e55bc..d557b9e 100644
--- a/commands/memset.c
+++ b/commands/memset.c
@@ -97,5 +97,6 @@ static const __maybe_unused char cmd_memset_help[] =
 BAREBOX_CMD_START(memset)
 	.cmd		= do_memset,
 	.usage		= "memory fill",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memset_help)
 BAREBOX_CMD_END
diff --git a/commands/memtest.c b/commands/memtest.c
index 5854375..8308c6c 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -239,5 +239,6 @@ static const __maybe_unused char cmd_memtest_help[] =
 BAREBOX_CMD_START(memtest)
 	.cmd		= do_memtest,
 	.usage		= "Memory Test",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memtest_help)
 BAREBOX_CMD_END
diff --git a/commands/menu.c b/commands/menu.c
index 9b96942..99cb7cb 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -472,5 +472,6 @@ static const __maybe_unused char cmd_menu_help[] =
 BAREBOX_CMD_START(menu)
 	.cmd		= do_menu,
 	.usage		= "Menu Management",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_menu_help)
 BAREBOX_CMD_END
diff --git a/commands/menutree.c b/commands/menutree.c
index 3b1a263..4defa66 100644
--- a/commands/menutree.c
+++ b/commands/menutree.c
@@ -56,5 +56,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(menutree)
 	.cmd	= do_menutree,
 	.usage		= "create a menu from a directory structure",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_menutree_help)
 BAREBOX_CMD_END
diff --git a/commands/miitool.c b/commands/miitool.c
index 1e5d4eb..a382e67 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -298,5 +298,6 @@ adapters use an MII to autonegotiate link speed and duplex setting.
 BAREBOX_CMD_START(miitool)
 	.cmd		= do_miitool,
 	.usage		= "view media-independent interface status",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_miitool_help)
 BAREBOX_CMD_END
diff --git a/commands/mkdir.c b/commands/mkdir.c
index 55df379..3a55c0c 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -66,5 +66,6 @@ static const __maybe_unused char cmd_mkdir_help[] =
 BAREBOX_CMD_START(mkdir)
 	.cmd		= do_mkdir,
 	.usage		= "make directories",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_mkdir_help)
 BAREBOX_CMD_END
diff --git a/commands/mm.c b/commands/mm.c
index f51fd27..b4565b9 100644
--- a/commands/mm.c
+++ b/commands/mm.c
@@ -113,5 +113,6 @@ static const __maybe_unused char cmd_mm_help[] =
 BAREBOX_CMD_START(mm)
 	.cmd		= do_mem_mm,
 	.usage		= "memory modify write with mask",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_mm_help)
 BAREBOX_CMD_END
diff --git a/commands/mount.c b/commands/mount.c
index 8629bac..0996a6a 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -163,5 +163,6 @@ the filesystem has been unmounted.
 BAREBOX_CMD_START(mount)
 	.cmd		= do_mount,
 	.usage		= "Mount a filesystem of a given type to a mountpoint or list mounted filesystems.",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_mount_help)
 BAREBOX_CMD_END
diff --git a/commands/msleep.c b/commands/msleep.c
index c9fa23c..0ac8cf8 100644
--- a/commands/msleep.c
+++ b/commands/msleep.c
@@ -37,4 +37,5 @@ static int do_msleep(int argc, char *argv[])
 BAREBOX_CMD_START(msleep)
 	.cmd		= do_msleep,
 	.usage		= "delay execution for n milliseconds",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 BAREBOX_CMD_END
diff --git a/commands/mw.c b/commands/mw.c
index d7d73a8..5c0c992 100644
--- a/commands/mw.c
+++ b/commands/mw.c
@@ -100,5 +100,6 @@ static const __maybe_unused char cmd_mw_help[] =
 BAREBOX_CMD_START(mw)
 	.cmd		= do_mem_mw,
 	.usage		= "memory write (fill)",
+	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_mw_help)
 BAREBOX_CMD_END
diff --git a/commands/nand.c b/commands/nand.c
index 39fb64e..137fdac 100644
--- a/commands/nand.c
+++ b/commands/nand.c
@@ -110,5 +110,6 @@ static const __maybe_unused char cmd_nand_help[] =
 BAREBOX_CMD_START(nand)
 	.cmd		= do_nand,
 	.usage		= "NAND specific handling",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_nand_help)
 BAREBOX_CMD_END
diff --git a/commands/nandtest.c b/commands/nandtest.c
index 373ee2c..8af75ba 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -349,5 +349,6 @@ static const __maybe_unused char cmd_nandtest_help[] =
 BAREBOX_CMD_START(nandtest)
 	.cmd		= do_nandtest,
 	.usage		= "NAND Test",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_nandtest_help)
 BAREBOX_CMD_END
diff --git a/commands/net.c b/commands/net.c
index 49ffecc..19e4541 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -63,6 +63,7 @@ static const __maybe_unused char cmd_ethact_help[] =
 BAREBOX_CMD_START(ethact)
 	.cmd		= do_ethact,
 	.usage		= "set current ethernet device",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_ethact_help)
 	BAREBOX_CMD_COMPLETE(eth_complete)
 BAREBOX_CMD_END
diff --git a/commands/of_node.c b/commands/of_node.c
index b1894b1..17deb50 100644
--- a/commands/of_node.c
+++ b/commands/of_node.c
@@ -102,5 +102,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(of_node)
 	.cmd		= do_of_node,
 	.usage		= "handle of nodes",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_of_node_help)
 BAREBOX_CMD_END
diff --git a/commands/of_property.c b/commands/of_property.c
index 4518c72..dcb85ec 100644
--- a/commands/of_property.c
+++ b/commands/of_property.c
@@ -314,5 +314,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(of_property)
 	.cmd		= do_of_property,
 	.usage		= "handle of properties",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_of_property_help)
 BAREBOX_CMD_END
diff --git a/commands/oftree.c b/commands/oftree.c
index 3fa516c..a0e6802 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -204,5 +204,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(oftree)
 	.cmd		= do_oftree,
 	.usage		= "handle devicetrees",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_oftree_help)
 BAREBOX_CMD_END
diff --git a/commands/partition.c b/commands/partition.c
index 44b91d1..e33358a 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -187,6 +187,7 @@ kernel or cmdline mtd partitions.
 BAREBOX_CMD_START(addpart)
 	.cmd = do_addpart,
 	.usage = "adds a partition table to a device",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_addpart_help)
 BAREBOX_CMD_END
 
@@ -224,6 +225,7 @@ argument list is taken as a list of partitions to be deleted.
 BAREBOX_CMD_START(delpart)
 	.cmd = do_delpart,
 	.usage = "delete partition(s)",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_delpart_help)
 	BAREBOX_CMD_COMPLETE(devfs_partition_complete)
 BAREBOX_CMD_END
diff --git a/commands/passwd.c b/commands/passwd.c
index 368c401..47f7dab 100644
--- a/commands/passwd.c
+++ b/commands/passwd.c
@@ -92,6 +92,7 @@ static const __maybe_unused char cmd_passwd_help[] =
 BAREBOX_CMD_START(passwd)
 	.cmd		= do_passwd,
 	.usage		= "passwd",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_passwd_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/poweroff.c b/commands/poweroff.c
index ebb146c..be749ff 100644
--- a/commands/poweroff.c
+++ b/commands/poweroff.c
@@ -34,4 +34,5 @@ static int cmd_poweroff(int argc, char *argv[])
 BAREBOX_CMD_START(poweroff)
 	.cmd		= cmd_poweroff,
 	.usage		= "Perform POWER OFF of the board",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 BAREBOX_CMD_END
diff --git a/commands/printenv.c b/commands/printenv.c
index 10e882a..27ca10d 100644
--- a/commands/printenv.c
+++ b/commands/printenv.c
@@ -73,5 +73,6 @@ printed.</p>
 BAREBOX_CMD_START(printenv)
 	.cmd		= do_printenv,
 	.usage		= "Print value of one or all environment variables.",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_printenv_help)
 BAREBOX_CMD_END
diff --git a/commands/pwd.c b/commands/pwd.c
index 6fe4cf3..fb652f5 100644
--- a/commands/pwd.c
+++ b/commands/pwd.c
@@ -30,5 +30,6 @@ static int do_pwd(int argc, char *argv[])
 BAREBOX_CMD_START(pwd)
 	.cmd		= do_pwd,
 	.usage		= "print working directory",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/readf.c b/commands/readf.c
index 6314c7e..be88dfa 100644
--- a/commands/readf.c
+++ b/commands/readf.c
@@ -59,5 +59,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(readf)
 	.cmd		= do_readf,
 	.usage		= "read file into variable",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_readf_help)
 BAREBOX_CMD_END
diff --git a/commands/readline.c b/commands/readline.c
index 60670fa..c1a2496 100644
--- a/commands/readline.c
+++ b/commands/readline.c
@@ -48,6 +48,7 @@ static const __maybe_unused char cmd_readline_help[] =
 BAREBOX_CMD_START(readline)
 	.cmd		= do_readline,
 	.usage		= "prompt for user input",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_readline_help)
 BAREBOX_CMD_END
 
diff --git a/commands/readlink.c b/commands/readlink.c
index d2671e0..8d2a191 100644
--- a/commands/readlink.c
+++ b/commands/readlink.c
@@ -76,5 +76,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(readlink)
 	.cmd		= do_readlink,
 	.usage		= "read value of a symbolic link",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_readlink_help)
 BAREBOX_CMD_END
diff --git a/commands/reginfo.c b/commands/reginfo.c
index f5bc8a0..92108b9 100644
--- a/commands/reginfo.c
+++ b/commands/reginfo.c
@@ -30,5 +30,6 @@ static int do_reginfo(int argc, char *argv[])
 BAREBOX_CMD_START(reginfo)
 	.cmd		= do_reginfo,
 	.usage		= "print register information",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/regulator.c b/commands/regulator.c
index 42dcd0a..bdf4d88 100644
--- a/commands/regulator.c
+++ b/commands/regulator.c
@@ -30,4 +30,5 @@ static int do_regulator(int argc, char *argv[])
 BAREBOX_CMD_START(regulator)
 	.cmd		= do_regulator,
 	.usage		= "list regulators",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/commands/reset.c b/commands/reset.c
index 79885f4..9478618 100644
--- a/commands/reset.c
+++ b/commands/reset.c
@@ -54,6 +54,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(reset)
 	.cmd		= cmd_reset,
 	.usage		= "Perform RESET of the CPU",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_reset_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/rm.c b/commands/rm.c
index 5486005..39544f4 100644
--- a/commands/rm.c
+++ b/commands/rm.c
@@ -66,5 +66,6 @@ static const __maybe_unused char cmd_rm_help[] =
 BAREBOX_CMD_START(rm)
 	.cmd		= do_rm,
 	.usage		= "remove files",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_rm_help)
 BAREBOX_CMD_END
diff --git a/commands/rmdir.c b/commands/rmdir.c
index 6034a10..f756537 100644
--- a/commands/rmdir.c
+++ b/commands/rmdir.c
@@ -28,5 +28,6 @@ static const __maybe_unused char cmd_rmdir_help[] =
 BAREBOX_CMD_START(rmdir)
 	.cmd		= do_rmdir,
 	.usage		= "remove directorie(s)",
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_rmdir_help)
 BAREBOX_CMD_END
diff --git a/commands/saveenv.c b/commands/saveenv.c
index cb2b01d..866c91f 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -55,6 +55,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(saveenv)
 	.cmd		= do_saveenv,
 	.usage		= "save environment to persistent storage",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_saveenv_help)
 BAREBOX_CMD_END
 
diff --git a/commands/setenv.c b/commands/setenv.c
index 57ba71e..ff8ef9b 100644
--- a/commands/setenv.c
+++ b/commands/setenv.c
@@ -53,5 +53,6 @@ in use. Within the hush shell, \c setenv is not required.</p>
 BAREBOX_CMD_START(setenv)
 	.cmd		= do_setenv,
 	.usage		= "set environment variables",
+	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_setenv_help)
 BAREBOX_CMD_END
diff --git a/commands/sleep.c b/commands/sleep.c
index 2574804..e39e2d3 100644
--- a/commands/sleep.c
+++ b/commands/sleep.c
@@ -44,5 +44,6 @@ static int do_sleep(int argc, char *argv[])
 BAREBOX_CMD_START(sleep)
 	.cmd		= do_sleep,
 	.usage		= "delay execution for n seconds",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(command_var_complete)
 BAREBOX_CMD_END
diff --git a/commands/spi.c b/commands/spi.c
index 79fc539..ff27a7b 100644
--- a/commands/spi.c
+++ b/commands/spi.c
@@ -128,5 +128,6 @@ static const __maybe_unused char cmd_spi_help[] =
 BAREBOX_CMD_START(spi)
 	.cmd		= do_spi,
 	.usage		= "write/read spi device",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_spi_help)
 BAREBOX_CMD_END
diff --git a/commands/splash.c b/commands/splash.c
index 0955c01..24ef47a 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -101,5 +101,6 @@ color depth.
 BAREBOX_CMD_START(splash)
 	.cmd		= do_splash,
 	.usage		= "show a bmp image",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_splash_help)
 BAREBOX_CMD_END
diff --git a/commands/test.c b/commands/test.c
index b3cd164..3f652f4 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -237,5 +237,6 @@ BAREBOX_CMD_START(test)
 	.aliases	= test_aliases,
 	.cmd		= do_test,
 	.usage		= cmd_test_usage,
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_test_help)
 BAREBOX_CMD_END
diff --git a/commands/tftp.c b/commands/tftp.c
index 64cab2f..84c69f9 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -99,5 +99,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(tftp)
 	.cmd		= do_tftpb,
 	.usage		= "(up-)Load file using tftp protocol",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_tftp_help)
 BAREBOX_CMD_END
diff --git a/commands/time.c b/commands/time.c
index ffd3062..6a696c2 100644
--- a/commands/time.c
+++ b/commands/time.c
@@ -53,5 +53,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(time)
 	.cmd		= do_time,
 	.usage		= "measure execution time of a command",
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_time_help)
 BAREBOX_CMD_END
diff --git a/commands/timeout.c b/commands/timeout.c
index feb27f5..0e81583 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -114,6 +114,7 @@ static const __maybe_unused char cmd_timeout_help[] =
 BAREBOX_CMD_START(timeout)
 	.cmd		= do_timeout,
 	.usage		= "wait for a specified timeout",
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_timeout_help)
 BAREBOX_CMD_END
 
diff --git a/commands/trigger.c b/commands/trigger.c
index de50bdd..93b4416 100644
--- a/commands/trigger.c
+++ b/commands/trigger.c
@@ -99,6 +99,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(trigger)
 	.cmd		= do_trigger,
 	.usage		= "handle LED triggers",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_trigger_help)
 BAREBOX_CMD_END
 
diff --git a/commands/true.c b/commands/true.c
index a09776b..6ebbd72 100644
--- a/commands/true.c
+++ b/commands/true.c
@@ -29,6 +29,7 @@ static int do_true(int argc, char *argv[])
 BAREBOX_CMD_START(true)
 	.cmd		= do_true,
 	.usage		= "do nothing, successfully",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 
diff --git a/commands/ubi.c b/commands/ubi.c
index 8a409c2..9a70db1 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -52,6 +52,7 @@ static const __maybe_unused char cmd_ubimkvol_help[] =
 BAREBOX_CMD_START(ubimkvol)
 	.cmd		= do_ubimkvol,
 	.usage		= "create an ubi volume",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubimkvol_help)
 BAREBOX_CMD_END
 
@@ -106,6 +107,7 @@ static const __maybe_unused char cmd_ubiattach_help[] =
 BAREBOX_CMD_START(ubiattach)
 	.cmd		= do_ubiattach,
 	.usage		= "attach a mtd dev to ubi",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubiattach_help)
 BAREBOX_CMD_END
 
@@ -132,6 +134,7 @@ static const __maybe_unused char cmd_ubidetach_help[] =
 BAREBOX_CMD_START(ubidetach)
 	.cmd		= do_ubidetach,
 	.usage		= "detach an ubi dev",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubidetach_help)
 BAREBOX_CMD_END
 
@@ -167,6 +170,7 @@ static const __maybe_unused char cmd_ubirmvol_help[] =
 BAREBOX_CMD_START(ubirmvol)
 	.cmd		= do_ubirmvol,
 	.usage		= "delete an ubi volume",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubirmvol_help)
 BAREBOX_CMD_END
 
diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index 5b4e572..98e8c52 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -793,5 +793,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(ubiformat)
 	.cmd		= do_ubiformat,
 	.usage		= "format an ubi volume",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubiformat_help)
 BAREBOX_CMD_END
diff --git a/commands/uimage.c b/commands/uimage.c
index bdc7444..a4bc2cc 100644
--- a/commands/uimage.c
+++ b/commands/uimage.c
@@ -101,5 +101,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(uimage)
 	.cmd		= do_uimage,
 	.usage		= "extract/verify uImage",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_uimage_help)
 BAREBOX_CMD_END
diff --git a/commands/umount.c b/commands/umount.c
index f0f9fce..39ce56c 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -36,5 +36,6 @@ static const __maybe_unused char cmd_umount_help[] =
 BAREBOX_CMD_START(umount)
 	.cmd		= do_umount,
 	.usage		= "umount a filesystem",
+	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_umount_help)
 BAREBOX_CMD_END
diff --git a/commands/uncompress.c b/commands/uncompress.c
index 58c8c96..0b4398f 100644
--- a/commands/uncompress.c
+++ b/commands/uncompress.c
@@ -62,6 +62,7 @@ static const __maybe_unused char cmd_uncompress_help[] =
 BAREBOX_CMD_START(uncompress)
         .cmd            = do_uncompress,
         .usage          = "uncompress a compressed file",
+        BAREBOX_CMD_GROUP(CMD_GRP_FILE)
         BAREBOX_CMD_HELP(cmd_uncompress_help)
 BAREBOX_CMD_END
 
diff --git a/commands/usb.c b/commands/usb.c
index 9aee430..6e40a60 100644
--- a/commands/usb.c
+++ b/commands/usb.c
@@ -49,6 +49,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(usb)
 	.cmd		= do_usb,
 	.usage		= "(re-)detect USB devices",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_usb_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/usbserial.c b/commands/usbserial.c
index 969fd25..ee4e83d 100644
--- a/commands/usbserial.c
+++ b/commands/usbserial.c
@@ -98,5 +98,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(usbserial)
 	.cmd		= do_usbserial,
 	.usage		= "Serial gadget enable/disable",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_usbserial_help)
 BAREBOX_CMD_END
diff --git a/commands/version.c b/commands/version.c
index 6578fdd..e2f0f5f 100644
--- a/commands/version.c
+++ b/commands/version.c
@@ -30,6 +30,7 @@ static int do_version(int argc, char *argv[])
 BAREBOX_CMD_START(version)
 	.cmd		= do_version,
 	.usage		= "print monitor version",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 
diff --git a/commands/wd.c b/commands/wd.c
index 080bab9..bc5587f 100644
--- a/commands/wd.c
+++ b/commands/wd.c
@@ -64,5 +64,6 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(wd)
 	.cmd = do_wd,
 	.usage = "enable/disable/trigger the watchdog",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_wd_help)
 BAREBOX_CMD_END
diff --git a/common/hush.c b/common/hush.c
index 1447fdb..5893c51 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1940,6 +1940,7 @@ static const __maybe_unused char cmd_sh_help[] =
 BAREBOX_CMD_START(sh)
 	.cmd		= do_sh,
 	.usage		= "run shell script",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_sh_help)
 BAREBOX_CMD_END
 
@@ -1983,6 +1984,7 @@ BAREBOX_CMD_START(source)
 	.aliases	= source_aliases,
 	.cmd		= do_source,
 	.usage		= cmd_source_usage,
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_source_help)
 BAREBOX_CMD_END
 
@@ -2004,6 +2006,7 @@ static const __maybe_unused char cmd_exit_help[] =
 BAREBOX_CMD_START(exit)
 	.cmd		= do_dummy_command,
 	.usage		= "exit script",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_exit_help)
 BAREBOX_CMD_END
 
@@ -2020,6 +2023,7 @@ static const __maybe_unused char cmd_getopt_help[] =
 BAREBOX_CMD_START(getopt)
 	.cmd		= do_dummy_command,
 	.usage		= "getopt <optstring> <var>",
+	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_getopt_help)
 BAREBOX_CMD_END
 #endif
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 193c36c..2068a1e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -348,6 +348,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(gpiolib)
 	.cmd		= do_gpiolib,
 	.usage		= "dump current registered gpio",
+	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_gpiolib_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/drivers/mtd/nand/nand_imx_bbm.c b/drivers/mtd/nand/nand_imx_bbm.c
index 135d74e..670a5e1 100644
--- a/drivers/mtd/nand/nand_imx_bbm.c
+++ b/drivers/mtd/nand/nand_imx_bbm.c
@@ -219,5 +219,6 @@ static const __maybe_unused char cmd_imx_nand_bbm_help[] =
 BAREBOX_CMD_START(imx_nand_bbm)
 	.cmd		= do_imx_nand_bbm,
 	.usage		= "create bbt for i.MX NAND",
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_imx_nand_bbm_help)
 BAREBOX_CMD_END
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index 4406352..883d7dd 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -644,6 +644,7 @@ static const __maybe_unused char cmd_nand_boot_test_help[] =
 BAREBOX_CMD_START(nand_boot_test)
 	.cmd		= do_nand_boot_test,
 	.usage		= "load an image from NAND",
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_nand_boot_test_help)
 BAREBOX_CMD_END
 #endif
diff --git a/drivers/of/base.c b/drivers/of/base.c
index c440a69..cdeebc0 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1713,8 +1713,10 @@ int of_add_memory(struct device_node *node, bool dump)
 			continue;
 		}
 
+#if 0
 		of_add_memory_bank(node, dump, n,
 				res.start, resource_size(&res));
+#endif
 		n++;
 	}
 
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index dbadbe4..c2072dc 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -511,6 +511,7 @@ static int do_mycdev(int argc, char *argv[])
 
 BAREBOX_CMD_START(mycdev)
 	.cmd		= do_mycdev,
+	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 
diff --git a/include/command.h b/include/command.h
index ffc722c..15ce8d4 100644
--- a/include/command.h
+++ b/include/command.h
@@ -50,6 +50,7 @@ struct command {
 	const char	*usage;		/* Usage message	(short)	*/
 
 	struct list_head list;		/* List of commands		*/
+	uint32_t	group;
 #ifdef	CONFIG_LONGHELP
 	const char	*help;		/* Help  message	(long)	*/
 #endif
@@ -73,6 +74,19 @@ void barebox_cmd_usage(struct command *cmdtp);
 #define COMMAND_ERROR		1
 #define COMMAND_ERROR_USAGE	2
 
+/* Note: keep this list in sync with commands/command.c */
+#define CMD_GRP_INFO		1
+#define CMD_GRP_BOOT		2
+#define CMD_GRP_ENV		3
+#define CMD_GRP_FILE		4
+#define CMD_GRP_PART		5
+#define CMD_GRP_SCRIPT		6
+#define CMD_GRP_NET		7
+#define CMD_GRP_CONSOLE		8
+#define CMD_GRP_MEM		9
+#define CMD_GRP_HWMANIP		10
+#define CMD_GRP_MISC		11
+
 #endif	/* __ASSEMBLY__ */
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -108,6 +122,8 @@ static const __maybe_unused char cmd_##_name##_help[] =
 #define BAREBOX_CMD_HELP(text)
 #endif
 
+#define BAREBOX_CMD_GROUP(grp)	.group = grp,
+
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
 int register_command(struct command *);
diff --git a/net/dhcp.c b/net/dhcp.c
index e0c231f..71d86d6 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -816,6 +816,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(dhcp)
 	.cmd		= do_dhcp,
 	.usage		= "invoke dhcp client to obtain ip/boot params",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_dhcp_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/net/dns.c b/net/dns.c
index afd2663..847458b 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -266,6 +266,7 @@ static const __maybe_unused char cmd_host_help[] =
 BAREBOX_CMD_START(host)
 	.cmd		= do_host,
 	.usage		= "resolve a hostname",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_host_help)
 BAREBOX_CMD_END
 
diff --git a/net/ifup.c b/net/ifup.c
index 409b338..7bb273b 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -179,6 +179,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(ifup)
 	.cmd		= do_ifup,
 	.usage		= "Bring up network interfaces",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_ifup_help)
 BAREBOX_CMD_END
 
diff --git a/net/nfs.c b/net/nfs.c
index 9cb7dc9..94260b9 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -732,6 +732,7 @@ static const __maybe_unused char cmd_nfs_help[] =
 BAREBOX_CMD_START(nfs)
 	.cmd		= do_nfs,
 	.usage		= "boot image via network using nfs protocol",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_nfs_help)
 BAREBOX_CMD_END
 
diff --git a/net/ping.c b/net/ping.c
index bc6cf2e..15cd692 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -118,4 +118,5 @@ out:
 BAREBOX_CMD_START(ping)
 	.cmd		= do_ping,
 	.usage		= "ping <destination>",
+	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 02/19] commands: harmonize in-barebox documentation
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
  2014-05-13  8:28 ` [PATCH 01/19] commands: group 'help' output Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 03/19] commands: harmonize in-barebox docs with Kconfig docs Holger Schurig
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

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>
---
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |    8 +--
 arch/arm/boards/guf-cupid/board.c                 |    9 +---
 arch/arm/boards/phytec-phycore-imx35/pcm043.c     |    9 +---
 arch/arm/cpu/cpuinfo.c                            |    2 +-
 arch/arm/cpu/mmuinfo.c                            |    9 +---
 arch/arm/lib/bootu.c                              |    3 +-
 arch/arm/lib/bootz.c                              |    8 +--
 arch/arm/mach-at91/boot_test_cmd.c                |    8 +--
 arch/arm/mach-at91/clock.c                        |    8 +--
 arch/arm/mach-at91/gpio.c                         |   11 +++--
 arch/arm/mach-mxs/bcb.c                           |    8 +--
 arch/arm/mach-netx/generic.c                      |    3 +-
 arch/arm/mach-omap/boot_order.c                   |   12 ++---
 arch/blackfin/boards/ipe337/cmd_alternate.c       |    9 +---
 arch/mips/lib/cpuinfo.c                           |    2 +-
 arch/openrisc/lib/cpuinfo.c                       |    2 +-
 commands/2048.c                                   |    6 +--
 commands/automount.c                              |   12 ++---
 commands/barebox-update.c                         |   17 +++----
 commands/basename.c                               |    6 +--
 commands/boot.c                                   |   44 +++++++++--------
 commands/bootm.c                                  |   33 ++++++++-----
 commands/cat.c                                    |    8 ++-
 commands/cd.c                                     |    7 ++-
 commands/clear.c                                  |    6 +--
 commands/clk.c                                    |   38 +++++---------
 commands/cp.c                                     |    9 ++--
 commands/crc.c                                    |   20 +++++---
 commands/detect.c                                 |   11 +++--
 commands/devinfo.c                                |   16 ++++--
 commands/dfu.c                                    |   27 +++++-----
 commands/digest.c                                 |   24 ++++-----
 commands/dirname.c                                |   12 +++--
 commands/echo.c                                   |   16 +++---
 commands/edit.c                                   |    6 +--
 commands/exec.c                                   |    2 +-
 commands/export.c                                 |    6 +--
 commands/false.c                                  |    2 +-
 commands/filetype.c                               |   14 +++---
 commands/flash.c                                  |   40 ++++++++++-----
 commands/global.c                                 |   10 ++--
 commands/go.c                                     |   14 +++---
 commands/gpio.c                                   |   35 +++----------
 commands/help.c                                   |   39 ++++++++++-----
 commands/i2c.c                                    |   48 ++++++++++--------
 commands/insmod.c                                 |    7 +--
 commands/iomemport.c                              |    4 +-
 commands/led.c                                    |   11 +++--
 commands/let.c                                    |   43 ++++++++--------
 commands/linux16.c                                |   16 ++++--
 commands/linux_exec.c                             |    9 +---
 commands/ln.c                                     |    9 +---
 commands/loadb.c                                  |   19 ++++---
 commands/loadenv.c                                |   15 +++---
 commands/loads.c                                  |   19 +++----
 commands/loadxy.c                                 |   53 ++++++++++----------
 commands/login.c                                  |   16 +++---
 commands/ls.c                                     |   12 +++--
 commands/lsmod.c                                  |    2 +-
 commands/magicvar.c                               |    2 +-
 commands/md.c                                     |   37 +++++++-------
 commands/memcmp.c                                 |   28 ++++++-----
 commands/memcpy.c                                 |   22 +++++----
 commands/meminfo.c                                |    2 +-
 commands/memset.c                                 |   20 ++++----
 commands/memtest.c                                |   14 +++---
 commands/menu.c                                   |   54 ++++++++++----------
 commands/menutree.c                               |   36 +++++++-------
 commands/miitool.c                                |   11 +++--
 commands/mkdir.c                                  |   12 +++--
 commands/mm.c                                     |   19 ++++---
 commands/mount.c                                  |   26 +++++-----
 commands/msleep.c                                 |    3 +-
 commands/mw.c                                     |   18 ++++---
 commands/nand.c                                   |   15 +++---
 commands/nandtest.c                               |   21 ++++----
 commands/net.c                                    |    7 +--
 commands/of_node.c                                |    9 ++--
 commands/of_property.c                            |   20 ++++----
 commands/oftree.c                                 |   15 +++---
 commands/partition.c                              |   25 ++++++----
 commands/passwd.c                                 |   15 +++---
 commands/poweroff.c                               |    2 +-
 commands/printenv.c                               |    8 +--
 commands/pwd.c                                    |    2 +-
 commands/readf.c                                  |   10 ++--
 commands/readline.c                               |   12 +++--
 commands/readlink.c                               |   10 ++--
 commands/reginfo.c                                |    2 +-
 commands/regulator.c                              |    2 +-
 commands/reset.c                                  |   10 ++--
 commands/rm.c                                     |   11 +++--
 commands/rmdir.c                                  |   10 ++--
 commands/saveenv.c                                |   12 +++--
 commands/setenv.c                                 |    9 ++--
 commands/sleep.c                                  |    3 +-
 commands/spi.c                                    |   24 ++++-----
 commands/splash.c                                 |   19 ++++---
 commands/test.c                                   |   14 +++---
 commands/tftp.c                                   |    9 ++--
 commands/time.c                                   |    8 +--
 commands/timeout.c                                |   20 ++++----
 commands/trigger.c                                |   12 +++--
 commands/true.c                                   |    2 +-
 commands/ubi.c                                    |   39 ++++++++-------
 commands/ubiformat.c                              |   47 +++++++++---------
 commands/uimage.c                                 |   15 +++---
 commands/umount.c                                 |   10 ++--
 commands/uncompress.c                             |   12 ++---
 commands/usb.c                                    |   10 ++--
 commands/usbserial.c                              |   28 ++++++-----
 commands/version.c                                |    2 +-
 commands/wd.c                                     |   10 ++--
 common/command.c                                  |   34 ++++++-------
 common/hush.c                                     |   55 +++++++++------------
 drivers/gpio/gpiolib.c                            |    8 +--
 drivers/mtd/nand/nand_imx_bbm.c                   |    5 +-
 drivers/mtd/nand/nand_s3c24xx.c                   |    7 +--
 include/command.h                                 |   13 +++--
 net/dhcp.c                                        |   31 ++++--------
 net/dns.c                                         |    7 +--
 net/ifup.c                                        |   14 ++++--
 net/nfs.c                                         |    8 +--
 net/ping.c                                        |    3 +-
 124 files changed, 967 insertions(+), 907 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index f7b7a23..f6ed084 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -352,14 +352,10 @@ static int do_cpufreq(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_cpufreq_help[] =
-"Usage: cpufreq 399|532\n"
-"\n"
-"Set CPU frequency to <freq> MHz\n";
-
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
-	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_DESC("adjust CPU frequency")
+	BAREBOX_CMD_OPTS("399|532")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index 793d845..90f1627 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -346,14 +346,9 @@ static int do_cpufreq(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_cpufreq_help[] =
-"Usage: cpufreq 399|532\n"
-"\n"
-"Set CPU frequency to <freq> MHz\n";
-
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
-	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_DESC("adjust CPU frequency")
+	BAREBOX_CMD_OPTS("399|532")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/boards/phytec-phycore-imx35/pcm043.c b/arch/arm/boards/phytec-phycore-imx35/pcm043.c
index f6e370f..d1dd28f 100644
--- a/arch/arm/boards/phytec-phycore-imx35/pcm043.c
+++ b/arch/arm/boards/phytec-phycore-imx35/pcm043.c
@@ -324,15 +324,10 @@ static int do_cpufreq(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_cpufreq_help[] =
-"Usage: cpufreq 399|532\n"
-"\n"
-"Set CPU frequency to <freq> MHz\n";
-
 BAREBOX_CMD_START(cpufreq)
 	.cmd            = do_cpufreq,
-	.usage          = "adjust CPU frequency",
+	BAREBOX_CMD_DESC("adjust CPU frequency")
+	BAREBOX_CMD_OPTS("399|532")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_cpufreq_help)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
index 2cee48b..8b22e9b 100644
--- a/arch/arm/cpu/cpuinfo.c
+++ b/arch/arm/cpu/cpuinfo.c
@@ -210,7 +210,7 @@ static int do_cpuinfo(int argc, char *argv[])
 
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
-	.usage          = "Show info about CPU",
+	BAREBOX_CMD_DESC("show info about CPU")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/arch/arm/cpu/mmuinfo.c b/arch/arm/cpu/mmuinfo.c
index 032798e..79f539f 100644
--- a/arch/arm/cpu/mmuinfo.c
+++ b/arch/arm/cpu/mmuinfo.c
@@ -99,14 +99,9 @@ static int do_mmuinfo(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(mmuinfo)
-BAREBOX_CMD_HELP_USAGE("mmuinfo <address>\n")
-BAREBOX_CMD_HELP_SHORT("Show MMU/cache information for an address.\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(mmuinfo)
 	.cmd            = do_mmuinfo,
-	.usage		= "mmuinfo <address>",
+	BAREBOX_CMD_DESC("show MMU/cache information of an address")
+	BAREBOX_CMD_OPTS("ADDRESS")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
-	BAREBOX_CMD_HELP(cmd_mmuinfo_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/lib/bootu.c b/arch/arm/lib/bootu.c
index 14a8566..19009c8 100644
--- a/arch/arm/lib/bootu.c
+++ b/arch/arm/lib/bootu.c
@@ -36,7 +36,8 @@ static const __maybe_unused char cmd_bootu_help[] =
 
 BAREBOX_CMD_START(bootu)
 	.cmd            = do_bootu,
-	.usage          = "start a raw linux image",
+	BAREBOX_CMD_DESC("boot into already loaded Linux kernel")
+	BAREBOX_CMD_OPTS("ADDRESS")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_bootu_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c
index 7ddd882..377f18a 100644
--- a/arch/arm/lib/bootz.c
+++ b/arch/arm/lib/bootz.c
@@ -127,14 +127,10 @@ err_out:
 	return 1;
 }
 
-static const __maybe_unused char cmd_bootz_help[] =
-"Usage: bootz [FILE]\n"
-"Boot a Linux zImage\n";
-
 BAREBOX_CMD_START(bootz)
 	.cmd            = do_bootz,
-	.usage          = "start a zImage",
+	BAREBOX_CMD_DESC("boot Linux zImage")
+	BAREBOX_CMD_OPTS("FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
-	BAREBOX_CMD_HELP(cmd_bootz_help)
 BAREBOX_CMD_END
 
diff --git a/arch/arm/mach-at91/boot_test_cmd.c b/arch/arm/mach-at91/boot_test_cmd.c
index 5f80666..66c598b 100644
--- a/arch/arm/mach-at91/boot_test_cmd.c
+++ b/arch/arm/mach-at91/boot_test_cmd.c
@@ -84,13 +84,15 @@ err:
 }
 
 BAREBOX_CMD_HELP_START(at91_boot_test)
-BAREBOX_CMD_HELP_USAGE("at91_boot_test [-j <jump addr>] [-s <sram>] file\n")
-BAREBOX_CMD_HELP_SHORT("upload the binary to sram and jump as will do the romcode\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-j ADDR", "jump address")
+BAREBOX_CMD_HELP_OPT ("-s SRAM", "SRAM device (default /dev/sram0)")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(at91_boot_test)
 	.cmd		= do_at91_boot_test,
-	.usage		= "upload the binary to sram and jump as will do the romcode",
+	BAREBOX_CMD_DESC("load and execute from SRAM")
+	BAREBOX_CMD_OPTS("at91_boot_test [-js] FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_at91_boot_test_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index c4fc698..59c4d11 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -881,16 +881,10 @@ static int do_at91clk(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(at91clk)
-BAREBOX_CMD_HELP_USAGE("at91clk\n")
-BAREBOX_CMD_HELP_SHORT("dump current clock configuration\n");
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(at91clk)
 	.cmd		= do_at91clk,
-	.usage		= "dump current clock configuration",
+	BAREBOX_CMD_DESC("list clock configuration")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
-	BAREBOX_CMD_HELP(cmd_at91clk_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 #endif
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index c175cfd..d354625 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -509,13 +509,18 @@ static int do_at91mux(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(at91mux)
-BAREBOX_CMD_HELP_USAGE("at91mux [-p <pin> -b <bank>]\n")
-BAREBOX_CMD_HELP_SHORT("dump current mux configuration if bank/pin specified dump pin details\n");
+BAREBOX_CMD_HELP_TEXT("Dump current MIX configuration. If a BANK or PIN has been")
+BAREBOX_CMD_HELP_TEXT("specified dump pin details.");
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-p PIN", "pin number")
+BAREBOX_CMD_HELP_OPT ("-b BANK", "bank number")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(at91mux)
 	.cmd		= do_at91mux,
-	.usage		= "dump current mux configuration",
+	BAREBOX_CMD_DESC("list MUX configuration")
+	BAREBOX_CMD_OPTS("[-pn]")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_at91mux_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index 0da8d3b..c945726 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -387,14 +387,14 @@ int update_bcb(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(bcb)
-BAREBOX_CMD_HELP_USAGE("bcb <first_bootstream> [second_bootstream]\n")
-BAREBOX_CMD_HELP_SHORT("Write a BCB to NAND flash which an MX23/28 needs to boot.\n")
-BAREBOX_CMD_HELP_TEXT ("Example: bcb nand0.bootstream\n")
+BAREBOX_CMD_HELP_TEXT("Write a BCB to NAND flash which an MX23/28 needs to boot.")
+BAREBOX_CMD_HELP_TEXT("Example: bcb nand0.bootstream")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(bcb)
 	.cmd = update_bcb,
-	.usage = "Writes a MX23/28 BCB data structure to flash",
+	BAREBOX_CMD_DESC("writes a i.MX23/28 BCB data structure to flash")
+	BAREBOX_CMD_OPTS("BOOTSTREAM [BOOTSTREAM]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_bcb_help)
 BAREBOX_CMD_END
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 0b6b3b2..6127dde 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -145,7 +145,6 @@ void __noreturn reset_cpu(unsigned long addr)
 
 BAREBOX_CMD_START(loadxc)
 	.cmd		= do_loadxc,
-	.usage		= "load xmac/xpec engine with ethernet firmware",
+	BAREBOX_CMD_DESC("load XMAC/XPEC engine with ethernet firmware")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
-
diff --git a/arch/arm/mach-omap/boot_order.c b/arch/arm/mach-omap/boot_order.c
index 4af86e6..db22513 100644
--- a/arch/arm/mach-omap/boot_order.c
+++ b/arch/arm/mach-omap/boot_order.c
@@ -69,15 +69,15 @@ static int cmd_boot_order(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_boot_order_help[] =
-"Usage: boot_order <device 1> [<device n>]\n"
-"Set warm boot order of up to four devices.\n"
-"Each device can be one of:\n"
-"xip xipwait nand onenand mmc1 mmc2_1 mmc2_2 uart usb_1 usb_ulpi usb_2\n";
+BAREBOX_CMD_HELP_START(boot_order)
+BAREBOX_CMD_HELP_TEXT("Set warm boot order of up to four devices. Each device can be one of:")
+BAREBOX_CMD_HELP_TEXT("xip xipwait nand onenand mmc1 mmc2_1 mmc2_2 uart usb_1 usb_ulpi usb_2")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(boot_order)
 	.cmd		= cmd_boot_order,
-	.usage		= "boot_order <device 1> [<device n>]",
+	BAREBOX_CMD_DESC("set warm boot order")
+	BAREBOX_CMD_OPTS("DEVICE...")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_boot_order_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
diff --git a/arch/blackfin/boards/ipe337/cmd_alternate.c b/arch/blackfin/boards/ipe337/cmd_alternate.c
index aee9560..992d274 100644
--- a/arch/blackfin/boards/ipe337/cmd_alternate.c
+++ b/arch/blackfin/boards/ipe337/cmd_alternate.c
@@ -44,14 +44,9 @@ static int do_alternate(int argc, char *argv[])
 	return (bitcount & 1) ? 3 : 2;
 }
 
-static const __maybe_unused char cmd_alternate_help[] =
-"Usage: alternate <file>"
-"\n";
-
 BAREBOX_CMD_START(alternate)
 	.cmd		= do_alternate,
-	.usage		= "count zero bits in a file",
+	BAREBOX_CMD_DESC("count zero bits in a file")
+	BAREBOX_CMD_OPTS("FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
-	BAREBOX_CMD_HELP(cmd_alternate_help)
 BAREBOX_CMD_END
-
diff --git a/arch/mips/lib/cpuinfo.c b/arch/mips/lib/cpuinfo.c
index b541f70..1b17169 100644
--- a/arch/mips/lib/cpuinfo.c
+++ b/arch/mips/lib/cpuinfo.c
@@ -54,6 +54,6 @@ static int do_cpuinfo(int argc, char *argv[])
 
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
-	.usage          = "Show info about CPU",
+	BAREBOX_CMD_DESC("show CPU information")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/arch/openrisc/lib/cpuinfo.c b/arch/openrisc/lib/cpuinfo.c
index 2a055aa..32fb47d 100644
--- a/arch/openrisc/lib/cpuinfo.c
+++ b/arch/openrisc/lib/cpuinfo.c
@@ -148,6 +148,6 @@ static int do_cpuinfo(int argc, char *argv[])
 
 BAREBOX_CMD_START(cpuinfo)
 	.cmd            = do_cpuinfo,
-	.usage          = "Show info about CPU",
+	BAREBOX_CMD_DESC("show CPU information")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/commands/2048.c b/commands/2048.c
index 6d4f927..26c9e6c 100644
--- a/commands/2048.c
+++ b/commands/2048.c
@@ -378,13 +378,13 @@ static int do_2048(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(2048)
-BAREBOX_CMD_HELP_USAGE("2048\n")
-BAREBOX_CMD_HELP_SHORT("The 2048 game\n")
+BAREBOX_CMD_HELP_TEXT("Use your arrow keys to move the tiles. When two tiles with")
+BAREBOX_CMD_HELP_TEXT("the same number touch, they merge into one!")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(2048)
 	.cmd		= do_2048,
-	.usage		= "Usage: 2048",
+	BAREBOX_CMD_DESC("the 2048 game")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_2048_help)
 BAREBOX_CMD_END
diff --git a/commands/automount.c b/commands/automount.c
index d1e5cb0..0afe4d2 100644
--- a/commands/automount.c
+++ b/commands/automount.c
@@ -57,16 +57,16 @@ static int do_automount(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(automount)
-BAREBOX_CMD_HELP_USAGE("automount [OPTIONS] <PATH> <cmd>\n")
-BAREBOX_CMD_HELP_SHORT("execute <cmd> when <PATH> is first accessed\n")
-BAREBOX_CMD_HELP_OPT("-l", "List currently registered automountpoints\n")
-BAREBOX_CMD_HELP_OPT("-d", "Create the mount path\n")
-BAREBOX_CMD_HELP_OPT("-r <PATH>", "remove an automountpoint\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-l", "list registered automount-points")
+BAREBOX_CMD_HELP_OPT("-d", "create the mount directory")
+BAREBOX_CMD_HELP_OPT("-r", "remove an automountpoint")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(automount)
 	.cmd		= do_automount,
-	.usage		= "automount [OPTIONS] <PATH> <cmd>",
+	BAREBOX_CMD_DESC("execute (mount) COMMAND when PATH ist first accessed")
+	BAREBOX_CMD_OPTS("[-ldr] PATH [COMMAND]")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_automount_help)
 BAREBOX_CMD_END
diff --git a/commands/barebox-update.c b/commands/barebox-update.c
index 819bf4d..a24dc3e 100644
--- a/commands/barebox-update.c
+++ b/commands/barebox-update.c
@@ -69,19 +69,18 @@ static int do_barebox_update(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(barebox_update)
-BAREBOX_CMD_HELP_USAGE("barebox_update [OPTIONS] <image>\n")
-BAREBOX_CMD_HELP_SHORT("Update barebox to persistent media\n")
-BAREBOX_CMD_HELP_OPT("-t <target>", "\n")
-BAREBOX_CMD_HELP_OPT("-d <device>", "write image to <device> instead of handler default\n")
-BAREBOX_CMD_HELP_OPT("           ", "Can be used for debugging purposes (-d /tmpfile)\n")
-BAREBOX_CMD_HELP_OPT("-y\t", "yes. Do not ask for confirmation\n")
-BAREBOX_CMD_HELP_OPT("-f <level>", "Set force level\n")
-BAREBOX_CMD_HELP_OPT("-l\t", "list registered targets\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-l\t", "list registered targets")
+BAREBOX_CMD_HELP_OPT("-t TARGET", "specify data target handler name")
+BAREBOX_CMD_HELP_OPT("-d DEVICE", "write image to DEVICE")
+BAREBOX_CMD_HELP_OPT("-y\t", "autom. use 'yes' when asking confirmations")
+BAREBOX_CMD_HELP_OPT("-f LEVEL", "set force level")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(barebox_update)
 	.cmd		= do_barebox_update,
-	.usage		= "update barebox",
+	BAREBOX_CMD_DESC("update barebox to persistent media")
+	BAREBOX_CMD_OPTS("[-ltdyf] [IMAGE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_barebox_update_help)
 BAREBOX_CMD_END
diff --git a/commands/basename.c b/commands/basename.c
index 835c299..00daa5f 100644
--- a/commands/basename.c
+++ b/commands/basename.c
@@ -36,13 +36,13 @@ static int do_basename(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(basename)
-BAREBOX_CMD_HELP_USAGE("basename NAME BASENAME\n")
-BAREBOX_CMD_HELP_SHORT("strip NAME and store into $BASENAME\n")
+BAREBOX_CMD_HELP_TEXT("Remove directory part from the PATH and store result into variable VAR.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(basename)
 	.cmd		= do_basename,
-	.usage		= "strip directory and suffix from filenames",
+	BAREBOX_CMD_DESC("strip directory and suffix from filenames")
+	BAREBOX_CMD_OPTS("PATH VAR")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_basename_help)
 BAREBOX_CMD_END
diff --git a/commands/boot.c b/commands/boot.c
index 1b88ffe..7a956a2 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -457,30 +457,34 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(boot)
-BAREBOX_CMD_HELP_USAGE("boot [OPTIONS] [BOOTSRC...]\n")
-BAREBOX_CMD_HELP_SHORT("Boot an operating system.\n")
-BAREBOX_CMD_HELP_SHORT("[BOOTSRC...] can be:\n")
-BAREBOX_CMD_HELP_SHORT("- a filename under /env/boot/\n")
-BAREBOX_CMD_HELP_SHORT("- a full path to a boot script\n")
-BAREBOX_CMD_HELP_SHORT("- a device name\n")
-BAREBOX_CMD_HELP_SHORT("- a partition name under /dev/\n")
-BAREBOX_CMD_HELP_SHORT("- a full path to a directory which\n")
-BAREBOX_CMD_HELP_SHORT("   - contains boot scripts, or\n")
-BAREBOX_CMD_HELP_SHORT("   - contains a loader/entries/ directory containing bootspec entries\n")
-BAREBOX_CMD_HELP_SHORT("\n")
-BAREBOX_CMD_HELP_SHORT("Multiple bootsources may be given which are probed in order until\n")
-BAREBOX_CMD_HELP_SHORT("one succeeds.\n")
-BAREBOX_CMD_HELP_SHORT("\nOptions:\n")
-BAREBOX_CMD_HELP_OPT  ("-v","Increase verbosity\n")
-BAREBOX_CMD_HELP_OPT  ("-d","Dryrun. See what happens but do no actually boot\n")
-BAREBOX_CMD_HELP_OPT  ("-l","List available boot sources\n")
-BAREBOX_CMD_HELP_OPT  ("-m","Show a menu with boot options\n")
-BAREBOX_CMD_HELP_OPT  ("-t <timeout>","specify timeout for the menu\n")
+BAREBOX_CMD_HELP_TEXT("This is for booting based on scripts. Unlike the bootm command which")
+BAREBOX_CMD_HELP_TEXT("can boot a single image this command offers the possibility to boot with")
+BAREBOX_CMD_HELP_TEXT("scripts (by default placed under /env/boot/).")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("BOOTSRC can be:")
+BAREBOX_CMD_HELP_TEXT("- a filename under /env/boot/")
+BAREBOX_CMD_HELP_TEXT("- a full path to a boot script")
+BAREBOX_CMD_HELP_TEXT("- a device name")
+BAREBOX_CMD_HELP_TEXT("- a partition name under /dev/")
+BAREBOX_CMD_HELP_TEXT("- a full path to a directory which")
+BAREBOX_CMD_HELP_TEXT("   - contains boot scripts, or")
+BAREBOX_CMD_HELP_TEXT("   - contains a loader/entries/ directory containing bootspec entries")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Multiple bootsources may be given which are probed in order until")
+BAREBOX_CMD_HELP_TEXT("one succeeds.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-v","Increase verbosity")
+BAREBOX_CMD_HELP_OPT ("-d","Dryrun. See what happens but do no actually boot")
+BAREBOX_CMD_HELP_OPT ("-l","List available boot sources")
+BAREBOX_CMD_HELP_OPT ("-m","Show a menu with boot options")
+BAREBOX_CMD_HELP_OPT ("-t SECS","specify timeout in SECS")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(boot)
 	.cmd	= do_boot,
-	.usage		= "boot the machine",
+	BAREBOX_CMD_DESC("boot from script, device, ...")
+	BAREBOX_CMD_OPTS("[-vdlmt] [BOOTSRC...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_boot_help)
 BAREBOX_CMD_END
diff --git a/commands/bootm.c b/commands/bootm.c
index af2cb69..5801f44 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -141,27 +141,38 @@ err_out:
 }
 
 BAREBOX_CMD_HELP_START(bootm)
-BAREBOX_CMD_HELP_USAGE("bootm [OPTIONS] image\n")
-BAREBOX_CMD_HELP_SHORT("Boot an application image.\n")
-BAREBOX_CMD_HELP_OPT  ("-c",  "crc check uImage data\n")
-BAREBOX_CMD_HELP_OPT  ("-d",  "dryrun. Check data, but do not run\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-c",  "crc check uImage data")
+BAREBOX_CMD_HELP_OPT ("-d",  "dryrun. Check data, but do not run")
 #ifdef CONFIG_CMD_BOOTM_INITRD
-BAREBOX_CMD_HELP_OPT  ("-r <initrd>","specify an initrd image\n")
-BAREBOX_CMD_HELP_OPT  ("-L <load addr>","specify initrd load address\n")
+BAREBOX_CMD_HELP_OPT ("-r INITRD","specify an initrd image")
+BAREBOX_CMD_HELP_OPT ("-L ADDR","specify initrd load address")
 #endif
-BAREBOX_CMD_HELP_OPT  ("-a <load addr>","specify os load address\n")
-BAREBOX_CMD_HELP_OPT  ("-e <ofs>","entry point to the image relative to start (0)\n")
+BAREBOX_CMD_HELP_OPT ("-a ADDR","specify os load address")
+BAREBOX_CMD_HELP_OPT ("-e OFFS","entry point to the image relative to start (0)")
 #ifdef CONFIG_OFTREE
-BAREBOX_CMD_HELP_OPT  ("-o <oftree>","specify oftree\n")
+BAREBOX_CMD_HELP_OPT ("-o DTS","specify device tree")
 #endif
 #ifdef CONFIG_CMD_BOOTM_VERBOSE
-BAREBOX_CMD_HELP_OPT  ("-v","verbose\n")
+BAREBOX_CMD_HELP_OPT ("-v\t","verbose")
 #endif
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(bootm)
 	.cmd		= do_bootm,
-	.usage		= "boot an application image",
+	BAREBOX_CMD_DESC("boot an application image")
+	BAREBOX_CMD_OPTS("[-cd"
+#ifdef CONFIG_CMD_BOOTM_INITRD
+					  "rL"
+#endif
+					  "ae"
+#ifdef CONFIG_OFTREE
+					  "o"
+#endif
+#ifdef CONFIG_CMD_BOOTM_VERBOSE
+					  "v"
+#endif
+					  "] IMAGE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_bootm_help)
 BAREBOX_CMD_END
diff --git a/commands/cat.c b/commands/cat.c
index f51af4e..c01710c 100644
--- a/commands/cat.c
+++ b/commands/cat.c
@@ -82,15 +82,13 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(cat)
-BAREBOX_CMD_HELP_USAGE("cat [FILES]\n")
-BAREBOX_CMD_HELP_SHORT("Concatenate files on stdout.\n")
-BAREBOX_CMD_HELP_TEXT ("Currently only printable characters and \\ n and \\ t are printed,\n")
-BAREBOX_CMD_HELP_TEXT ("but this should be optional.\n")
+BAREBOX_CMD_HELP_TEXT("Currently only printable characters and NL, TAB are printed.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(cat)
 	.cmd		= do_cat,
-	.usage		= "concatenate file(s)",
+	BAREBOX_CMD_DESC("concatenate file(s) to stdout")
+	BAREBOX_CMD_OPTS("FILE...")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cat_help)
 BAREBOX_CMD_END
diff --git a/commands/cd.c b/commands/cd.c
index caa368d..5611e9a 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -45,14 +45,13 @@ static int do_cd(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(cd)
-BAREBOX_CMD_HELP_USAGE("cd [directory]\n")
-BAREBOX_CMD_HELP_SHORT("Change to directory.\n")
-BAREBOX_CMD_HELP_TEXT ("If called without an argument, change to the root directory /.\n")
+BAREBOX_CMD_HELP_TEXT("If called without an argument, change to the root directory '/'.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(cd)
 	.cmd		= do_cd,
-	.usage		= "change working directory",
+	BAREBOX_CMD_DESC("change working directory")
+	BAREBOX_CMD_OPTS("DIRECTORY")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cd_help)
 BAREBOX_CMD_END
diff --git a/commands/clear.c b/commands/clear.c
index a67ece8..3be2119 100644
--- a/commands/clear.c
+++ b/commands/clear.c
@@ -30,13 +30,13 @@ static int do_clear(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(clear)
-BAREBOX_CMD_HELP_USAGE("clear\n")
-BAREBOX_CMD_HELP_SHORT("Clear the screen.\n")
+BAREBOX_CMD_HELP_TEXT("Send ANSI ESC sequence to clear the screen.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(clear)
 	.cmd		= do_clear,
-	.usage		= "clear screen",
+	BAREBOX_CMD_DESC("clear screen")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_COMPLETE(empty_complete)
+	BAREBOX_CMD_HELP(cmd_clear_help)
 BAREBOX_CMD_END
diff --git a/commands/clk.c b/commands/clk.c
index 6718ae8..31f4e0d 100644
--- a/commands/clk.c
+++ b/commands/clk.c
@@ -18,14 +18,10 @@ static int do_clk_enable(int argc, char *argv[])
 	return clk_enable(clk);
 }
 
-BAREBOX_CMD_HELP_START(clk_enable)
-BAREBOX_CMD_HELP_USAGE("clk_enable <clk>\n")
-BAREBOX_CMD_HELP_SHORT("enable <clk>\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(clk_enable)
 	.cmd		= do_clk_enable,
-	.usage		= "enable a clock",
+	BAREBOX_CMD_DESC("enable a clock")
+	BAREBOX_CMD_OPTS("CLK")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_enable_help)
 BAREBOX_CMD_END
@@ -46,14 +42,10 @@ static int do_clk_disable(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(clk_disable)
-BAREBOX_CMD_HELP_USAGE("clk_disable <clk>\n")
-BAREBOX_CMD_HELP_SHORT("disable <clk>\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(clk_disable)
 	.cmd		= do_clk_disable,
-	.usage		= "disable a clock",
+	BAREBOX_CMD_DESC("disable a clock")
+	BAREBOX_CMD_OPTS("CLK")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_disable_help)
 BAREBOX_CMD_END
@@ -76,13 +68,13 @@ static int do_clk_set_rate(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(clk_set_rate)
-BAREBOX_CMD_HELP_USAGE("clk_set_rate <clk> <rate_hz>\n")
-BAREBOX_CMD_HELP_SHORT("Set clock <clk> to <rate>\n")
+BAREBOX_CMD_HELP_TEXT("Set clock CLK to RATE")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(clk_set_rate)
 	.cmd		= do_clk_set_rate,
-	.usage		= "set a clocks rate",
+	BAREBOX_CMD_DESC("set a clocks rate")
+	BAREBOX_CMD_OPTS("CLK HZ")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_clk_set_rate_help)
 BAREBOX_CMD_END
@@ -108,13 +100,14 @@ static int do_clk_dump(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(clk_dump)
-BAREBOX_CMD_HELP_USAGE("clk_dump [-v]\n")
-BAREBOX_CMD_HELP_OPT  ("-v",  "verbose\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-v",  "verbose")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(clk_dump)
 	.cmd		= do_clk_dump,
-	.usage		= "show information about registered clocks",
+	BAREBOX_CMD_DESC("show information about registered clocks")
+	BAREBOX_CMD_OPTS("[-v]")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_clk_dump_help)
 BAREBOX_CMD_END
@@ -136,14 +129,9 @@ static int do_clk_set_parent(int argc, char *argv[])
 	return clk_set_parent(clk, parent);
 }
 
-BAREBOX_CMD_HELP_START(clk_set_parent)
-BAREBOX_CMD_HELP_USAGE("clk_set_parent <clk> <parent>\n")
-BAREBOX_CMD_HELP_SHORT("Set parent of <clk> to <parent>\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(clk_set_parent)
 	.cmd		= do_clk_set_parent,
-	.usage		= "set a parent of a clock",
+	BAREBOX_CMD_DESC("set parent of a clock")
+	BAREBOX_CMD_OPTS("CLK PARENT")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_clk_set_parent_help)
 BAREBOX_CMD_END
diff --git a/commands/cp.c b/commands/cp.c
index 2a289f8..8ecde91 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -89,8 +89,10 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(cp)
-BAREBOX_CMD_HELP_USAGE("cp [-v] <source> <destination>\n")
-BAREBOX_CMD_HELP_SHORT("copy file from <source> to <destination>.\n")
+BAREBOX_CMD_HELP_TEXT("Copy file from SRC to DEST.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-v", "verbose")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -104,7 +106,8 @@ If you want to copy between memory blocks, use 'memcpy'.
 
 BAREBOX_CMD_START(cp)
 	.cmd		= do_cp,
-	.usage		= "copy files",
+	BAREBOX_CMD_DESC("copy files")
+	BAREBOX_CMD_OPTS("[-v] SRC DEST")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_cp_help)
 BAREBOX_CMD_END
diff --git a/commands/crc.c b/commands/crc.c
index 89b4fb2..3612162 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -108,19 +108,25 @@ static int do_crc(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(crc)
-BAREBOX_CMD_HELP_USAGE("crc32 [OPTION] [AREA]\n")
-BAREBOX_CMD_HELP_SHORT("Calculate a crc32 checksum of a memory area.\n")
-BAREBOX_CMD_HELP_OPT  ("-f <file>", "Use file instead of memory.\n")
+BAREBOX_CMD_HELP_TEXT("Calculate a CRC32 checksum of a memory area.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-f FILE", "Use file instead of memory.")
 #ifdef CONFIG_CMD_CRC_CMP
-BAREBOX_CMD_HELP_OPT  ("-F <file>", "Use file to compare.\n")
+BAREBOX_CMD_HELP_OPT ("-F FILE", "Use file to compare.")
 #endif
-BAREBOX_CMD_HELP_OPT  ("-v <crc>",  "Verify\n")
-BAREBOX_CMD_HELP_OPT  ("-V <file>", "Verify with crc read from <file>\n")
+BAREBOX_CMD_HELP_OPT ("-v CRC",  "Verify")
+BAREBOX_CMD_HELP_OPT ("-V FILE", "Verify with CRC read from FILE")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(crc32)
 	.cmd		= do_crc,
-	.usage		= "crc32 checksum calculation",
+	BAREBOX_CMD_DESC("CRC32 checksum calculation")
+	BAREBOX_CMD_OPTS("[-f"
+#ifdef CONFIG_CMD_CRC_CMP
+					  "F"
+#endif
+					  "vV] AREA")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_crc_help)
 BAREBOX_CMD_END
diff --git a/commands/detect.c b/commands/detect.c
index 50317fe..d8e0afc 100644
--- a/commands/detect.c
+++ b/commands/detect.c
@@ -80,15 +80,16 @@ static int do_detect(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(detect)
-BAREBOX_CMD_HELP_USAGE("detect [OPTIONS] [devices]\n")
-BAREBOX_CMD_HELP_OPT  ("-l",  "list detectable devices\n")
-BAREBOX_CMD_HELP_OPT  ("-e",  "bail out if one device fails to detect\n")
-BAREBOX_CMD_HELP_OPT  ("-a",  "detect all devices\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-l",  "list detectable devices")
+BAREBOX_CMD_HELP_OPT ("-e",  "bail out if one device fails to detect")
+BAREBOX_CMD_HELP_OPT ("-a",  "detect all devices")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(detect)
 	.cmd		= do_detect,
-	.usage		= "detect devices",
+	BAREBOX_CMD_DESC("detect devices")
+	BAREBOX_CMD_OPTS("[-lea] [devices]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_COMPLETE(device_complete)
 	BAREBOX_CMD_HELP(cmd_detect_help)
diff --git a/commands/devinfo.c b/commands/devinfo.c
index 3aa8a94..c229984 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -118,10 +118,6 @@ static int do_devinfo(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(devinfo)
-BAREBOX_CMD_HELP_USAGE("devinfo [DEVICE]\n")
-BAREBOX_CMD_HELP_SHORT("Output device information.\n")
-BAREBOX_CMD_HELP_END
 
 /**
  * @page devinfo_command
@@ -150,9 +146,19 @@ Example from an MPC5200 based system:
 @endverbatim
  */
 
+BAREBOX_CMD_HELP_START(devinfo)
+BAREBOX_CMD_HELP_TEXT("If called without arguments, devinfo shows a summary of the known")
+BAREBOX_CMD_HELP_TEXT("devices and drivers.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("If called with a device path being the argument, devinfo shows more")
+BAREBOX_CMD_HELP_TEXT("default information about this device and its parameters.")
+BAREBOX_CMD_HELP_END
+
+
 BAREBOX_CMD_START(devinfo)
 	.cmd		= do_devinfo,
-	.usage		= "Show information about devices and drivers.",
+	BAREBOX_CMD_DESC("show information about devices and drivers")
+	BAREBOX_CMD_OPTS("[DEVICE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_devinfo_help)
 	BAREBOX_CMD_COMPLETE(device_complete)
diff --git a/commands/dfu.c b/commands/dfu.c
index 514c487..b71cc16 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -171,17 +171,19 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(dfu)
-BAREBOX_CMD_HELP_USAGE("dfu [OPTIONS] <description>\n")
-BAREBOX_CMD_HELP_SHORT("Start firmware update with the Device Firmware Update (DFU) protocol.\n")
-BAREBOX_CMD_HELP_OPT  ("-m <str>",  "Manufacturer string (barebox)\n")
-BAREBOX_CMD_HELP_OPT  ("-p <str>",  "product string\n")
-BAREBOX_CMD_HELP_OPT  ("-V <id>",   "vendor id\n")
-BAREBOX_CMD_HELP_OPT  ("-P <id>",   "product id\n")
-BAREBOX_CMD_HELP_OPT  ("<description>",
-	"device1(name1)[sr],device2(name2)[src]\n"
-	"'s' means 'safe mode' (download the complete image before flashing) and\n"
-	"'r' that readback of the firmware is allowed.\n"
-	"'c' if given, the file will be created (for use with regular files)\n")
+BAREBOX_CMD_HELP_TEXT("Turn's the USB host into DFU mode (Device Firmware Mode) and accepts")
+BAREBOX_CMD_HELP_TEXT("a new firmware. The destination is described by DESC in the this format:")
+BAREBOX_CMD_HELP_TEXT("  DEVICE(NAME)[src]...")
+BAREBOX_CMD_HELP_TEXT("Specify the '(') and ')' literal, the [] however denote this optional modes:")
+BAREBOX_CMD_HELP_TEXT("- 's' safe mode (download the complete image before flashing)")
+BAREBOX_CMD_HELP_TEXT("- 'r' readback of the firmware is allowed")
+BAREBOX_CMD_HELP_TEXT("- 'c' the file will be created (for use with regular files)")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-m STR", "Manufacturer string (barebox)")
+BAREBOX_CMD_HELP_OPT ("-p STR", "product string")
+BAREBOX_CMD_HELP_OPT ("-V ID",  "vendor id")
+BAREBOX_CMD_HELP_OPT ("-P ID",  "product id")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -196,7 +198,8 @@ device1(name1)[sr],device2(name2)[sr]
 
 BAREBOX_CMD_START(dfu)
 	.cmd		= do_dfu,
-	.usage		= "Device firmware update",
+	BAREBOX_CMD_DESC("device firmware update")
+	BAREBOX_CMD_OPTS("[-mpVP] DESC")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_dfu_help)
 BAREBOX_CMD_END
diff --git a/commands/digest.c b/commands/digest.c
index 9980740..092fda2 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -83,13 +83,13 @@ static int do_md5(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(md5sum)
-BAREBOX_CMD_HELP_USAGE("md5sum [[FILE] [AREA]]...\n")
-BAREBOX_CMD_HELP_SHORT("Calculate a md5 checksum of a memory area.\n")
+BAREBOX_CMD_HELP_TEXT("Calculate a MD5 digest over a FILE or a memory area.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(md5sum)
 	.cmd		= do_md5,
-	.usage		= "md5 checksum calculation",
+	BAREBOX_CMD_DESC("calculate MD5 checksum")
+	BAREBOX_CMD_OPTS("FILE|AREA...")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_md5sum_help)
 BAREBOX_CMD_END
@@ -104,13 +104,13 @@ static int do_sha1(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(sha1sum)
-BAREBOX_CMD_HELP_USAGE("sha1sum [[FILE] [AREA]]...\n")
-BAREBOX_CMD_HELP_SHORT("Calculate a sha1 checksum of a memory area.\n")
+BAREBOX_CMD_HELP_TEXT("Calculate a SHA1 digest over a FILE or a memory area.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(sha1sum)
 	.cmd		= do_sha1,
-	.usage		= "sha1 checksum calculation",
+	BAREBOX_CMD_DESC("calculate SHA1 digest")
+	BAREBOX_CMD_OPTS("FILE|AREA")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha1sum_help)
 BAREBOX_CMD_END
@@ -125,13 +125,13 @@ static int do_sha224(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(sha224sum)
-BAREBOX_CMD_HELP_USAGE("sha224sum [[FILE] [AREA]]...\n")
-BAREBOX_CMD_HELP_SHORT("Calculate a sha224 checksum of a memory area.\n")
+BAREBOX_CMD_HELP_TEXT("Calculate a SHA224 digest over a FILE or a memory area.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(sha224sum)
 	.cmd		= do_sha224,
-	.usage		= "sha224 checksum calculation",
+	BAREBOX_CMD_DESC("calculate SHA224 digest")
+	BAREBOX_CMD_OPTS("FILE|AREA")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha224sum_help)
 BAREBOX_CMD_END
@@ -146,13 +146,13 @@ static int do_sha256(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(sha256sum)
-BAREBOX_CMD_HELP_USAGE("sha256sum [[FILE] [AREA]]...\n")
-BAREBOX_CMD_HELP_SHORT("Calculate a sha256 checksum of a memory area.\n")
+BAREBOX_CMD_HELP_TEXT("Calculate a SHA256 digest over a FILE or a memory area.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(sha256sum)
 	.cmd		= do_sha256,
-	.usage		= "sha256 checksum calculation",
+	BAREBOX_CMD_DESC("calculate SHA256 digest")
+	BAREBOX_CMD_OPTS("FILE|AREA")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_sha256sum_help)
 BAREBOX_CMD_END
diff --git a/commands/dirname.c b/commands/dirname.c
index aa7f183..527f167 100644
--- a/commands/dirname.c
+++ b/commands/dirname.c
@@ -53,14 +53,16 @@ static int do_dirname(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(dirname)
-BAREBOX_CMD_HELP_USAGE("dirname [-V] NAME DIRNAME\n")
-BAREBOX_CMD_HELP_SHORT("strip last componext of NAME and store into $DIRNAME\n")
-BAREBOX_CMD_HELP_SHORT("-V return the path relative to the mountpoint.\n")
+BAREBOX_CMD_HELP_TEXT("Strip last componext of NAME and store into $DIRNAME")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-V", "return the path relative to the mountpoint.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(dirname)
 	.cmd		= do_dirname,
-	.usage		= "strip last component from file name",
-	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
+	BAREBOX_CMD_DESC("strip last component from a path")
+	BAREBOX_CMD_OPTS("[-V] NAME DIRNAME")
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_dirname_help)
 BAREBOX_CMD_END
diff --git a/commands/echo.c b/commands/echo.c
index f9ce43e..9b3e21e 100644
--- a/commands/echo.c
+++ b/commands/echo.c
@@ -104,12 +104,13 @@ no_optarg_out:
 }
 
 BAREBOX_CMD_HELP_START(echo)
-BAREBOX_CMD_HELP_USAGE("echo [OPTIONS] [STRING]\n")
-BAREBOX_CMD_HELP_SHORT("Display a line of text.\n")
-BAREBOX_CMD_HELP_OPT  ("-n",  "do not output the trailing newline\n")
-BAREBOX_CMD_HELP_OPT  ("-a <file>",  "instead of outputting to stdout append to <file>\n")
-BAREBOX_CMD_HELP_OPT  ("-o <file>",  "instead of outputting to stdout overwrite <file>\n")
-BAREBOX_CMD_HELP_OPT  ("-e",  "recognize escape sequences\n")
+BAREBOX_CMD_HELP_TEXT("Display a line of TEXT on the console.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-n",     "do not output the trailing newline")
+BAREBOX_CMD_HELP_OPT ("-e",     "recognize escape sequences")
+BAREBOX_CMD_HELP_OPT ("-a FILE", "append to FILE instead of using stdout")
+BAREBOX_CMD_HELP_OPT ("-o FILE", "overwrite FILE instead of using stdout")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -121,7 +122,8 @@ BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(echo)
 	.cmd		= do_echo,
-	.usage		= "echo args to console",
+	BAREBOX_CMD_DESC("echo args to console")
+	BAREBOX_CMD_OPTS("[-neao] STRING")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_echo_help)
 BAREBOX_CMD_END
diff --git a/commands/edit.c b/commands/edit.c
index c1a9815..f6b9d40 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -547,8 +547,7 @@ out:
 static const char *edit_aliases[] = { "sedit", NULL};
 
 BAREBOX_CMD_HELP_START(edit)
-BAREBOX_CMD_HELP_USAGE("(s)edit <file>\n")
-BAREBOX_CMD_HELP_SHORT("A small editor. <ctrl-c> is exit, <ctrl-d> exit-with-save.\n")
+BAREBOX_CMD_HELP_TEXT("Use cursor keys, Ctrl-C to exit and Ctrl-D to exit-with-save.")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -564,7 +563,8 @@ If called as sedit, the editor uses ansi codes to scroll the screen.
 BAREBOX_CMD_START(edit)
 	.cmd		= do_edit,
 	.aliases	= edit_aliases,
-	.usage		= "Usage: (s)edit <file>",
+	BAREBOX_CMD_DESC("a small full-screen editor")
+	BAREBOX_CMD_OPTS("FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_edit_help)
 BAREBOX_CMD_END
diff --git a/commands/exec.c b/commands/exec.c
index 52b2ba3..635f65e 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -52,6 +52,6 @@ out:
 
 BAREBOX_CMD_START(exec)
 	.cmd		= do_exec,
-	.usage		= "execute a script",
+	BAREBOX_CMD_DESC("execute a script")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 BAREBOX_CMD_END
diff --git a/commands/export.c b/commands/export.c
index e27cf18..2e8bb49 100644
--- a/commands/export.c
+++ b/commands/export.c
@@ -49,13 +49,13 @@ static int do_export(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(export)
-BAREBOX_CMD_HELP_USAGE("export <var>[=value]\n")
-BAREBOX_CMD_HELP_SHORT("export an environment variable to subsequently executed scripts\n")
+BAREBOX_CMD_HELP_TEXT("Export an environment variable to subsequently executed scripts.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(export)
 	.cmd		= do_export,
-	.usage		= "export environment variables",
+	BAREBOX_CMD_DESC("export environment variables")
+	BAREBOX_CMD_OPTS("VAR[=VALUE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_export_help)
 BAREBOX_CMD_END
diff --git a/commands/false.c b/commands/false.c
index 6488b87..6ef9af3 100644
--- a/commands/false.c
+++ b/commands/false.c
@@ -28,7 +28,7 @@ static int do_false(int argc, char *argv[])
 
 BAREBOX_CMD_START(false)
 	.cmd		= do_false,
-	.usage		= "do nothing, unsuccessfully",
+	BAREBOX_CMD_DESC("do nothing, unsuccessfully")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/filetype.c b/commands/filetype.c
index 1d6b047..4e016dd 100644
--- a/commands/filetype.c
+++ b/commands/filetype.c
@@ -83,16 +83,18 @@ static int do_filetype(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(filetype)
-BAREBOX_CMD_HELP_USAGE("filetype [OPTIONS] <file>\n")
-BAREBOX_CMD_HELP_SHORT("detect type of a file and export result to a variable\n")
-BAREBOX_CMD_HELP_OPT("-v", "verbose\n")
-BAREBOX_CMD_HELP_OPT("-s <v>", "set <v> to shortname\n")
-BAREBOX_CMD_HELP_OPT("-l", "list known filetypes\n")
+BAREBOX_CMD_HELP_TEXT("Detect type of a file and export result to a variable.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-v", "verbose")
+BAREBOX_CMD_HELP_OPT("-s VAR", "set variable VAR to shortname")
+BAREBOX_CMD_HELP_OPT("-l", "list known filetypes")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(filetype)
 	.cmd		= do_filetype,
-	.usage		= "detect file type",
+	BAREBOX_CMD_DESC("detect file type")
+	BAREBOX_CMD_OPTS("[-vsl] FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_filetype_help)
 BAREBOX_CMD_END
diff --git a/commands/flash.c b/commands/flash.c
index e6c30bf..b50a327 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -75,13 +75,19 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(erase)
-BAREBOX_CMD_HELP_USAGE("erase <device> [area]\n")
-BAREBOX_CMD_HELP_SHORT("Erase a flash device or parts of a device if an area specification is given.\n")
+BAREBOX_CMD_HELP_TEXT("Erase the flash memory handled by DEVICE. Which AREA will be erased")
+BAREBOX_CMD_HELP_TEXT("depends on the device: If the device represents the whole flash")
+BAREBOX_CMD_HELP_TEXT("memory, the whole memory will be erased. If the device represents a")
+BAREBOX_CMD_HELP_TEXT("partition on a main flash memory, only this partition part will be")
+BAREBOX_CMD_HELP_TEXT("erased.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Use 'addpart' and 'delpart' to manage partitions.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(erase)
 	.cmd		= do_flerase,
-	.usage		= "erase FLASH memory",
+	BAREBOX_CMD_DESC("erase flash memory")
+	BAREBOX_CMD_OPTS("DEVICE [AREA]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_erase_help)
 BAREBOX_CMD_END
@@ -150,13 +156,19 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(protect)
-BAREBOX_CMD_HELP_USAGE("protect <device> [area]\n")
-BAREBOX_CMD_HELP_SHORT("protect a flash device (or parts of a device, if an area is specified)\n")
+BAREBOX_CMD_HELP_TEXT("Protect the flash memory behind the device. It depends on the device")
+BAREBOX_CMD_HELP_TEXT("given, what area will be protected. If the device represents the whole")
+BAREBOX_CMD_HELP_TEXT("flash memory, the whole memory will be protected. If the device")
+BAREBOX_CMD_HELP_TEXT("represents a partition on a main flash memory, only this partition part")
+BAREBOX_CMD_HELP_TEXT("will be protected.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Use 'addpart' and 'delpart' to manage partitions.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(protect)
 	.cmd		= do_protect,
-	.usage		= "enable flash write protection",
+	BAREBOX_CMD_DESC("enable flash write protection")
+	BAREBOX_CMD_OPTS("DEVICE [AREA]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_protect_help)
 BAREBOX_CMD_END
@@ -164,8 +176,8 @@ BAREBOX_CMD_END
 /**
  * @page protect_command
 
-Protect the flash memory behind the device. It depends on the device
-given, what area will be protected. If the device represents the whole
+
+If the device represents the whole
 flash memory the whole memory will be protected. If the device
 represents a partition on a main flash memory, only this partition part
 will be protected.
@@ -179,13 +191,17 @@ flashes here.
  */
 
 BAREBOX_CMD_HELP_START(unprotect)
-BAREBOX_CMD_HELP_USAGE("unprotect <device> [area]\n")
-BAREBOX_CMD_HELP_SHORT("unprotect a flash device (or parts of a device, if an area is specified)\n")
+BAREBOX_CMD_HELP_TEXT("Unprotect the flash memory behind the device. It depends on the device")
+BAREBOX_CMD_HELP_TEXT("given, what area will be unprotected. If the device represents the whole")
+BAREBOX_CMD_HELP_TEXT("flash memory, the whole memory will be unprotected. If the device")
+BAREBOX_CMD_HELP_TEXT("represents a partition on a main flash memory, only this partition part")
+BAREBOX_CMD_HELP_TEXT("will be unprotected.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(unprotect)
 	.cmd		= do_protect,
-	.usage		= "disable flash write protection",
+	BAREBOX_CMD_DESC("disable flash write protection")
+	BAREBOX_CMD_OPTS("DEVICE [AREA]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_unprotect_help)
 BAREBOX_CMD_END
@@ -193,7 +209,7 @@ BAREBOX_CMD_END
 /**
  * @page unprotect_command
 
-Unprotect the flash memory behind the device. It depends on the device given,
+It depends on the device given,
 what area will be unprotected. If the device represents the whole flash memory
 the whole memory will be unprotected. If the device represents a partition
 on a main flash memory, only this partition part will be unprotected.
diff --git a/commands/global.c b/commands/global.c
index 20a8623..f14df38 100644
--- a/commands/global.c
+++ b/commands/global.c
@@ -61,14 +61,16 @@ static int do_global(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(global)
-BAREBOX_CMD_HELP_USAGE("global [-r] <var>[=<value]\n")
-BAREBOX_CMD_HELP_SHORT("add a new global variable named <var>, optionally set to <value>\n")
-BAREBOX_CMD_HELP_SHORT("-r to set a value to of all globalvars beginning with 'match'")
+BAREBOX_CMD_HELP_TEXT("Add a new global variable named VAR, optionally set to VALUE.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-r", "set value of all global variables beginning with 'match'")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(global)
 	.cmd		= do_global,
-	.usage		= "create or set global variables",
+	BAREBOX_CMD_DESC("create or set global variables")
+	BAREBOX_CMD_OPTS("[-r] VAR[=VALUE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_global_help)
 BAREBOX_CMD_END
diff --git a/commands/go.c b/commands/go.c
index 4a40608..f25db48 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -78,15 +78,17 @@ out:
 	return rcode;
 }
 
-static const __maybe_unused char cmd_go_help[] =
-"Usage: go addr [arg ...]\n"
-"Start application at address 'addr' passing 'arg' as arguments.\n"
-"If addr does not start with a digit it is interpreted as a filename\n"
-"in which case the file is memmapped and executed\n";
+BAREBOX_CMD_HELP_START(go)
+BAREBOX_CMD_HELP_TEXT("Start application at ADDR passing ARG as arguments.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("If addr does not start with a digit it is interpreted as a filename")
+BAREBOX_CMD_HELP_TEXT("in which case the file is memmapped and executed")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(go)
 	.cmd		= do_go,
-	.usage		= "start application at address or file",
+	BAREBOX_CMD_DESC("start application at address or file")
+	BAREBOX_CMD_OPTS("ADDR [ARG...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_go_help)
 	BAREBOX_CMD_COMPLETE(command_var_complete)
diff --git a/commands/gpio.c b/commands/gpio.c
index 9d0802c..105b768 100644
--- a/commands/gpio.c
+++ b/commands/gpio.c
@@ -32,16 +32,11 @@ static int do_gpio_get_value(int argc, char *argv[])
 	return value;
 }
 
-BAREBOX_CMD_HELP_START(gpio_get_value)
-BAREBOX_CMD_HELP_USAGE("gpio_get_value <gpio>\n")
-BAREBOX_CMD_HELP_SHORT("get the value of an gpio input pin\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(gpio_get_value)
 	.cmd		= do_gpio_get_value,
-	.usage		= "return value of a gpio pin",
+	BAREBOX_CMD_DESC("return value of a GPIO pin")
+	BAREBOX_CMD_OPTS("GPIO")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_gpio_get_value_help)
 BAREBOX_CMD_END
 
 static int do_gpio_set_value(int argc, char *argv[])
@@ -59,16 +54,11 @@ static int do_gpio_set_value(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(gpio_set_value)
-BAREBOX_CMD_HELP_USAGE("gpio_set_value <gpio> <value>\n")
-BAREBOX_CMD_HELP_SHORT("set the value of an gpio output pin\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(gpio_set_value)
 	.cmd		= do_gpio_set_value,
-	.usage		= "set a gpio's output value",
+	BAREBOX_CMD_DESC("set a GPIO's output value")
+	BAREBOX_CMD_OPTS("GPIO VALUE")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_gpio_set_value_help)
 BAREBOX_CMD_END
 
 static int do_gpio_direction_input(int argc, char *argv[])
@@ -87,16 +77,11 @@ static int do_gpio_direction_input(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(gpio_direction_input)
-BAREBOX_CMD_HELP_USAGE("gpio_direction_input <gpio>\n")
-BAREBOX_CMD_HELP_SHORT("set direction of a gpio pin to input\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(gpio_direction_input)
 	.cmd		= do_gpio_direction_input,
-	.usage		= "set direction of a gpio pin to input",
+	BAREBOX_CMD_DESC("set direction of a GPIO pin to input")
+	BAREBOX_CMD_OPTS("GPIO")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
-	BAREBOX_CMD_HELP(cmd_gpio_direction_input_help)
 BAREBOX_CMD_END
 
 static int do_gpio_direction_output(int argc, char *argv[])
@@ -116,14 +101,10 @@ static int do_gpio_direction_output(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(gpio_direction_output)
-BAREBOX_CMD_HELP_USAGE("gpio_direction_output <gpio> <value>\n")
-BAREBOX_CMD_HELP_SHORT("set direction of a gpio pin to output\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(gpio_direction_output)
 	.cmd		= do_gpio_direction_output,
-	.usage		= "set direction of a gpio pin to output",
+	BAREBOX_CMD_DESC("set direction of a GPIO pin to output")
+	BAREBOX_CMD_OPTS("GPIO")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_gpio_direction_output_help)
 BAREBOX_CMD_END
diff --git a/commands/help.c b/commands/help.c
index 7f31ce1..9c33807 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -42,7 +42,7 @@ static void list_group(int verbose, const char *grpname, uint32_t group)
 			}
 		}
 		if (verbose) {
-			printf("  %-21s %s\n", cmdtp->name, cmdtp->usage);
+			printf("  %-21s %s\n", cmdtp->name, cmdtp->desc);
 			continue;
 		}
 		len = strlen(cmdtp->name);
@@ -67,8 +67,8 @@ static void list_commands(int verbose)
 	putchar('\n');
 	list_group(verbose, "Information",           CMD_GRP_INFO);
 	list_group(verbose, "Boot",                  CMD_GRP_BOOT);
-	list_group(verbose, "Environment",           CMD_GRP_ENV);
 	list_group(verbose, "Partition",             CMD_GRP_PART);
+	list_group(verbose, "Environment",           CMD_GRP_ENV);
 	list_group(verbose, "File",                  CMD_GRP_FILE);
 	list_group(verbose, "Scripting",             CMD_GRP_SCRIPT);
 	list_group(verbose, "Network",               CMD_GRP_NET);
@@ -88,21 +88,31 @@ static void list_commands(int verbose)
 static int do_help(int argc, char *argv[])
 {
 	struct command *cmdtp;
-	int opt, verbose = 0;
+	int opt, verbose = 0, all = 0;
 
-	while ((opt = getopt(argc, argv, "v")) > 0) {
+	while ((opt = getopt(argc, argv, "va")) > 0) {
 		switch (opt) {
 		case 'v':
 			verbose = 1;
 			break;
+		case 'a':
+			all = 1;
+			break;
 		}
 	}
 
+	if (all) {
+		for_each_command(cmdtp)
+			barebox_cmd_usage(cmdtp);
+		return 0;
+	}
+
 	if (optind == argc) {	/* show list of commands */
 		list_commands(verbose);
 		return 0;
 	}
 
+
 	/* command help (long version) */
 	if ((cmdtp = find_cmd(argv[optind])) != NULL) {
 		barebox_cmd_usage(cmdtp);
@@ -110,25 +120,30 @@ static int do_help(int argc, char *argv[])
 	} else {
 		printf ("Unknown command '%s' - try 'help'"
 			" without arguments for list of all"
-			" known commands\n\n", argv[1]
+			" known commands\n\n", argv[optind]
 				);
 		return 1;
 	}
 }
 
-static const __maybe_unused char cmd_help_help[] =
-"Show help information (for 'command')\n"
-"'help' prints online help for the monitor commands.\n\n"
-"Without arguments, it lists all all commands.\n\n"
-"To get detailed help information for specific commands you can type\n"
-"'help' with a command names as argument.\n";
+
+BAREBOX_CMD_HELP_START(help)
+BAREBOX_CMD_HELP_TEXT("Without arguments, lists all all commands. With an argument, print help")
+BAREBOX_CMD_HELP_TEXT("about the specified command. If the argument is 'all', then output help")
+BAREBOX_CMD_HELP_TEXT("for all commands.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-a", "output help on all commands")
+BAREBOX_CMD_HELP_OPT ("-v", "verbose")
+BAREBOX_CMD_HELP_END
 
 static const char *help_aliases[] = { "?", NULL};
 
 BAREBOX_CMD_START(help)
 	.cmd		= do_help,
 	.aliases	= help_aliases,
-	.usage		= "print online help",
+	BAREBOX_CMD_DESC("print online help")
+	BAREBOX_CMD_OPTS("[-v] [COMMAND]")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_HELP(cmd_help_help)
 	BAREBOX_CMD_COMPLETE(command_complete)
diff --git a/commands/i2c.c b/commands/i2c.c
index 137cd85..2811f6a 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -56,13 +56,14 @@ static int do_i2c_probe(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_i2c_probe_help[] =
-"Usage: i2c_probe bus 0xstartaddr 0xstopaddr\n"
-"probe a range of i2c addresses.\n";
+BAREBOX_CMD_HELP_START(i2c_probe)
+BAREBOX_CMD_HELP_TEXT("Probe the i2c bus BUS, address range from START to END for devices.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(i2c_probe)
 	.cmd		= do_i2c_probe,
-	.usage		= "probe for an i2c device",
+	BAREBOX_CMD_DESC("probe for an i2c device")
+	BAREBOX_CMD_OPTS("BUS START END")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_probe_help)
 BAREBOX_CMD_END
@@ -130,17 +131,19 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_i2c_write_help[] =
-"Usage: i2c_write [OPTION] ... hexdatas\n"
-"write to i2c device.\n"
-"  -a 0x<addr>   i2c device address\n"
-"  -b <bus_num>  i2c bus number (default = 0)\n"
-"  -r 0x<reg>    start register\n"
-"  -w            use 16bit-wide address access\n";
+BAREBOX_CMD_HELP_START(i2c_write)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b BUS\t", "i2c bus number (default 0)")
+BAREBOX_CMD_HELP_OPT ("-a ADDR\t", "i2c device address")
+BAREBOX_CMD_HELP_OPT ("-r START", "start register")
+BAREBOX_CMD_HELP_OPT ("-w\t",       "use word (16 bit) wide access")
+BAREBOX_CMD_HELP_OPT ("-v\t",       "verbose")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(i2c_write)
 	.cmd		= do_i2c_write,
-	.usage		= "write to an i2c device",
+	BAREBOX_CMD_DESC("write to an i2c device")
+	BAREBOX_CMD_OPTS("[-barwv] DATA...")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_write_help)
 BAREBOX_CMD_END
@@ -204,18 +207,21 @@ static int do_i2c_read(int argc, char *argv[])
 	return ret;
 }
 
-static const __maybe_unused char cmd_i2c_read_help[] =
-"Usage: i2c_read [OPTION]\n"
-"read i2c device.\n"
-"  -a 0x<addr>   i2c device address\n"
-"  -b <bus_num>  i2c bus number (default = 0)\n"
-"  -r 0x<reg>    start register\n"
-"  -w            use 16bit-wide address access\n"
-"  -c <count>    byte count\n";
+BAREBOX_CMD_HELP_START(i2c_read)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-b BUS\t", "i2c bus number (default 0)")
+BAREBOX_CMD_HELP_OPT("-a ADDR\t", "i2c device address")
+BAREBOX_CMD_HELP_OPT("-r START", "start register")
+BAREBOX_CMD_HELP_OPT("-w\t",       "use word (16 bit) wide access")
+BAREBOX_CMD_HELP_OPT("-c COUNT", "byte count")
+BAREBOX_CMD_HELP_OPT("-v\t",       "verbose")
+BAREBOX_CMD_HELP_END
+
 
 BAREBOX_CMD_START(i2c_read)
 	.cmd		= do_i2c_read,
-	.usage		= "read from an i2c device",
+	BAREBOX_CMD_DESC("read from an i2c device")
+	BAREBOX_CMD_OPTS("[-bacrwv] DATA...")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_i2c_read_help)
 BAREBOX_CMD_END
diff --git a/commands/insmod.c b/commands/insmod.c
index 5c7c43e..176437e 100644
--- a/commands/insmod.c
+++ b/commands/insmod.c
@@ -32,12 +32,9 @@ static int do_insmod(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_insmod_help[] =
-"Usage: insmod <module>\n";
-
 BAREBOX_CMD_START(insmod)
 	.cmd		= do_insmod,
-	.usage		= "insert a module",
+	BAREBOX_CMD_DESC("load a barebox module")
+	BAREBOX_CMD_OPTS("[MODULE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
-	BAREBOX_CMD_HELP(cmd_insmod_help)
 BAREBOX_CMD_END
diff --git a/commands/iomemport.c b/commands/iomemport.c
index d4a1672..5294c13 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -49,7 +49,7 @@ static int do_iomem(int argc, char *argv[])
 
 BAREBOX_CMD_START(iomem)
 	.cmd		= do_iomem,
-	.usage		= "show iomem usage",
+	BAREBOX_CMD_DESC("show IO memory usage")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
 
@@ -63,7 +63,7 @@ static int do_ioport(int argc, char *argv[])
 
 BAREBOX_CMD_START(ioport)
 	.cmd		= do_ioport,
-	.usage		= "show ioport usage",
+	BAREBOX_CMD_DESC("show IO port usage")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
 #endif
diff --git a/commands/led.c b/commands/led.c
index 0e57d7e..62c72a3 100644
--- a/commands/led.c
+++ b/commands/led.c
@@ -80,14 +80,17 @@ is allowed.
 */
 
 BAREBOX_CMD_HELP_START(led)
-BAREBOX_CMD_HELP_USAGE("led <led> <value>\n")
-BAREBOX_CMD_HELP_SHORT("control the value of a LED. a value of 0 means disabled\n")
-BAREBOX_CMD_HELP_SHORT("without arguments the available LEDs are listed\n")
+BAREBOX_CMD_HELP_TEXT("Control the value of a LED. The exact meaning of VALUE is unspecified,")
+BAREBOX_CMD_HELP_TEXT("it can be a brightness, or a color. Most often a value of '1' means on")
+BAREBOX_CMD_HELP_TEXT("and '0' means off.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Without arguments the available LEDs are listed.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(led)
 	.cmd		= do_led,
-	.usage		= "led <led> <value>",
+	BAREBOX_CMD_DESC("control LEDs")
+	BAREBOX_CMD_OPTS("LED VALUE")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_led_help)
 BAREBOX_CMD_END
diff --git a/commands/let.c b/commands/let.c
index 68c98e3..3c84d27 100644
--- a/commands/let.c
+++ b/commands/let.c
@@ -63,32 +63,31 @@ static int do_let(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(let)
-BAREBOX_CMD_HELP_USAGE("let expr [expr ...]\n")
-BAREBOX_CMD_HELP_SHORT("evaluate arithmetic expressions\n")
-BAREBOX_CMD_HELP_TEXT ("supported operations are in order of decreasing precedence:\n")
-BAREBOX_CMD_HELP_TEXT ("	X++, X--\n")
-BAREBOX_CMD_HELP_TEXT ("	++X, --X\n")
-BAREBOX_CMD_HELP_TEXT ("	+X, -X\n")
-BAREBOX_CMD_HELP_TEXT ("	!X, ~X\n")
-BAREBOX_CMD_HELP_TEXT ("	X**Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X*Y, X/Y, X%Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X+Y, X-Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X<<Y, X>>Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X<Y, X<=Y, X>=Y, X>Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X==Y, X!=Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X&Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X^Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X|Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X&&Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X||Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X?Y:Z\n")
-BAREBOX_CMD_HELP_TEXT ("	X*=Y, X/=Y, X%=Y\n")
-BAREBOX_CMD_HELP_TEXT ("	X=Y, X&=Y, X|=Y, X^=Y, X+=Y, X-=Y, X<<=Y, X>>=Y\n")
+BAREBOX_CMD_HELP_TEXT ("Supported operations are in order of decreasing precedence:")
+BAREBOX_CMD_HELP_TEXT ("	X++, X--")
+BAREBOX_CMD_HELP_TEXT ("	++X, --X")
+BAREBOX_CMD_HELP_TEXT ("	+X, -X")
+BAREBOX_CMD_HELP_TEXT ("	!X, ~X")
+BAREBOX_CMD_HELP_TEXT ("	X**Y")
+BAREBOX_CMD_HELP_TEXT ("	X*Y, X/Y, X%Y")
+BAREBOX_CMD_HELP_TEXT ("	X+Y, X-Y")
+BAREBOX_CMD_HELP_TEXT ("	X<<Y, X>>Y")
+BAREBOX_CMD_HELP_TEXT ("	X<Y, X<=Y, X>=Y, X>Y")
+BAREBOX_CMD_HELP_TEXT ("	X==Y, X!=Y")
+BAREBOX_CMD_HELP_TEXT ("	X&Y")
+BAREBOX_CMD_HELP_TEXT ("	X^Y")
+BAREBOX_CMD_HELP_TEXT ("	X|Y")
+BAREBOX_CMD_HELP_TEXT ("	X&&Y")
+BAREBOX_CMD_HELP_TEXT ("	X||Y")
+BAREBOX_CMD_HELP_TEXT ("	X?Y:Z")
+BAREBOX_CMD_HELP_TEXT ("	X*=Y, X/=Y, X%=Y")
+BAREBOX_CMD_HELP_TEXT ("	X=Y, X&=Y, X|=Y, X^=Y, X+=Y, X-=Y, X<<=Y, X>>=Y")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(let)
 	.cmd            = do_let,
-	.usage          = "evaluate arithmetic expressions",
+	BAREBOX_CMD_DESC("evaluate arithmetic expressions")
+	BAREBOX_CMD_OPTS("EXPR [EXPR ...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_let_help)
 BAREBOX_CMD_END
diff --git a/commands/linux16.c b/commands/linux16.c
index ac1265a..65814f4 100644
--- a/commands/linux16.c
+++ b/commands/linux16.c
@@ -318,9 +318,16 @@ on_error:
 }
 
 BAREBOX_CMD_HELP_START(linux16)
-BAREBOX_CMD_HELP_USAGE("linux16 <file> [-v <mode>]\n")
-BAREBOX_CMD_HELP_SHORT("Boot a kernel <file> on x86 via real mode code.\n")
-BAREBOX_CMD_HELP_OPT  ("-v <mode>",   "VESA video mode number or 'ask'\n")
+BAREBOX_CMD_HELP_TEXT("Load kernel from FILE and boot on x86 in real-mode.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Only kernel images in bzImage format are supported by now.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("For the video mode refer the Linux kernel documentation")
+BAREBOX_CMD_HELP_TEXT("'Documentation/fb/vesafb.txt' for correct VESA mode numbers. Use 'ask'")
+BAREBOX_CMD_HELP_TEXT("instead of a number to make Linux for options..")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-v VESAMODE",   "set VESAMODE")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -337,7 +344,8 @@ x86_boot_preparation for more info about how to use this command.</p>
 
 BAREBOX_CMD_START(linux16)
 	.cmd		= do_linux16,
-	.usage		= "boot a linux kernel",
+	BAREBOX_CMD_DESC("boot a linux kernel on x86 via real-mode code")
+	BAREBOX_CMD_OPTS("[-v VESAMODE] FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_linux16_help)
 BAREBOX_CMD_END
diff --git a/commands/linux_exec.c b/commands/linux_exec.c
index a057fc5..741168a 100644
--- a/commands/linux_exec.c
+++ b/commands/linux_exec.c
@@ -45,14 +45,9 @@ static int do_linux_exec(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(linux_exec)
-BAREBOX_CMD_HELP_USAGE("linux_exec ...\n")
-BAREBOX_CMD_HELP_SHORT("Execute a command on the host\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(linux_exec)
 	.cmd		= do_linux_exec,
-	.usage		= "Execute a command on the host",
+	BAREBOX_CMD_DESC("execute a command on the host")
+	BAREBOX_CMD_OPTS("COMMAND")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
-	BAREBOX_CMD_HELP(cmd_linux_exec_help)
 BAREBOX_CMD_END
diff --git a/commands/ln.c b/commands/ln.c
index f622819..28e524e 100644
--- a/commands/ln.c
+++ b/commands/ln.c
@@ -39,14 +39,9 @@ static int do_ln(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(ln)
-BAREBOX_CMD_HELP_USAGE("ln SRC DEST\n")
-BAREBOX_CMD_HELP_SHORT("symlink - make a new name for a file\n")
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(ln)
 	.cmd		= do_ln,
-	.usage		= "symlink - make a new name for a file",
+	BAREBOX_CMD_DESC("create symlink (make a new name for a file)")
+	BAREBOX_CMD_OPTS("SRC DEST")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
-	BAREBOX_CMD_HELP(cmd_ln_help)
 BAREBOX_CMD_END
diff --git a/commands/loadb.c b/commands/loadb.c
index 6ff36dc..28eebf4 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -698,16 +698,19 @@ static int do_load_serial_bin(int argc, char *argv[])
 	return rcode;
 }
 
-static const __maybe_unused char cmd_loadb_help[] =
-    "[OPTIONS]\n"
-    "  -f file   - where to download to - defaults to " DEF_FILE "\n"
-    "  -o offset - what offset to download - defaults to 0\n"
-    "  -b baud   - baudrate at which to download - defaults to "
-    "console baudrate\n"
-    "  -c        - Create file if it is not present - default disabled";
+BAREBOX_CMD_HELP_START(loadb)
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default " DEF_FILE ")")
+BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)")
+BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate")
+BAREBOX_CMD_HELP_OPT("-c",      "create file if not present")
+BAREBOX_CMD_HELP_END
+
 BAREBOX_CMD_START(loadb)
 	.cmd = do_load_serial_bin,
-	.usage = "Load binary file over serial line (kermit mode)",
+	BAREBOX_CMD_DESC("load binary file over serial line (Kermit)")
+	BAREBOX_CMD_OPTS(" FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_loadb_help)
 BAREBOX_CMD_END
diff --git a/commands/loadenv.c b/commands/loadenv.c
index ef7ad13..ba92613 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -103,11 +103,13 @@ static int do_loadenv(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(loadenv)
-BAREBOX_CMD_HELP_USAGE("loadenv OPTIONS [ENVFS] [DIRECTORY]\n")
-BAREBOX_CMD_HELP_OPT("-n", "do not overwrite existing files\n")
-BAREBOX_CMD_HELP_OPT("-s", "scrub old environment\n")
-BAREBOX_CMD_HELP_OPT("-d", "load default environment\n")
-BAREBOX_CMD_HELP_SHORT("Load environment from ENVFS into DIRECTORY (default: /dev/env0 -> /env).\n")
+BAREBOX_CMD_HELP_TEXT("Load environment from files in ENVFS (default /dev/env0) in")
+BAREBOX_CMD_HELP_TEXT("DIRECTORY (default /env")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-n", "do not overwrite existing files")
+BAREBOX_CMD_HELP_OPT("-s", "scrub old environment")
+BAREBOX_CMD_HELP_OPT("-d", "load default environment")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -121,7 +123,8 @@ ENVFS can only handle files, directories are skipped silently.
 
 BAREBOX_CMD_START(loadenv)
 	.cmd		= do_loadenv,
-	.usage		= "Load environment from ENVFS into DIRECTORY (default: /dev/env0 -> /env).",
+	BAREBOX_CMD_DESC("load environment from ENVFS")
+	BAREBOX_CMD_OPTS("{-nsd] [ENVFS] [DIRECTORY]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_loadenv_help)
 BAREBOX_CMD_END
diff --git a/commands/loads.c b/commands/loads.c
index d67372b..24093e1 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -270,13 +270,14 @@ static int write_record(char *buf)
 }
 #endif /* CONFIG_CMD_SAVES */
 
-static const __maybe_unused char cmd_loads_help[] =
-	"[ off ]\n"
-	"    - load S-Record file over serial line with offset 'off'\n";
+BAREBOX_CMD_HELP_START(loads)
+BAREBOX_CMD_HELP_TEXT("Load S-Record file over serial line with offset OFFS.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(loads)
 	.cmd		= do_load_serial,
-	.usage		= "load S-Record file over serial line",
+	BAREBOX_CMD_DESC("load binary file over serial line (S-Records)")
+	BAREBOX_CMD_OPTS("OFFS")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_loads_help)
 BAREBOX_CMD_END
@@ -286,14 +287,14 @@ BAREBOX_CMD_END
  */
 
 #ifdef CONFIG_CMD_SAVES
-static const __maybe_unused char cmd_saves_help[] =
-	"[ off ] [size]\n"
-	"    - save S-Record file over serial line with offset 'off' "
-	"and size 'size'\n";
+BAREBOX_CMD_HELP_START(saves)
+BAREBOX_CMD_HELP_TEXT("Save S-Record file to serial line with offset OFFS and length LEN.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(saves)
 	.cmd		= do_save_serial,
-	.usage		= "save S-Record file over serial line",
+	BAREBOX_CMD_DESC("save file over serial line (S-Records)")
+	BAREBOX_CMD_OPTS("OFFS LEN")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_saves_help)
 BAREBOX_CMD_END
diff --git a/commands/loadxy.c b/commands/loadxy.c
index acc800b..0557951 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -140,6 +140,22 @@ static int do_loady(int argc, char *argv[])
 	return rcode;
 }
 
+BAREBOX_CMD_HELP_START(loady)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-g", "use Y-Modem/G (use on lossless tty such as USB)")
+BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate")
+BAREBOX_CMD_HELP_OPT("-t NAME", "console name to use (default: current)")
+BAREBOX_CMD_HELP_END
+
+BAREBOX_CMD_START(loady)
+	.cmd = do_loady,
+	BAREBOX_CMD_DESC("load binary file over serial line (Y-Modem)")
+	BAREBOX_CMD_OPTS("[-gtb]")
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
+	BAREBOX_CMD_HELP(cmd_loady_help)
+BAREBOX_CMD_END
+
+
 /**
  * @brief provide the loadx(X-Modem) support
  *
@@ -184,7 +200,7 @@ static int do_loadx(int argc, char *argv[])
 	else
 		cdev = console_get_first_active();
 	if (!cdev) {
-		printf("%s:No console device %s with STDIN and STDOUT\n",
+		printf("%s:No console device %s with STDIN and STDOUT",
 		       argv[0], cname ? cname : "default");
 		return -ENODEV;
 	}
@@ -224,32 +240,19 @@ static int do_loadx(int argc, char *argv[])
 	return rcode;
 }
 
-static const __maybe_unused char cmd_loadx_help[] =
-	"[OPTIONS]\n"
-	"  -f file   - where to download to - defaults to " DEF_FILE "\n"
-	"  -o offset - what offset to download - defaults to 0\n"
-	"  -t name   - console device name to use - defaults to current console\n"
-	"  -b baud   - baudrate at which to download - defaults to console baudrate\n"
-	"  -c        - Create file if it is not present - default disabled";
+BAREBOX_CMD_HELP_START(loadx)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default " DEF_FILE ")")
+BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)")
+BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate")
+BAREBOX_CMD_HELP_OPT("-t NAME", "console name to use (default: current)")
+BAREBOX_CMD_HELP_OPT("-c",      "create file if not present")
+BAREBOX_CMD_HELP_END
 
-#ifdef CONFIG_CMD_LOADY
 BAREBOX_CMD_START(loadx)
 	.cmd = do_loadx,
-	.usage = "Load binary file over serial line (X-Modem)",
-	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
-BAREBOX_CMD_HELP(cmd_loadx_help)
-BAREBOX_CMD_END
-
-static const __maybe_unused char cmd_loady_help[] =
-	"[OPTIONS]\n"
-	"  -g        - use Y-Modem/G (only for lossless tty as USB)\n"
-	"  -t name   - console device name to use - defaults to current console\n"
-	"  -b baud   - baudrate at which to download - defaults to console baudrate\n";
-
-BAREBOX_CMD_START(loady)
-	.cmd = do_loady,
-	.usage = "Load binary file over serial line (Y-Modem or Y-Modem/G)",
+	BAREBOX_CMD_DESC("load binary file over serial line (X-Modem)")
+	BAREBOX_CMD_OPTS("[-fptbc]")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
-BAREBOX_CMD_HELP(cmd_loady_help)
+	BAREBOX_CMD_HELP(cmd_loadx_help)
 BAREBOX_CMD_END
-#endif
diff --git a/commands/login.c b/commands/login.c
index 35ab84a..210eb20 100644
--- a/commands/login.c
+++ b/commands/login.c
@@ -78,15 +78,19 @@ static int do_login(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_login_help[] =
-"Usage: login [-t timeout [<command>]]\n"
-"If a timeout is specified and expired the command will be executed;\n"
-"\"boot\" by default\n"
-;
+BAREBOX_CMD_HELP_START(login)
+BAREBOX_CMD_HELP_TEXT("Asks for a password from the console before script execution continues.")
+BAREBOX_CMD_HELP_TEXT("The password can be set with the 'passwd' command. Instead of specifying")
+BAREBOX_CMD_HELP_TEXT("a TIMEOUT the magic variable 'global.login.timeout' could be set.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-t TIMEOUT", "Execute COMMAND if no login withing TIMEOUT seconds")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(login)
 	.cmd		= do_login,
-	.usage		= "login",
+	BAREBOX_CMD_DESC("ask for a password")
+	BAREBOX_CMD_OPTS("[-t TIMEOUT] COMMAND")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_login_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
diff --git a/commands/ls.c b/commands/ls.c
index 60bbfe3..3440790 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -204,14 +204,18 @@ static int do_ls(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(ls)
-BAREBOX_CMD_HELP_USAGE("ls [OPTIONS] [FILES]\n")
-BAREBOX_CMD_HELP_SHORT("List information about the FILEs (the current directory by default).\n")
-BAREBOX_CMD_HELP_OPT  ("-R",  "list subdirectories recursively\n")
+BAREBOX_CMD_HELP_TEXT("List information about the specified files or directories.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-l",  "long format")
+BAREBOX_CMD_HELP_OPT ("-C",  "column format (opposite of long format)")
+BAREBOX_CMD_HELP_OPT ("-R",  "list subdirectories recursively")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ls)
 	.cmd		= do_ls,
-	.usage		= "list a file or directory",
+	BAREBOX_CMD_DESC("list a file or directory")
+	BAREBOX_CMD_OPTS("[-lCR] [FILEDIR...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_ls_help)
 BAREBOX_CMD_END
diff --git a/commands/lsmod.c b/commands/lsmod.c
index 751ecfe..711c1c6 100644
--- a/commands/lsmod.c
+++ b/commands/lsmod.c
@@ -15,7 +15,7 @@ static int do_lsmod(int argc, char *argv[])
 
 BAREBOX_CMD_START(lsmod)
 	.cmd		= do_lsmod,
-	.usage		= "list modules",
+	BAREBOX_CMD_DESC("list loaded barebox modules")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/magicvar.c b/commands/magicvar.c
index 8f93227..d92788a 100644
--- a/commands/magicvar.c
+++ b/commands/magicvar.c
@@ -16,6 +16,6 @@ static int do_magicvar(int argc, char *argv[])
 
 BAREBOX_CMD_START(magicvar)
 	.cmd		= do_magicvar,
-	.usage		= "List information about magic variables",
+	BAREBOX_CMD_DESC("list information about magic variables")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 BAREBOX_CMD_END
diff --git a/commands/md.c b/commands/md.c
index e5eb705..c1361a6 100644
--- a/commands/md.c
+++ b/commands/md.c
@@ -89,29 +89,28 @@ out:
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_md_help[] =
-"Usage md [OPTIONS] <region>\n"
-"display (hexdump) a memory region.\n"
-"options:\n"
-"  -s <file>   display file (default /dev/mem)\n"
-"  -b          output in bytes\n"
-"  -w          output in halfwords (16bit)\n"
-"  -l          output in words (32bit)\n"
-"  -x          swap bytes at output\n"
-"\n"
-"Memory regions:\n"
-"Memory regions can be specified in two different forms: start+size\n"
-"or start-end, If <start> is omitted it defaults to 0. If end is omitted it\n"
-"defaults to the end of the device, except for interactive commands like md\n"
-"and mw for which it defaults to 0x100.\n"
-"Sizes can be specified as decimal, or if prefixed with 0x as hexadecimal.\n"
-"an optional suffix of k, M or G is for kibibytes, Megabytes or Gigabytes,\n"
-"respectively\n";
+
+BAREBOX_CMD_HELP_START(md)
+BAREBOX_CMD_HELP_TEXT("Display (hex dump) a memory region.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b",  "byte access")
+BAREBOX_CMD_HELP_OPT ("-w",  "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l",  "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-s FILE",  "display file (default /dev/mem)")
+BAREBOX_CMD_HELP_OPT ("-x",       "swap bytes at output")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Memory regions can be specified in two different forms: START+SIZE")
+BAREBOX_CMD_HELP_TEXT("or START-END, If START is omitted it defaults to 0x100")
+BAREBOX_CMD_HELP_TEXT("Sizes can be specified as decimal, or if prefixed with 0x as hexadecimal.")
+BAREBOX_CMD_HELP_TEXT("An optional suffix of k, M or G is for kbytes, Megabytes or Gigabytes.")
+BAREBOX_CMD_HELP_END
 
 
 BAREBOX_CMD_START(md)
 	.cmd		= do_mem_md,
-	.usage		= "memory display",
+	BAREBOX_CMD_DESC("memory display")
+	BAREBOX_CMD_OPTS("[-bwlsx] REGION")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_md_help)
 BAREBOX_CMD_END
diff --git a/commands/memcmp.c b/commands/memcmp.c
index ea178c9..d048150 100644
--- a/commands/memcmp.c
+++ b/commands/memcmp.c
@@ -128,22 +128,24 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_memcmp_help[] =
-"Usage: memcmp [OPTIONS] <addr1> <addr2> <count>\n"
-"\n"
-"options:\n"
-"  -b, -w, -l	use byte, halfword, or word accesses\n"
-"  -s <file>    source file (default /dev/mem)\n"
-"  -d <file>    destination file (default /dev/mem)\n"
-"\n"
-"Compare memory regions specified with addr1 and addr2\n"
-"of size <count> bytes. If source is a file count can\n"
-"be left unspecified in which case the whole file is\n"
-"compared\n";
+BAREBOX_CMD_HELP_START(memcmp)
+BAREBOX_CMD_HELP_TEXT("Compare memory regions specified with ADDR and ADDR2")
+BAREBOX_CMD_HELP_TEXT("of size COUNT bytes. If source is a file COUNT can")
+BAREBOX_CMD_HELP_TEXT("be left unspecified, in which case the whole file is")
+BAREBOX_CMD_HELP_TEXT("compared.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b",  "byte access")
+BAREBOX_CMD_HELP_OPT ("-w",  "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l",  "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-s FILE", "source file (default /dev/mem)")
+BAREBOX_CMD_HELP_OPT ("-d FILE", "destination file (default /dev/mem)")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(memcmp)
 	.cmd		= do_memcmp,
-	.usage		= "memory compare",
+	BAREBOX_CMD_DESC("memory compare")
+	BAREBOX_CMD_OPTS("[-bwlsd] ADDR1 ADDR2 COUNT")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memcmp_help)
 BAREBOX_CMD_END
diff --git a/commands/memcpy.c b/commands/memcpy.c
index 5a791b0..78716b1 100644
--- a/commands/memcpy.c
+++ b/commands/memcpy.c
@@ -128,19 +128,21 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_memcpy_help[] =
-"Usage: memcpy [OPTIONS] <src> <dst> <count>\n"
-"\n"
-"options:\n"
-"  -b, -w, -l   use byte, halfword, or word accesses\n"
-"  -s <file>    source file (default /dev/mem)\n"
-"  -d <file>    destination file (default /dev/mem)\n"
-"\n"
-"Copy memory at <src> of <count> bytes to <dst>\n";
+BAREBOX_CMD_HELP_START(memcpy)
+BAREBOX_CMD_HELP_TEXT("Copy memory at SRC of COUNT bytes to DEST")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b", "byte access")
+BAREBOX_CMD_HELP_OPT ("-w", "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l", "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-s FILE", "source file (default /dev/mem)")
+BAREBOX_CMD_HELP_OPT ("-d FILE", "write file (default /dev/mem)")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(memcpy)
 	.cmd		= do_memcpy,
-	.usage		= "memory copy",
+	BAREBOX_CMD_DESC("memory copy")
+	BAREBOX_CMD_OPTS("[-bwlsd] SRC DEST COUNT")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memcpy_help)
 BAREBOX_CMD_END
diff --git a/commands/meminfo.c b/commands/meminfo.c
index a73c462..87c76fc 100644
--- a/commands/meminfo.c
+++ b/commands/meminfo.c
@@ -30,7 +30,7 @@ static int do_meminfo(int argc, char *argv[])
 
 BAREBOX_CMD_START(meminfo)
 	.cmd		= do_meminfo,
-	.usage		= "print info about memory usage",
+	BAREBOX_CMD_DESC("print info about memory usage")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/memset.c b/commands/memset.c
index d557b9e..f869306 100644
--- a/commands/memset.c
+++ b/commands/memset.c
@@ -85,18 +85,20 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_memset_help[] =
-"Usage: memset [OPTIONS] <addr> <c> <n>\n"
-"\n"
-"options:\n"
-"  -b, -w, -l   use byte, halfword, or word accesses\n"
-"  -d <file>    destination file (default /dev/mem)\n"
-"\n"
-"Fill the first <n> bytes at offset <addr> with byte <c>\n";
+BAREBOX_CMD_HELP_START(memset)
+BAREBOX_CMD_HELP_TEXT("Fills the first COUNT bytes at offset ADDR with byte DATA,")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b",  "byte access")
+BAREBOX_CMD_HELP_OPT ("-w",  "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l",  "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-d FILE",  "write file (default /dev/mem)")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(memset)
 	.cmd		= do_memset,
-	.usage		= "memory fill",
+	BAREBOX_CMD_DESC("memory fill")
+	BAREBOX_CMD_OPTS("[-bwld] ADDR COUNT DATA")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memset_help)
 BAREBOX_CMD_END
diff --git a/commands/memtest.c b/commands/memtest.c
index 8308c6c..c1ffc64 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -230,15 +230,17 @@ out:
 	return 0;
 }
 
-static const __maybe_unused char cmd_memtest_help[] =
-"Usage: memtest [OPTION]...\n"
-"memtest related commands\n"
-"	-i	<iterations>	iterations [default=1, endless=0].\n"
-"	-b			perform only a test on buslines.";
+
+BAREBOX_CMD_HELP_START(memtest)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-i ITERATIONS", "perform number of iterations (default 1, 0 is endless)")
+BAREBOX_CMD_HELP_OPT("-b", "perform only a test on bus lines")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(memtest)
 	.cmd		= do_memtest,
-	.usage		= "Memory Test",
+	BAREBOX_CMD_DESC("extensive memory test")
+	BAREBOX_CMD_OPTS("[-ib]")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_memtest_help)
 BAREBOX_CMD_END
diff --git a/commands/menu.c b/commands/menu.c
index 99cb7cb..2008aa5 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -407,71 +407,67 @@ end:
 }
 
 static const __maybe_unused char cmd_menu_help[] =
-"Usage: menu [OPTION]... \n"
-"Manage Menu\n"
+"Manage Menu:\n"
 "  -m  menu\n"
 "  -l  list\n"
 "  -s  show\n"
 #if defined(CONFIG_CMD_MENU_MANAGEMENT)
-"Advanced\n"
+"Advanced menu management:\n"
 "  -e  menu entry\n"
 "  -a  add\n"
 "  -r  remove\n"
 "  -S  select\n"
 #endif
 "\n"
-"How to\n"
-"\n"
-"Show menu\n"
+"Show menu:\n"
 "  (-A auto select delay)\n"
 "  (-d auto select description)\n"
-"  menu -s -m <menu> [-A delay] [-d auto_display]\n"
+"  menu -s -m MENU [-A delay] [-d auto_display]\n"
 "\n"
-"List menu\n"
+"List menu:\n"
 "  menu -l\n"
 "\n"
 #if defined(CONFIG_CMD_MENU_MANAGEMENT)
-"Add a menu\n"
-"  menu -a -m <name> -d <description>\n"
+"Add a menu:\n"
+"  menu -a -m NAME -d DESC\n"
 "\n"
-"Remove a menu\n"
-"  menu -r -m <name>\n"
+"Remove a menu:\n"
+"  menu -r -m NAME\n"
 "\n"
-"Add an entry\n"
+"Add an entry:\n"
 "  (-R for do no exit the menu after executing the command)\n"
 "  (-b for box style 1 for selected)\n"
 "  (and optional -c for the command to run when we change the state)\n"
-"  menu -e -a -m <menu> -c <command> [-R] [-b 0|1] -d <description>\n"
+"  menu -e -a -m MENU -c COMMAND [-R] [-b 0|1] -d DESC\n"
 
-"Add a submenu entry\n"
+"Add a submenu entry:\n"
 "  (-R is not needed)\n"
 "  (-b for box style 1 for selected)\n"
 "  (and -c is not needed)\n"
-"  menu -e -a -m <menu> -u submenu -d [-b 0|1] <description>\n"
+"  menu -e -a -m MENU -u submenu -d [-b 0|1] DESC\n"
 "\n"
-"Remove an entry\n"
-"  menu -e -r -m <name> -n <num>\n"
+"Remove an entry:\n"
+"  menu -e -r -m NAME -n ENTRY\n"
 "\n"
-"Select an entry\n"
-"  menu -m <menu> -S -n <entry num starting at 1>\n"
+"Select an entry:\n"
+"  menu -m <menu> -S -n ENTRY\n"
 "\n"
-"List menu\n"
+"List menu:\n"
 "  menu -e -l [menu]\n"
 "\n"
-"Menu example\n"
-"menu -a -m boot -d \"Boot Menu\"\n"
-"menu -e -a -m boot -c boot -d \"Boot\"\n"
-"menu -e -a -m boot -c reset -d \"Reset\"\n"
-"menu -s -m boot\n"
+"Menu examples:\n"
+"  menu -a -m boot -d \"Boot Menu\"\n"
+"  menu -e -a -m boot -c boot -d \"Boot\"\n"
+"  menu -e -a -m boot -c reset -d \"Reset\"\n"
 #else
-"Menu example\n"
-"menu -s -m boot\n"
+"Menu example:\n"
 #endif
+"  menu -s -m boot\n"
 ;
 
 BAREBOX_CMD_START(menu)
 	.cmd		= do_menu,
-	.usage		= "Menu Management",
+	BAREBOX_CMD_DESC("create and display menus")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_menu_help)
 BAREBOX_CMD_END
diff --git a/commands/menutree.c b/commands/menutree.c
index 4defa66..5d30b67 100644
--- a/commands/menutree.c
+++ b/commands/menutree.c
@@ -32,30 +32,28 @@ static int do_menutree(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(menutree)
-BAREBOX_CMD_HELP_USAGE("menutree [OPTIONS]\n")
-"\n"
-"Create a menu from a directory structure\n"
-"Each menu entry is described by a subdirectory. Each subdirectory\n"
-"can contain the following files which further describe the entry:\n"
-"\n"
-"title -  A file containing the title of the entry as shown in the menu\n"
-"box -    If present, the entry is a 'bool' entry. The file contains a variable\n"
-"         name from which the current state of the bool is taken from and saved\n"
-"         to.\n"
-"action - if present this file contains a shell script which is executed when\n"
-"         when the entry is selected.\n"
-"If neither 'box' or 'action' are present this entry is considered a submenu\n"
-"containing more entries.\n"
-"\n"
-"Options:\n"
-" -m <dir>     directory where the menu starts (/env/menu)\n"
-
+BAREBOX_CMD_HELP_TEXT("Each menu entry is described by a subdirectory. Each subdirectory")
+BAREBOX_CMD_HELP_TEXT("can contain the following files which further describe the entry:")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("title  A file containing the title of the entry as shown in the menu")
+BAREBOX_CMD_HELP_TEXT("box    If present, the entry is a 'bool' entry. The file contains a")
+BAREBOX_CMD_HELP_TEXT("       name from which the current state of the bool is taken from and saved")
+BAREBOX_CMD_HELP_TEXT("       to.")
+BAREBOX_CMD_HELP_TEXT("action if present this file contains a shell script which is executed when")
+BAREBOX_CMD_HELP_TEXT("       when the entry is selected.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("If neither 'box' or 'action' are present, this entry is considered a submenu")
+BAREBOX_CMD_HELP_TEXT("containing more entries.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-m DIR", "directory where the menu starts (Default: /env/menu)")
 BAREBOX_CMD_HELP_END
 
 
 BAREBOX_CMD_START(menutree)
 	.cmd	= do_menutree,
-	.usage		= "create a menu from a directory structure",
+	BAREBOX_CMD_DESC("create menu from directory structure")
+	BAREBOX_CMD_OPTS("[-m] DIR")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_menutree_help)
 BAREBOX_CMD_END
diff --git a/commands/miitool.c b/commands/miitool.c
index a382e67..5a5278d 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -285,8 +285,12 @@ static int do_miitool(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(miitool)
-BAREBOX_CMD_HELP_USAGE("miitool [[[-v] -v] -v] <phy>\n")
-BAREBOX_CMD_HELP_SHORT("view status for MII <phy>.\n")
+BAREBOX_CMD_HELP_TEXT("This utility checks or sets the status of a network interface's")
+BAREBOX_CMD_HELP_TEXT("Media Independent Interface (MII) unit. Most fast ethernet")
+BAREBOX_CMD_HELP_TEXT("adapters use an MII to autonegotiate link speed and duplex setting.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-v", "increase verbosity")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -297,7 +301,8 @@ adapters use an MII to autonegotiate link speed and duplex setting.
  */
 BAREBOX_CMD_START(miitool)
 	.cmd		= do_miitool,
-	.usage		= "view media-independent interface status",
+	BAREBOX_CMD_DESC("view media-independent interface status")
+	BAREBOX_CMD_OPTS("[-v] PHY")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_miitool_help)
 BAREBOX_CMD_END
diff --git a/commands/mkdir.c b/commands/mkdir.c
index 3a55c0c..1f97886 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -59,13 +59,17 @@ static int do_mkdir(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_mkdir_help[] =
-"Usage: mkdir [directories]\n"
-"Create new directories\n";
+BAREBOX_CMD_HELP_START(mkdir)
+BAREBOX_CMD_HELP_TEXT("Create new directories")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-p", "make parent directories as needed")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(mkdir)
 	.cmd		= do_mkdir,
-	.usage		= "make directories",
+	BAREBOX_CMD_DESC("make directories")
+	BAREBOX_CMD_OPTS("[DIRECTORY ...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_mkdir_help)
 BAREBOX_CMD_END
diff --git a/commands/mm.c b/commands/mm.c
index b4565b9..ff2e746 100644
--- a/commands/mm.c
+++ b/commands/mm.c
@@ -103,16 +103,21 @@ out_write:
 	return 1;
 }
 
-static const __maybe_unused char cmd_mm_help[] =
-"Usage: mm [OPTIONS] <adr> <val> <mask>\n"
-"set/clear bits specified with <mask> in <adr> to <value>\n"
-"options:\n"
-"  -b, -w, -l	use byte, halfword, or word accesses\n"
-"  -d <file>	write file (default /dev/mem)\n";
+BAREBOX_CMD_HELP_START(mm)
+BAREBOX_CMD_HELP_TEXT("Set/clear bits specified with MASK in ADDR to VALUE")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b",  "byte access")
+BAREBOX_CMD_HELP_OPT ("-w",  "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l",  "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-d FILE",  "write file (default /dev/mem)")
+BAREBOX_CMD_HELP_END
+
 
 BAREBOX_CMD_START(mm)
 	.cmd		= do_mem_mm,
-	.usage		= "memory modify write with mask",
+	BAREBOX_CMD_DESC("memory modify with mask")
+	BAREBOX_CMD_OPTS("[-bwld] ADDR VAL MASK")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_mm_help)
 BAREBOX_CMD_END
diff --git a/commands/mount.c b/commands/mount.c
index 0996a6a..7aa155e 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -116,17 +116,18 @@ static int do_mount(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(mount)
-BAREBOX_CMD_HELP_USAGE("mount [[OPTIONS] <device> [mountpoint]]\n")
-BAREBOX_CMD_HELP_OPT("-t <type>", "specify filesystem type\n")
-BAREBOX_CMD_HELP_OPT("-a", "Mount all blockdevices.\n")
-BAREBOX_CMD_HELP_OPT("-v", "be more verbose\n")
-BAREBOX_CMD_HELP_SHORT("Mount a filesystem of a given type to a mountpoint.\n")
-BAREBOX_CMD_HELP_SHORT("If no fstype is specified, try to detect it automatically.\n")
-BAREBOX_CMD_HELP_SHORT("If no argument is given, list mounted filesystems.\n")
-BAREBOX_CMD_HELP_SHORT("With -a the mount command mounts all block devices whose filesystem\n")
-BAREBOX_CMD_HELP_SHORT("can be detected automatically to /mnt/<partname>\n")
-BAREBOX_CMD_HELP_SHORT("If mountpoint is not given a standard mountpoint of /mnt/devname>\n")
-BAREBOX_CMD_HELP_SHORT("is used. This directoy is created automatically if necessary.\n")
+BAREBOX_CMD_HELP_TEXT("If no argument is given, list mounted filesystems.")
+BAREBOX_CMD_HELP_TEXT("If no FSTYPE is specified, try to detect it automatically.")
+BAREBOX_CMD_HELP_TEXT("With -a the mount command mounts all block devices whose filesystem")
+BAREBOX_CMD_HELP_TEXT("can be detected automatically to /mnt/PARTNAME")
+BAREBOX_CMD_HELP_TEXT("If mountpoint is not given, a standard mountpoint of /mnt/DEVICE")
+BAREBOX_CMD_HELP_TEXT("is used. This directoy is created automatically if necessary.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-a\t", "mount all blockdevices")
+BAREBOX_CMD_HELP_OPT("-t FSTYPE", "specify filesystem type")
+BAREBOX_CMD_HELP_OPT("-o OPTIONS", "set file system OPTIONS")
+BAREBOX_CMD_HELP_OPT("-v\t", "verbose")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -162,7 +163,8 @@ the filesystem has been unmounted.
 
 BAREBOX_CMD_START(mount)
 	.cmd		= do_mount,
-	.usage		= "Mount a filesystem of a given type to a mountpoint or list mounted filesystems.",
+	BAREBOX_CMD_DESC("mount a filesystem or list mounted filesystems")
+	BAREBOX_CMD_OPTS("[[-atov] [DEVICE] [MOUNTPOINT]]")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_mount_help)
 BAREBOX_CMD_END
diff --git a/commands/msleep.c b/commands/msleep.c
index 0ac8cf8..4aee3c3 100644
--- a/commands/msleep.c
+++ b/commands/msleep.c
@@ -36,6 +36,7 @@ static int do_msleep(int argc, char *argv[])
 
 BAREBOX_CMD_START(msleep)
 	.cmd		= do_msleep,
-	.usage		= "delay execution for n milliseconds",
+	BAREBOX_CMD_DESC("delay execution for n milli-seconds")
+	BAREBOX_CMD_OPTS("MILLISECONDS")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 BAREBOX_CMD_END
diff --git a/commands/mw.c b/commands/mw.c
index 5c0c992..f0384f6 100644
--- a/commands/mw.c
+++ b/commands/mw.c
@@ -90,16 +90,20 @@ static int do_mem_mw(int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_mw_help[] =
-"Usage: mw [OPTIONS] <region> <value(s)>\n"
-"Write value(s) to the specifies region.\n"
-"options:\n"
-"  -b, -w, -l	use byte, halfword, or word accesses\n"
-"  -d <file>	write file (default /dev/mem)\n";
+BAREBOX_CMD_HELP_START(mw)
+BAREBOX_CMD_HELP_TEXT("Write DATA value(s) to the specified REGION.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b",  "byte access")
+BAREBOX_CMD_HELP_OPT ("-w",  "word access (16 bit)")
+BAREBOX_CMD_HELP_OPT ("-l",  "long access (32 bit)")
+BAREBOX_CMD_HELP_OPT ("-d FILE",  "write file (default /dev/mem)")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(mw)
 	.cmd		= do_mem_mw,
-	.usage		= "memory write (fill)",
+	BAREBOX_CMD_DESC("memory write")
+	BAREBOX_CMD_OPTS("[-bwld] REGION DATA...")
 	BAREBOX_CMD_GROUP(CMD_GRP_MEM)
 	BAREBOX_CMD_HELP(cmd_mw_help)
 BAREBOX_CMD_END
diff --git a/commands/nand.c b/commands/nand.c
index 137fdac..ad1c8c9 100644
--- a/commands/nand.c
+++ b/commands/nand.c
@@ -100,16 +100,17 @@ static int do_nand(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_nand_help[] =
-"Usage: nand [OPTION]...\n"
-"nand related commands\n"
-"  -a  <dev>  register a bad block aware device ontop of a normal nand device\n"
-"  -d  <dev>  deregister a bad block aware device\n"
-"  -b  <ofs> <dev> mark block at offset ofs as bad\n";
+BAREBOX_CMD_HELP_START(nand)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-a",  "register a bad block aware device ontop of a normal NAND device")
+BAREBOX_CMD_HELP_OPT ("-d",  "deregister a bad block aware device")
+BAREBOX_CMD_HELP_OPT ("-b OFFS",  "mark block at OFFSet as bad")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(nand)
 	.cmd		= do_nand,
-	.usage		= "NAND specific handling",
+	BAREBOX_CMD_DESC("NAND flash handling")
+	BAREBOX_CMD_OPTS("[-adb] NANDDEV")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_nand_help)
 BAREBOX_CMD_END
diff --git a/commands/nandtest.c b/commands/nandtest.c
index 8af75ba..ee7725d 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -336,19 +336,20 @@ err:
 	return 1;
 }
 
-/* String for usage of nandtest */
-static const __maybe_unused char cmd_nandtest_help[] =
-"Usage: nandtest [OPTION] <device>\n"
-		"  -t,  Really do a nandtest on device.\n"
-		"  -m,  Mark blocks bad if they appear so.\n"
-		"  -s   <seed>, Supply random seed.\n"
-		"  -i   <iterations>, Number of iterations.\n"
-		"  -o   <offset>, Start offset on flash.\n"
-		"  -l   <length>, Length of flash to test.\n";
+BAREBOX_CMD_HELP_START(nandtest)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-t",  "Really do a nandtest on device")
+BAREBOX_CMD_HELP_OPT ("-m",  "Mark blocks bad if they appear so")
+BAREBOX_CMD_HELP_OPT ("-s SEED",   "supply random seed")
+BAREBOX_CMD_HELP_OPT ("-i ITERATIONS",  "nNumber of iterations")
+BAREBOX_CMD_HELP_OPT ("-o OFFS",  "start offset on flash")
+BAREBOX_CMD_HELP_OPT ("-l LEN",   "length of flash to test")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(nandtest)
 	.cmd		= do_nandtest,
-	.usage		= "NAND Test",
+	BAREBOX_CMD_DESC("NAND flash memory test")
+	BAREBOX_CMD_OPTS("[-tmsiol] NANDDEVICE")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_nandtest_help)
 BAREBOX_CMD_END
diff --git a/commands/net.c b/commands/net.c
index 19e4541..7508c99 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -57,14 +57,11 @@ static int do_ethact(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_ethact_help[] =
-"Usage: ethact [ethx]\n";
-
 BAREBOX_CMD_START(ethact)
 	.cmd		= do_ethact,
-	.usage		= "set current ethernet device",
+	BAREBOX_CMD_DESC("get or set current ethernet device")
+	BAREBOX_CMD_OPTS("[ETHX]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
-	BAREBOX_CMD_HELP(cmd_ethact_help)
 	BAREBOX_CMD_COMPLETE(eth_complete)
 BAREBOX_CMD_END
 
diff --git a/commands/of_node.c b/commands/of_node.c
index 17deb50..901da88 100644
--- a/commands/of_node.c
+++ b/commands/of_node.c
@@ -94,14 +94,15 @@ static int do_of_node(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(of_node)
-BAREBOX_CMD_HELP_USAGE("of_node [OPTIONS] [NODE] [NAME]\n")
-BAREBOX_CMD_HELP_OPT  ("-c",  "create a new node\n")
-BAREBOX_CMD_HELP_OPT  ("-d",  "delete a node\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-c",  "create a new node")
+BAREBOX_CMD_HELP_OPT ("-d",  "delete a node")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(of_node)
 	.cmd		= do_of_node,
-	.usage		= "handle of nodes",
+	BAREBOX_CMD_DESC("create/delete nodes in the device tree")
+	BAREBOX_CMD_OPTS("[-cd] NODE NAME")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_of_node_help)
 BAREBOX_CMD_END
diff --git a/commands/of_property.c b/commands/of_property.c
index dcb85ec..f9f35b2 100644
--- a/commands/of_property.c
+++ b/commands/of_property.c
@@ -301,19 +301,21 @@ static int do_of_property(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(of_property)
-BAREBOX_CMD_HELP_USAGE("of_property [OPTIONS] [NODE] [PROPERTY] [VALUES]\n")
-BAREBOX_CMD_HELP_OPT  ("-s",  "set property to value\n")
-BAREBOX_CMD_HELP_OPT  ("-d",  "delete property\n")
-BAREBOX_CMD_HELP_TEXT ("\nvalid formats for values:\n")
-BAREBOX_CMD_HELP_TEXT ("<0x00112233 4 05> - an array of cells. cells not beginning with a digit are\n")
-BAREBOX_CMD_HELP_TEXT ("                    interpreted as node pathes and converted to phandles\n")
-BAREBOX_CMD_HELP_TEXT ("[00 11 22 .. nn]  - byte stream\n")
-BAREBOX_CMD_HELP_TEXT ("If the value does not start with '<' or '[' it is interpreted as strings\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-s",  "set property to value")
+BAREBOX_CMD_HELP_OPT ("-d",  "delete property")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Valid formats for values:")
+BAREBOX_CMD_HELP_TEXT("<0x00112233 4 05> - an array of cells. cells not beginning with a digit are")
+BAREBOX_CMD_HELP_TEXT("                    interpreted as node pathes and converted to phandles")
+BAREBOX_CMD_HELP_TEXT("[00 11 22 .. nn]  - byte stream")
+BAREBOX_CMD_HELP_TEXT("If the value does not start with '<' or '[' it is interpreted as string")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(of_property)
 	.cmd		= do_of_property,
-	.usage		= "handle of properties",
+	BAREBOX_CMD_DESC("handle device tree properties")
+	BAREBOX_CMD_OPTS("[-sd] NODE [PROPERTY] [VALUES]")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_of_property_help)
 BAREBOX_CMD_END
diff --git a/commands/oftree.c b/commands/oftree.c
index a0e6802..3253cf1 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -193,17 +193,18 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(oftree)
-BAREBOX_CMD_HELP_USAGE("oftree [OPTIONS] [DTB]\n")
-BAREBOX_CMD_HELP_OPT  ("-l",  "Load [DTB] to internal devicetree\n")
-BAREBOX_CMD_HELP_OPT  ("-p",  "probe devices from stored devicetree\n")
-BAREBOX_CMD_HELP_OPT  ("-d",  "dump oftree from [DTB] or the parsed tree if no dtb is given\n")
-BAREBOX_CMD_HELP_OPT  ("-f",  "free stored devicetree\n")
-BAREBOX_CMD_HELP_OPT  ("-n <node>",  "specify root devicenode to dump for -d\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-l",  "Load DTB to internal device tree")
+BAREBOX_CMD_HELP_OPT ("-p",  "probe devices from stored device tree")
+BAREBOX_CMD_HELP_OPT ("-f",  "free stored device tree")
+BAREBOX_CMD_HELP_OPT ("-d",  "dump device tree from DTB or the parsed tree if no DTB is given")
+BAREBOX_CMD_HELP_OPT ("-n NODE",  "specify root device NODE to dump for -d")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(oftree)
 	.cmd		= do_oftree,
-	.usage		= "handle devicetrees",
+	BAREBOX_CMD_DESC("handle device trees")
+	BAREBOX_CMD_OPTS("[-lpfdn] [DTB]")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_oftree_help)
 BAREBOX_CMD_END
diff --git a/commands/partition.c b/commands/partition.c
index e33358a..946cf2d 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -165,11 +165,17 @@ static int do_addpart(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(addpart)
-BAREBOX_CMD_HELP_USAGE("addpart <device> <part_desc>\n")
-BAREBOX_CMD_HELP_SHORT("Add a partition description to a device.\n")
-BAREBOX_CMD_HELP_OPT  ("-n", "no prefix. Do not prepend the device name as prefix before the partition name\n")
-BAREBOX_CMD_HELP_OPT  ("<device>",    "device being worked on\n")
-BAREBOX_CMD_HELP_OPT  ("<part_desc>", "size1[@offset1](name1)[ro],size2[@offset2](name2)[ro],...\n")
+
+BAREBOX_CMD_HELP_TEXT("The size and the offset can be given in decimal (without any prefix) and")
+BAREBOX_CMD_HELP_TEXT("in hex (prefixed with 0x). Both can have an optional suffix K, M or G.")
+BAREBOX_CMD_HELP_TEXT("The size of the last partition can be specified as '-' for the remaining")
+BAREBOX_CMD_HELP_TEXT("space on the device.  This format is the same as used by the Linux")
+BAREBOX_CMD_HELP_TEXT("kernel or cmdline mtd partitions.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-n", "do not use the device name as prefix of the partition name")
+BAREBOX_CMD_HELP_OPT ("DEVICE",    "device being worked on")
+BAREBOX_CMD_HELP_OPT ("PART", "SIZE1[@OFFSET1](NAME1)[RO],SIZE2[@OFFSET2](NAME2)[RO],...")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -186,7 +192,8 @@ kernel or cmdline mtd partitions.
 
 BAREBOX_CMD_START(addpart)
 	.cmd = do_addpart,
-	.usage = "adds a partition table to a device",
+	BAREBOX_CMD_DESC("add a partition description to a device")
+	BAREBOX_CMD_OPTS("[-n] DEVICE PART")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_addpart_help)
 BAREBOX_CMD_END
@@ -207,8 +214,7 @@ static int do_delpart(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(delpart)
-BAREBOX_CMD_HELP_USAGE("delpart <part 1> [<part n>] \n")
-BAREBOX_CMD_HELP_SHORT("Delete partitions previously added to a device with addpart.\n")
+BAREBOX_CMD_HELP_TEXT("Delete partitions previously added to a device with addpart.")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -224,7 +230,8 @@ argument list is taken as a list of partitions to be deleted.
 
 BAREBOX_CMD_START(delpart)
 	.cmd = do_delpart,
-	.usage = "delete partition(s)",
+	BAREBOX_CMD_DESC("delete partition(s)")
+	BAREBOX_CMD_OPTS("PART...")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_delpart_help)
 	BAREBOX_CMD_COMPLETE(devfs_partition_complete)
diff --git a/commands/passwd.c b/commands/passwd.c
index 47f7dab..6f68700 100644
--- a/commands/passwd.c
+++ b/commands/passwd.c
@@ -83,16 +83,17 @@ disable:
 	return ret;
 }
 
-static const __maybe_unused char cmd_passwd_help[] =
-"Usage: passwd\n"
-"passwd allow you to specify a password in the env\n"
-"to disable it put an empty password will still use the default password if set\n"
-;
+BAREBOX_CMD_HELP_START(passwd)
+BAREBOX_CMD_HELP_TEXT("'Interactively asks for a password. The digest of this password will be")
+BAREBOX_CMD_HELP_TEXT("stored in " PASSWD_DIR "/passwd. This is then used by the 'login' command.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Entering an empty string will disable the password function.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(passwd)
 	.cmd		= do_passwd,
-	.usage		= "passwd",
-	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
+	BAREBOX_CMD_DESC("set password")
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_passwd_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/poweroff.c b/commands/poweroff.c
index be749ff..e0ec04f 100644
--- a/commands/poweroff.c
+++ b/commands/poweroff.c
@@ -33,6 +33,6 @@ static int cmd_poweroff(int argc, char *argv[])
 
 BAREBOX_CMD_START(poweroff)
 	.cmd		= cmd_poweroff,
-	.usage		= "Perform POWER OFF of the board",
+	BAREBOX_CMD_DESC("turn the power off")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 BAREBOX_CMD_END
diff --git a/commands/printenv.c b/commands/printenv.c
index 27ca10d..83353ae 100644
--- a/commands/printenv.c
+++ b/commands/printenv.c
@@ -57,8 +57,9 @@ static int do_printenv(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(printenv)
-BAREBOX_CMD_HELP_USAGE("printenv [variable]\n")
-BAREBOX_CMD_HELP_SHORT("Print value of one or all environment variables.\n")
+BAREBOX_CMD_HELP_TEXT("If an argument is given, printenv prints the content of an environment")
+BAREBOX_CMD_HELP_TEXT("variable to the terminal. If no argument is specified, all variables are")
+BAREBOX_CMD_HELP_TEXT("printed.")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -72,7 +73,8 @@ printed.</p>
 
 BAREBOX_CMD_START(printenv)
 	.cmd		= do_printenv,
-	.usage		= "Print value of one or all environment variables.",
+	BAREBOX_CMD_DESC("print value of environment variables")
+	BAREBOX_CMD_OPTS("[VARIABLE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_printenv_help)
 BAREBOX_CMD_END
diff --git a/commands/pwd.c b/commands/pwd.c
index fb652f5..d5dd161 100644
--- a/commands/pwd.c
+++ b/commands/pwd.c
@@ -29,7 +29,7 @@ static int do_pwd(int argc, char *argv[])
 
 BAREBOX_CMD_START(pwd)
 	.cmd		= do_pwd,
-	.usage		= "print working directory",
+	BAREBOX_CMD_DESC("print working directory")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/readf.c b/commands/readf.c
index be88dfa..c8cc574 100644
--- a/commands/readf.c
+++ b/commands/readf.c
@@ -50,15 +50,15 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(readf)
-BAREBOX_CMD_HELP_USAGE("readf <file> <variable>\n")
-BAREBOX_CMD_HELP_SHORT("Read a single line of a file into a shell variable. Leading and trailing whitespaces\n")
-BAREBOX_CMD_HELP_SHORT("are removed, nonvisible characters are stripped. Input is limited to 1024\n")
-BAREBOX_CMD_HELP_SHORT("characters.\n")
+BAREBOX_CMD_HELP_TEXT("Read a single line from FILE into a VARiable. Leading and trailing")
+BAREBOX_CMD_HELP_TEXT("whitespaces are removed, nonvisible characters are stripped. Input is")
+BAREBOX_CMD_HELP_TEXT("limited to 1024 characters.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(readf)
 	.cmd		= do_readf,
-	.usage		= "read file into variable",
+	BAREBOX_CMD_DESC("read file into variable")
+	BAREBOX_CMD_OPTS("FILE VAR")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_readf_help)
 BAREBOX_CMD_END
diff --git a/commands/readline.c b/commands/readline.c
index c1a2496..e537498 100644
--- a/commands/readline.c
+++ b/commands/readline.c
@@ -41,14 +41,16 @@ static int do_readline(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_readline_help[] =
-"Usage: readline <prompt> VAR\n"
-"readline reads a line of user input into variable VAR.\n";
+BAREBOX_CMD_HELP_START(readline)
+BAREBOX_CMD_HELP_TEXT("First it displays the PROMPT, then it reads a line of user input into")
+BAREBOX_CMD_HELP_TEXT("variable VAR.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(readline)
 	.cmd		= do_readline,
-	.usage		= "prompt for user input",
-	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
+	BAREBOX_CMD_DESC("prompt for user input")
+	BAREBOX_CMD_OPTS("PROMPT VAR")
+	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_readline_help)
 BAREBOX_CMD_END
 
diff --git a/commands/readlink.c b/commands/readlink.c
index 8d2a191..f17f9e8 100644
--- a/commands/readlink.c
+++ b/commands/readlink.c
@@ -68,14 +68,16 @@ err:
 }
 
 BAREBOX_CMD_HELP_START(readlink)
-BAREBOX_CMD_HELP_USAGE("readlink [-f] FILE REALNAME\n")
-BAREBOX_CMD_HELP_SHORT("read value of a symbolic link and store into $REALNAME\n")
-BAREBOX_CMD_HELP_SHORT("-f canonicalize by following first symlink");
+BAREBOX_CMD_HELP_TEXT("Read value of a symbolic link and store it into VARIABLE.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-f", "canonicalize by following first symlink");
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(readlink)
 	.cmd		= do_readlink,
-	.usage		= "read value of a symbolic link",
+	BAREBOX_CMD_DESC("read value of a symbolic link")
+	BAREBOX_CMD_OPTS("[-f] FILE VARIABLE")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_readlink_help)
 BAREBOX_CMD_END
diff --git a/commands/reginfo.c b/commands/reginfo.c
index 92108b9..37816cb 100644
--- a/commands/reginfo.c
+++ b/commands/reginfo.c
@@ -29,7 +29,7 @@ static int do_reginfo(int argc, char *argv[])
 
 BAREBOX_CMD_START(reginfo)
 	.cmd		= do_reginfo,
-	.usage		= "print register information",
+	BAREBOX_CMD_DESC("print register information")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/regulator.c b/commands/regulator.c
index bdf4d88..e0b704f 100644
--- a/commands/regulator.c
+++ b/commands/regulator.c
@@ -29,6 +29,6 @@ static int do_regulator(int argc, char *argv[])
 
 BAREBOX_CMD_START(regulator)
 	.cmd		= do_regulator,
-	.usage		= "list regulators",
+	BAREBOX_CMD_DESC("list regulators")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 BAREBOX_CMD_END
diff --git a/commands/reset.c b/commands/reset.c
index 9478618..4f42b91 100644
--- a/commands/reset.c
+++ b/commands/reset.c
@@ -46,15 +46,15 @@ static int cmd_reset(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(reset)
-BAREBOX_CMD_HELP_USAGE("reset [-f]\n")
-BAREBOX_CMD_HELP_SHORT("Perform RESET of the CPU.\n")
-BAREBOX_CMD_HELP_OPT("-f",  "force RESET, don't call shutdown\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-f",  "force RESET, don't call shutdown")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(reset)
 	.cmd		= cmd_reset,
-	.usage		= "Perform RESET of the CPU",
-	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
+	BAREBOX_CMD_DESC("perform RESET of the CPU")
+	BAREBOX_CMD_OPTS("[-f]")
+	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_reset_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/rm.c b/commands/rm.c
index 39544f4..5f1f582 100644
--- a/commands/rm.c
+++ b/commands/rm.c
@@ -58,14 +58,15 @@ static int do_rm(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_rm_help[] =
-"Usage: rm [OPTIONS] [FILES]\n"
-"Remove files\n"
-"-r  remove directories and their contents recursively\n";
+BAREBOX_CMD_HELP_START(rm)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-r", "remove directories and their contents recursively")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(rm)
 	.cmd		= do_rm,
-	.usage		= "remove files",
+	BAREBOX_CMD_DESC("remove files")
+	BAREBOX_CMD_OPTS("[-r] FILES...")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_rm_help)
 BAREBOX_CMD_END
diff --git a/commands/rmdir.c b/commands/rmdir.c
index f756537..e1cd5dc 100644
--- a/commands/rmdir.c
+++ b/commands/rmdir.c
@@ -21,13 +21,15 @@ static int do_rmdir(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_rmdir_help[] =
-"Usage: rmdir [directories]\n"
-"Remove directories. The directories have to be empty.\n";
+
+BAREBOX_CMD_HELP_START(rmdir)
+BAREBOX_CMD_HELP_TEXT("Remove directories. The directories have to be empty.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(rmdir)
 	.cmd		= do_rmdir,
-	.usage		= "remove directorie(s)",
+	BAREBOX_CMD_DESC("remove empty directory(s)")
+	BAREBOX_CMD_OPTS("DIRECTORY...")
 	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 	BAREBOX_CMD_HELP(cmd_rmdir_help)
 BAREBOX_CMD_END
diff --git a/commands/saveenv.c b/commands/saveenv.c
index 866c91f..d629a94 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -48,13 +48,19 @@ static int do_saveenv(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(saveenv)
-BAREBOX_CMD_HELP_USAGE("saveenv [envfs] [directory]\n")
-BAREBOX_CMD_HELP_SHORT("Save the files in <directory> to the persistent storage device <envfs>.\n")
+BAREBOX_CMD_HELP_TEXT("Save the files in DIRECTORY to the persistent storage device ENVFS.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("ENVFS is usually a block in flash but can be any other file. If")
+BAREBOX_CMD_HELP_TEXT("omitted, DIRECTORY defaults to /env and ENVFS defaults to")
+BAREBOX_CMD_HELP_TEXT("/dev/env0. Note that envfs can only handle files, directories are being")
+BAREBOX_CMD_HELP_TEXT("skipped silently.")
+
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(saveenv)
 	.cmd		= do_saveenv,
-	.usage		= "save environment to persistent storage",
+	BAREBOX_CMD_DESC("save environment to persistent storage")
+	BAREBOX_CMD_OPTS("[ENVFS] [DIRECTORY]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_saveenv_help)
 BAREBOX_CMD_END
diff --git a/commands/setenv.c b/commands/setenv.c
index ff8ef9b..9e21cce 100644
--- a/commands/setenv.c
+++ b/commands/setenv.c
@@ -36,8 +36,8 @@ static int do_setenv(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(setenv)
-BAREBOX_CMD_HELP_USAGE("setenv <name> [<value>]\n")
-BAREBOX_CMD_HELP_SHORT("Set environment variable to a value or delete if value is avoided.\n")
+BAREBOX_CMD_HELP_TEXT("Set environment variable NAME to VALUE.")
+BAREBOX_CMD_HELP_TEXT("If VALUE is ommitted, then the variable is deleted.")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -46,13 +46,12 @@ BAREBOX_CMD_HELP_END
 <p> This command is only available if the simple command line parser is
 in use. Within the hush shell, \c setenv is not required.</p>
 
-\todo Check if kconfig does this correctly.
-
  */
 
 BAREBOX_CMD_START(setenv)
 	.cmd		= do_setenv,
-	.usage		= "set environment variables",
+	BAREBOX_CMD_DESC("set environment variable")
+	BAREBOX_CMD_OPTS("NAME [VALUE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_ENV)
 	BAREBOX_CMD_HELP(cmd_setenv_help)
 BAREBOX_CMD_END
diff --git a/commands/sleep.c b/commands/sleep.c
index e39e2d3..2491dc2 100644
--- a/commands/sleep.c
+++ b/commands/sleep.c
@@ -43,7 +43,8 @@ static int do_sleep(int argc, char *argv[])
 
 BAREBOX_CMD_START(sleep)
 	.cmd		= do_sleep,
-	.usage		= "delay execution for n seconds",
+	BAREBOX_CMD_DESC("delay execution for n seconds")
+	BAREBOX_CMD_OPTS("SECONDS")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(command_var_complete)
 BAREBOX_CMD_END
diff --git a/commands/spi.c b/commands/spi.c
index ff27a7b..21db9ae 100644
--- a/commands/spi.c
+++ b/commands/spi.c
@@ -114,20 +114,22 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_spi_help[] =
-"Usage: spi [OPTION] [data to write 0xXX]\n"
-"write/read spi device.\n"
-"  -b <bus_num>  spi bus number (default = 0)\n"
-"  -r <count>    to read\n"
-"  -c <cs>       chip select (default = 0)\n"
-"  -m <mode>     spi mode (default = 0)\n"
-"  -f <hz>       max_speed_hz (default = 1MHz)\n"
-"  -w <bit>      bits_per_word (default = 8)\n"
-"  -v            verbose\n";
+
+BAREBOX_CMD_HELP_START(spi)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-b BUS\t",  "SPI bus number (default 0)")
+BAREBOX_CMD_HELP_OPT ("-r COUNT",  "bytes to read")
+BAREBOX_CMD_HELP_OPT ("-c\t",      "chip select (default 0)")
+BAREBOX_CMD_HELP_OPT ("-m MODE\t", "SPI mode (default 0)")
+BAREBOX_CMD_HELP_OPT ("-f HZ\t",   "max speed frequency, in Hz (default 1 MHz)")
+BAREBOX_CMD_HELP_OPT ("-w BIT\t",  "bits per word (default 8)")
+BAREBOX_CMD_HELP_OPT ("-v\t",      "verbose")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(spi)
 	.cmd		= do_spi,
-	.usage		= "write/read spi device",
+	BAREBOX_CMD_DESC("write/read from SPI device")
+	BAREBOX_CMD_OPTS("[-brcmfwv] DATA...")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_spi_help)
 BAREBOX_CMD_END
diff --git a/commands/splash.c b/commands/splash.c
index 24ef47a..c61a1d7 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -78,13 +78,15 @@ static int do_splash(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(splash)
-BAREBOX_CMD_HELP_USAGE("splash [OPTIONS] FILE\n")
-BAREBOX_CMD_HELP_SHORT("Show the bitmap FILE on the framebuffer.\n")
-BAREBOX_CMD_HELP_OPT  ("-f <fb>",   "framebuffer device (/dev/fb0)\n")
-BAREBOX_CMD_HELP_OPT  ("-x <xofs>", "x offset (default center)\n")
-BAREBOX_CMD_HELP_OPT  ("-y <yofs>", "y offset (default center)\n")
-BAREBOX_CMD_HELP_OPT  ("-b <color>", "background color in 0xttrrggbb\n")
-BAREBOX_CMD_HELP_OPT  ("-o",        "render offscreen\n")
+BAREBOX_CMD_HELP_TEXT("This command displays a graphics in the bitmap (.bmp) format on the")
+BAREBOX_CMD_HELP_TEXT("framebuffer. Currently images with 8 and 24 bit color depth are supported.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-f FB\t",    "framebuffer device (default /dev/fb0)")
+BAREBOX_CMD_HELP_OPT ("-x XOFFS", "x offset (default center)")
+BAREBOX_CMD_HELP_OPT ("-y YOFFS", "y offset (default center)")
+BAREBOX_CMD_HELP_OPT ("-b COLOR", "background color in 0xttrrggbb")
+BAREBOX_CMD_HELP_OPT ("-o\t",       "render offscreen")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -100,7 +102,8 @@ color depth.
 
 BAREBOX_CMD_START(splash)
 	.cmd		= do_splash,
-	.usage		= "show a bmp image",
+	BAREBOX_CMD_DESC("display a BMP image")
+	BAREBOX_CMD_OPTS("[-fxyno] FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_splash_help)
 BAREBOX_CMD_END
diff --git a/commands/test.c b/commands/test.c
index 3f652f4..d0f63c1 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -226,17 +226,17 @@ out:
 
 static const char *test_aliases[] = { "[", NULL};
 
-static const __maybe_unused char cmd_test_help[] =
-"Usage: test [OPTIONS]\n"
-"options: !, =, !=, -eq, -ne, -ge, -gt, -le, -lt, -o, -a, -z, -n, -d, -e, -f, -L\n"
-"see 'man test' on your PC for more information.\n";
-
-static const __maybe_unused char cmd_test_usage[] = "minimal test like /bin/sh";
+BAREBOX_CMD_HELP_START(test)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_TEXT("\t!, =, !=, -eq, -ne, -ge, -gt, -le, -lt, -o, -a, -z, -n, -d, -e,")
+BAREBOX_CMD_HELP_TEXT("\t-f, -L; see 'man test' on your PC for more information.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(test)
 	.aliases	= test_aliases,
 	.cmd		= do_test,
-	.usage		= cmd_test_usage,
+	BAREBOX_CMD_DESC("minimal test command like in /bin/sh")
+	BAREBOX_CMD_OPTS("[EXPR]")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_test_help)
 BAREBOX_CMD_END
diff --git a/commands/tftp.c b/commands/tftp.c
index 84c69f9..c066631 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -92,13 +92,16 @@ err_free:
 }
 
 BAREBOX_CMD_HELP_START(tftp)
-BAREBOX_CMD_HELP_USAGE("tftp [-p] <source> [dest]\n")
-BAREBOX_CMD_HELP_SHORT("Load a file from or upload to TFTP server.\n")
+BAREBOX_CMD_HELP_TEXT("Load (or save) a file via TFTP.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-p", "push to TFTP server")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(tftp)
 	.cmd		= do_tftpb,
-	.usage		= "(up-)Load file using tftp protocol",
+	BAREBOX_CMD_DESC("load (or save) a file using TFTP")
+	BAREBOX_CMD_OPTS("[-p] SOURCE [DEST]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_tftp_help)
 BAREBOX_CMD_END
diff --git a/commands/time.c b/commands/time.c
index 6a696c2..29000d9 100644
--- a/commands/time.c
+++ b/commands/time.c
@@ -45,14 +45,14 @@ static int do_time(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(time)
-BAREBOX_CMD_HELP_USAGE("time <command>\n")
-BAREBOX_CMD_HELP_SHORT("note: This command depends on <command> being interruptible,\n")
-BAREBOX_CMD_HELP_SHORT("Otherwise the timer may overrun resulting in incorrect results\n")
+BAREBOX_CMD_HELP_TEXT("Note: This command depends on COMMAND being interruptible,")
+BAREBOX_CMD_HELP_TEXT("otherwise the timer may overrun resulting in incorrect results")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(time)
 	.cmd		= do_time,
-	.usage		= "measure execution time of a command",
+	BAREBOX_CMD_DESC("measure execution duration of a command")
+	BAREBOX_CMD_OPTS("COMMAND")
 	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 	BAREBOX_CMD_HELP(cmd_time_help)
 BAREBOX_CMD_END
diff --git a/commands/timeout.c b/commands/timeout.c
index 0e81583..feca714 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -102,18 +102,20 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_timeout_help[] =
-"Usage: timeout [OPTION]... <timeout>\n"
-"Wait <timeout> seconds for a timeout. Return 1 if the user intervented\n"
-"or 0 if a timeout occured\n"
-"  -a  interrupt on any key\n"
-"  -c  interrupt on ctrl-c\n"
-"  -r  interrupt on return\n"
-"  -s  silent mode\n";
+BAREBOX_CMD_HELP_START(timeout)
+BAREBOX_CMD_HELP_TEXT("Wait SECONDS for a timeout. Return 1 if the user intervented.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-a", "interrupt on any key")
+BAREBOX_CMD_HELP_OPT("-c", "interrupt on Ctrl-C")
+BAREBOX_CMD_HELP_OPT("-r", "interrupt on RETURN")
+BAREBOX_CMD_HELP_OPT("-s", "silent mode")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(timeout)
 	.cmd		= do_timeout,
-	.usage		= "wait for a specified timeout",
+	BAREBOX_CMD_DESC("wait for a specified timeout")
+	BAREBOX_CMD_OPTS("[-acrs] SECONDS")
 	BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
 	BAREBOX_CMD_HELP(cmd_timeout_help)
 BAREBOX_CMD_END
diff --git a/commands/trigger.c b/commands/trigger.c
index 93b4416..17c8411 100644
--- a/commands/trigger.c
+++ b/commands/trigger.c
@@ -90,15 +90,17 @@ static int do_trigger(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(trigger)
-BAREBOX_CMD_HELP_USAGE("trigger [OPTIONS]\n")
-BAREBOX_CMD_HELP_SHORT("control a LED trigger. Without options the currently assigned triggers are shown.\n")
-BAREBOX_CMD_HELP_OPT  ("-t <trigger> <led>",  "set a trigger for a led\n")
-BAREBOX_CMD_HELP_OPT  ("-d <trigger>",  "disable a trigger\n")
+BAREBOX_CMD_HELP_TEXT("Control a LED trigger. Without options assigned triggers are shown.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-t",  "set a trigger (needs LED argument)")
+BAREBOX_CMD_HELP_OPT ("-d",  "disable a trigger")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(trigger)
 	.cmd		= do_trigger,
-	.usage		= "handle LED triggers",
+	BAREBOX_CMD_DESC("handle LED triggers")
+	BAREBOX_CMD_OPTS("[-td] TRIGGER [LED]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_trigger_help)
 BAREBOX_CMD_END
diff --git a/commands/true.c b/commands/true.c
index 6ebbd72..fbb34e7 100644
--- a/commands/true.c
+++ b/commands/true.c
@@ -28,7 +28,7 @@ static int do_true(int argc, char *argv[])
 
 BAREBOX_CMD_START(true)
 	.cmd		= do_true,
-	.usage		= "do nothing, successfully",
+	BAREBOX_CMD_DESC("do nothing, successfully")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/ubi.c b/commands/ubi.c
index 9a70db1..d593e71 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -44,14 +44,16 @@ static int do_ubimkvol(int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubimkvol_help[] =
-"Usage: ubimkvol <ubidev> <name> <size>\n"
-"Create an ubi volume on <ubidev> with name <name> and size <size>\n"
-"If size is zero all available space is used for the volume\n";
+
+BAREBOX_CMD_HELP_START(ubimkvol)
+BAREBOX_CMD_HELP_TEXT("Create an UBI volume on UBIDEV with NAME and SIZE.")
+BAREBOX_CMD_HELP_TEXT("If SIZE is 0 all available space is used for the volume.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ubimkvol)
 	.cmd		= do_ubimkvol,
-	.usage		= "create an ubi volume",
+	BAREBOX_CMD_DESC("create an UBI volume")
+	BAREBOX_CMD_OPTS("UBIDEV NAME SIZE")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubimkvol_help)
 BAREBOX_CMD_END
@@ -100,13 +102,15 @@ err:
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubiattach_help[] =
-"Usage: ubiattach [-O vid-hdr-offset] <mtddev>\n"
-"Attach <mtddev> to ubi\n";
+BAREBOX_CMD_HELP_START(ubiattach)
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-O OFFS",  "VID header offset")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ubiattach)
 	.cmd		= do_ubiattach,
-	.usage		= "attach a mtd dev to ubi",
+	BAREBOX_CMD_DESC("attach mtd device to UBI")
+	BAREBOX_CMD_OPTS("[-O] MTDDEV")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubiattach_help)
 BAREBOX_CMD_END
@@ -127,15 +131,11 @@ static int do_ubidetach(int argc, char *argv[])
 	return ret;
 }
 
-static const __maybe_unused char cmd_ubidetach_help[] =
-"Usage: ubidetach <ubinum>\n"
-"Detach <ubinum> from ubi\n";
-
 BAREBOX_CMD_START(ubidetach)
 	.cmd		= do_ubidetach,
-	.usage		= "detach an ubi dev",
+	BAREBOX_CMD_DESC("detach an UBI device")
+	BAREBOX_CMD_OPTS("UBINUM")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
-	BAREBOX_CMD_HELP(cmd_ubidetach_help)
 BAREBOX_CMD_END
 
 static int do_ubirmvol(int argc, char *argv[])
@@ -163,13 +163,14 @@ static int do_ubirmvol(int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubirmvol_help[] =
-"Usage: ubirmvol <ubidev> <name>\n"
-"Delete ubi volume <name> from <ubidev>\n";
+BAREBOX_CMD_HELP_START(ubirmvol)
+BAREBOX_CMD_HELP_TEXT("Delete UBI volume NAME from UBIDEV")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ubirmvol)
 	.cmd		= do_ubirmvol,
-	.usage		= "delete an ubi volume",
+	BAREBOX_CMD_DESC("delete an UBI volume")
+	BAREBOX_CMD_OPTS("UBIDEV NAME")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubirmvol_help)
 BAREBOX_CMD_END
diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index 98e8c52..5c8a363 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -764,35 +764,32 @@ out_close_mtd:
 }
 
 BAREBOX_CMD_HELP_START(ubiformat)
-BAREBOX_CMD_HELP_USAGE(PROGRAM_NAME " <MTD device file name> [-s <bytes>] [-O <offs>] [-n]\n"
-	"\t[-f <file>] [-e <value>] [-x <num>] [-Q <num>] [-y] [-q] [-v]\n")
-BAREBOX_CMD_HELP_SHORT("A tool to format MTD devices and flash UBI images\n")
-BAREBOX_CMD_HELP_OPT("-s <bytes>", "minimum input/output unit used for UBI headers, "
-"e.g. sub-page size in case of NAND flash (equivalent to the minimum input/output "
-"unit size by default)\n")
-BAREBOX_CMD_HELP_OPT("-O <offs>", "offset if the VID header from start of the "
-"physical eraseblock (default is the next minimum I/O unit or sub-page after the EC "
-"header)\n")
-BAREBOX_CMD_HELP_OPT("-n", "only erase all eraseblock and preserve erase "
-"counters, do not write empty volume table\n")
-BAREBOX_CMD_HELP_OPT("-f <file>", "flash image file\n")
-BAREBOX_CMD_HELP_OPT("-e <value>", "use <value> as the erase counter value for all eraseblocks\n")
-BAREBOX_CMD_HELP_OPT("-x <num>", "UBI version number to put to EC headers "
-"(default is 1)\n")
-BAREBOX_CMD_HELP_OPT("-Q <num>", "32-bit UBI image sequence number to use "
-"(by default a random number is picked)\n")
-BAREBOX_CMD_HELP_OPT("-q", "suppress progress percentage information\n")
-BAREBOX_CMD_HELP_OPT("-v", "be verbose\n")
-BAREBOX_CMD_HELP_TEXT(
-"Example 1: " PROGRAM_NAME " /dev/nand0 -y - format nand0 and assume yes\n"
-"Example 2: " PROGRAM_NAME " /dev/nand0 -q -e 0 - format nand0,\n"
-"           be quiet and force erase counter value 0.\n";
-)
+BAREBOX_CMD_HELP_TEXT("A tool to format MTD devices and flash UBI images")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-s BYTES", "minimum input/output unit used for UBI headers")
+BAREBOX_CMD_HELP_OPT("\t", "e.g. sub-page size in case of NAND flash")
+BAREBOX_CMD_HELP_OPT("-O OFFS\t", "offset if the VID header from start of the")
+BAREBOX_CMD_HELP_OPT("\t", "physical eraseblock (default is the next minimum I/O unit or")
+BAREBOX_CMD_HELP_OPT("\t", "sub-page after the EC header)")
+BAREBOX_CMD_HELP_OPT("-n\t", "only erase all eraseblock and preserve erase")
+BAREBOX_CMD_HELP_OPT("\t", "counters, do not write empty volume table")
+BAREBOX_CMD_HELP_OPT("-f FILE\t", "flash image file")
+BAREBOX_CMD_HELP_OPT("-e VALUE", "use VALUE as erase counter value for all eraseblocks")
+BAREBOX_CMD_HELP_OPT("-x NUM\t", "UBI version number to put to EC headers (default 1)")
+BAREBOX_CMD_HELP_OPT("-Q NUM\t", "32-bit UBI image sequence number to use")
+BAREBOX_CMD_HELP_OPT("-q\t", "suppress progress percentage information")
+BAREBOX_CMD_HELP_OPT("-v\t", "be verbose")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Example 1: " PROGRAM_NAME " /dev/nand0 -y - format nand0 and assume yes")
+BAREBOX_CMD_HELP_TEXT("Example 2: " PROGRAM_NAME " /dev/nand0 -q -e 0 - format nand0,")
+BAREBOX_CMD_HELP_TEXT("\tbe quiet and force erase counter value 0.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ubiformat)
 	.cmd		= do_ubiformat,
-	.usage		= "format an ubi volume",
+	BAREBOX_CMD_DESC("format an ubi volume")
+	BAREBOX_CMD_OPTS("[-sOnfexQqv] MTDEVICE")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_ubiformat_help)
 BAREBOX_CMD_END
diff --git a/commands/uimage.c b/commands/uimage.c
index a4bc2cc..33523d7 100644
--- a/commands/uimage.c
+++ b/commands/uimage.c
@@ -60,7 +60,7 @@ static int do_uimage(int argc, char *argv[])
 	}
 
 	if (verify) {
-		printf("verifying data crc... ");
+		printf("verifying data CRC... ");
 		ret = uimage_verify(handle);
 		if (ret)
 			goto err;
@@ -91,16 +91,17 @@ err:
 }
 
 BAREBOX_CMD_HELP_START(uimage)
-BAREBOX_CMD_HELP_USAGE("uimage [OPTIONS] <file>\n")
-BAREBOX_CMD_HELP_OPT  ("-i",  "show information about image\n")
-BAREBOX_CMD_HELP_OPT  ("-v",  "verify image\n")
-BAREBOX_CMD_HELP_OPT  ("-e <outfile>",  "extract image to <outfile>\n")
-BAREBOX_CMD_HELP_OPT  ("-n <no>",  "use image number <no> in multifile images\n")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-i\t",  "show information about image")
+BAREBOX_CMD_HELP_OPT ("-v\t",  "verify image")
+BAREBOX_CMD_HELP_OPT ("-e OUTFILE",  "extract image to OUTFILE")
+BAREBOX_CMD_HELP_OPT ("-n NO\t",  "use image number NO in multifile image")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(uimage)
 	.cmd		= do_uimage,
-	.usage		= "extract/verify uImage",
+	BAREBOX_CMD_DESC("extract/verify uImage")
+	BAREBOX_CMD_OPTS("[-vien] FILE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_uimage_help)
 BAREBOX_CMD_END
diff --git a/commands/umount.c b/commands/umount.c
index 39ce56c..84c84e4 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -29,13 +29,15 @@ static int do_umount(int argc, char *argv[])
 	return umount(argv[1]);
 }
 
-static const __maybe_unused char cmd_umount_help[] =
-"Usage: umount <mountpoint>\n"
-"umount a filesystem mounted on a specific mountpoint\n";
+
+BAREBOX_CMD_HELP_START(umount)
+BAREBOX_CMD_HELP_TEXT("Unmount a filesystem mounted on a specific MOINTPOINT")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(umount)
 	.cmd		= do_umount,
-	.usage		= "umount a filesystem",
+	BAREBOX_CMD_DESC("umount a filesystem")
+	BAREBOX_CMD_OPTS("MOUNTPOINT")
 	BAREBOX_CMD_GROUP(CMD_GRP_PART)
 	BAREBOX_CMD_HELP(cmd_umount_help)
 BAREBOX_CMD_END
diff --git a/commands/uncompress.c b/commands/uncompress.c
index 0b4398f..38d53e7 100644
--- a/commands/uncompress.c
+++ b/commands/uncompress.c
@@ -55,14 +55,10 @@ exit_close:
 	return ret;
 }
 
-static const __maybe_unused char cmd_uncompress_help[] =
-"Usage: uncompress <infile> <outfile>\n"
-"Uncompress a compressed file\n";
 
 BAREBOX_CMD_START(uncompress)
-        .cmd            = do_uncompress,
-        .usage          = "uncompress a compressed file",
-        BAREBOX_CMD_GROUP(CMD_GRP_FILE)
-        BAREBOX_CMD_HELP(cmd_uncompress_help)
+	.cmd            = do_uncompress,
+	BAREBOX_CMD_DESC("uncompress a compressed file")
+	BAREBOX_CMD_OPTS("INFILE OUTFILE")
+	BAREBOX_CMD_GROUP(CMD_GRP_FILE)
 BAREBOX_CMD_END
-
diff --git a/commands/usb.c b/commands/usb.c
index 6e40a60..073c79c 100644
--- a/commands/usb.c
+++ b/commands/usb.c
@@ -41,14 +41,16 @@ static int do_usb(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(usb)
-BAREBOX_CMD_HELP_USAGE("usb [-f]\n")
-BAREBOX_CMD_HELP_SHORT("Scan for USB devices.\n")
-BAREBOX_CMD_HELP_OPT("-f", "force. Rescan although scanned already\n")
+BAREBOX_CMD_HELP_TEXT("Scan for USB devices.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT("-f", "force rescan")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(usb)
 	.cmd		= do_usb,
-	.usage		= "(re-)detect USB devices",
+	BAREBOX_CMD_DESC("(re-)detect USB devices")
+	BAREBOX_CMD_OPTS("[-f]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_usb_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
diff --git a/commands/usbserial.c b/commands/usbserial.c
index ee4e83d..1c26246 100644
--- a/commands/usbserial.c
+++ b/commands/usbserial.c
@@ -77,18 +77,19 @@ static int do_usbserial(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(usbserial)
-BAREBOX_CMD_HELP_USAGE("usbserial [OPTIONS] <description>\n")
-BAREBOX_CMD_HELP_SHORT("Enable/disable a serial gadget on the USB device interface.\n")
-BAREBOX_CMD_HELP_OPT  ("-m <str>",  "Manufacturer string (barebox)\n")
-BAREBOX_CMD_HELP_OPT  ("-p <str>",  "product string\n")
-BAREBOX_CMD_HELP_OPT  ("-V <id>",   "vendor id\n")
-BAREBOX_CMD_HELP_OPT  ("-P <id>",   "product id\n")
-BAREBOX_CMD_HELP_OPT  ("-a",   "CDC ACM (default)\n")
+BAREBOX_CMD_HELP_TEXT("Enable / disable a serial gadget on the USB device interface.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-m STR",  "Manufacturer string (barebox)")
+BAREBOX_CMD_HELP_OPT ("-p STR",  "product string")
+BAREBOX_CMD_HELP_OPT ("-V ID",   "vendor id")
+BAREBOX_CMD_HELP_OPT ("-P ID",   "product id")
+BAREBOX_CMD_HELP_OPT ("-a",   "CDC ACM (default)")
 #ifdef HAVE_OBEX
-BAREBOX_CMD_HELP_OPT  ("-o",   "CDC OBEX\n")
+BAREBOX_CMD_HELP_OPT ("-o",   "CDC OBEX")
 #endif
-BAREBOX_CMD_HELP_OPT  ("-s",   "Generic Serial\n")
-BAREBOX_CMD_HELP_OPT  ("-d",   "Disable the serial gadget\n")
+BAREBOX_CMD_HELP_OPT ("-s",   "Generic Serial")
+BAREBOX_CMD_HELP_OPT ("-d",   "Disable the serial gadget")
 BAREBOX_CMD_HELP_END
 
 /**
@@ -97,7 +98,12 @@ BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(usbserial)
 	.cmd		= do_usbserial,
-	.usage		= "Serial gadget enable/disable",
+	BAREBOX_CMD_DESC("serial gadget enable/disable")
+	BAREBOX_CMD_OPTS("[-mpVPa"
+#ifdef HAVE_OBEX
+					  "o"
+#endif
+					  "sd] <description>")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_usbserial_help)
 BAREBOX_CMD_END
diff --git a/commands/version.c b/commands/version.c
index e2f0f5f..898c719 100644
--- a/commands/version.c
+++ b/commands/version.c
@@ -29,7 +29,7 @@ static int do_version(int argc, char *argv[])
 
 BAREBOX_CMD_START(version)
 	.cmd		= do_version,
-	.usage		= "print monitor version",
+	BAREBOX_CMD_DESC("print barebox version")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
diff --git a/commands/wd.c b/commands/wd.c
index bc5587f..26823f8 100644
--- a/commands/wd.c
+++ b/commands/wd.c
@@ -55,15 +55,15 @@ static int do_wd(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(wd)
-BAREBOX_CMD_HELP_USAGE("wd [<time>]\n")
-BAREBOX_CMD_HELP_SHORT("enable the watchdog to bark in <time> seconds. "
-		"When <time> is 0, the watchdog gets disabled,\n"
-		"without a parameter the watchdog will be re-triggered\n")
+BAREBOX_CMD_HELP_TEXT("Enable the watchdog to bark in TIME seconds.")
+BAREBOX_CMD_HELP_TEXT("When TIME is 0, the watchdog gets disabled,")
+BAREBOX_CMD_HELP_TEXT("Without a parameter the watchdog will be re-triggered.")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(wd)
 	.cmd = do_wd,
-	.usage = "enable/disable/trigger the watchdog",
+	BAREBOX_CMD_DESC("enable/disable/trigger the watchdog")
+	BAREBOX_CMD_OPTS("[TIME]")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_wd_help)
 BAREBOX_CMD_END
diff --git a/common/command.c b/common/command.c
index 7f2b777..61191c2 100644
--- a/common/command.c
+++ b/common/command.c
@@ -36,22 +36,18 @@ EXPORT_SYMBOL(command_list);
 
 void barebox_cmd_usage(struct command *cmdtp)
 {
-#ifdef	CONFIG_LONGHELP
-		/* found - print (long) help info */
-		if (cmdtp->help) {
-			puts (cmdtp->help);
-		} else {
-			puts (cmdtp->name);
-			putchar (' ');
-			puts ("- No help available.\n");
-		}
-		putchar ('\n');
-#else	/* no long help available */
-		if (cmdtp->usage) {
-			puts (cmdtp->usage);
-			puts("\n");
-		}
-#endif	/* CONFIG_LONGHELP */
+	putchar('\n');
+	if (cmdtp->desc)
+		printf("%s - %s\n\n", cmdtp->name, cmdtp->desc);
+	if (cmdtp->opts)
+		printf("Usage: %s %s\n\n", cmdtp->name, cmdtp->opts);
+#ifdef CONFIG_LONGHELP
+	/* found - print (long) help info */
+	if (cmdtp->help) {
+		puts(cmdtp->help);
+		putchar('\n');
+	}
+#endif
 }
 EXPORT_SYMBOL(barebox_cmd_usage);
 
@@ -108,14 +104,13 @@ int register_command(struct command *cmd)
 	if (cmd->aliases) {
 		char **aliases = (char**)cmd->aliases;
 		while(*aliases) {
-			char *usage = "alias for ";
 			struct command *c = xzalloc(sizeof(struct command));
 
 			memcpy(c, cmd, sizeof(struct command));
 
 			c->name = *aliases;
-			c->usage = xmalloc(strlen(usage) + strlen(cmd->name) + 1);
-			sprintf((char*)c->usage, "%s%s", usage, cmd->name);
+			c->desc = cmd->desc;
+			c->opts = cmd->opts;
 
 			c->aliases = NULL;
 
@@ -163,4 +158,3 @@ static int init_command_list(void)
 }
 
 late_initcall(init_command_list);
-
diff --git a/common/hush.c b/common/hush.c
index 5893c51..92f9576 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1932,16 +1932,11 @@ static int do_sh(int argc, char *argv[])
 	return execute_script(argv[1], argc - 1, argv + 1);
 }
 
-static const __maybe_unused char cmd_sh_help[] =
-"Usage: sh filename [arguments]\n"
-"\n"
-"Execute a shell script\n";
-
 BAREBOX_CMD_START(sh)
 	.cmd		= do_sh,
-	.usage		= "run shell script",
+	BAREBOX_CMD_DESC("execute a shell script")
+	BAREBOX_CMD_OPTS("FILE [ARGUMENT...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
-	BAREBOX_CMD_HELP(cmd_sh_help)
 BAREBOX_CMD_END
 
 static int do_source(int argc, char *argv[])
@@ -1969,21 +1964,16 @@ static int do_source(int argc, char *argv[])
 
 static const char *source_aliases[] = { ".", NULL};
 
-static const __maybe_unused char cmd_source_help[] =
-"Usage: .  filename [arguments]\n"
-"or     source filename [arguments]\n"
-"\n"
-"Read  and  execute  commands  from filename in the current shell\n"
-"environment and return the exit status of the last command  exe-\n"
-"cuted from filename\n";
-
-static const __maybe_unused char cmd_source_usage[] =
-"execute shell script in current shell environment";
+BAREBOX_CMD_HELP_START(source)
+BAREBOX_CMD_HELP_TEXT("Read and execute commands from FILE in the current shell environment.")
+BAREBOX_CMD_HELP_TEXT("and return the exit status of the last command executed.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(source)
 	.aliases	= source_aliases,
 	.cmd		= do_source,
-	.usage		= cmd_source_usage,
+	BAREBOX_CMD_DESC("execute shell script in current shell environment")
+	BAREBOX_CMD_OPTS("FILE [ARGUMENT...]")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_source_help)
 BAREBOX_CMD_END
@@ -1997,32 +1987,31 @@ static int do_dummy_command(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_exit_help[] =
-"Usage: exit [n]\n"
-"\n"
-"exit script with a status of n. If n is omitted, the exit status is that\n"
-"of the last command executed\n";
+BAREBOX_CMD_HELP_START(exit)
+BAREBOX_CMD_HELP_TEXT("Exit script with status ERRLVL n. If ERRLVL is omitted, the exit status is")
+BAREBOX_CMD_HELP_TEXT("of the last command executed")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(exit)
 	.cmd		= do_dummy_command,
-	.usage		= "exit script",
+	BAREBOX_CMD_DESC("exit script")
+	BAREBOX_CMD_OPTS("[ERRLVL]")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_exit_help)
 BAREBOX_CMD_END
 
 #ifdef CONFIG_HUSH_GETOPT
-static const __maybe_unused char cmd_getopt_help[] =
-"Usage: getopt <optstring> <var>\n"
-"\n"
-"hush option parser. <optstring> is a string with valid options. Add\n"
-"a colon to an options if this option has a required argument or two\n"
-"colons for an optional argument. The current option is saved in <var>,\n"
-"arguments are saved in OPTARG. After this command additional nonopts\n"
-"can be accessed starting from $1\n";
+BAREBOX_CMD_HELP_START(getopt)
+BAREBOX_CMD_HELP_TEXT("OPTSTRING contains the option letters. Add a colon to an options if this")
+BAREBOX_CMD_HELP_TEXT("option has a required argument or two colons for an optional argument. The")
+BAREBOX_CMD_HELP_TEXT("current option is saved in VAR, arguments are saved in $OPTARG. Any")
+BAREBOX_CMD_HELP_TEXT("non-option arguments can be accessed starting from $1.")
+BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(getopt)
 	.cmd		= do_dummy_command,
-	.usage		= "getopt <optstring> <var>",
+	BAREBOX_CMD_DESC("parse option arguments")
+	BAREBOX_CMD_OPTS("OPTSTRING VAR")
 	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
 	BAREBOX_CMD_HELP(cmd_getopt_help)
 BAREBOX_CMD_END
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 2068a1e..54ec5a6 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -340,16 +340,10 @@ static int do_gpiolib(int argc, char *argv[])
 	return 0;
 }
 
-BAREBOX_CMD_HELP_START(gpiolib)
-BAREBOX_CMD_HELP_USAGE("gpiolib\n")
-BAREBOX_CMD_HELP_SHORT("dump current registered gpio\n");
-BAREBOX_CMD_HELP_END
-
 BAREBOX_CMD_START(gpiolib)
 	.cmd		= do_gpiolib,
-	.usage		= "dump current registered gpio",
+	BAREBOX_CMD_DESC("list registered GPIOs")
 	BAREBOX_CMD_GROUP(CMD_GRP_INFO)
-	BAREBOX_CMD_HELP(cmd_gpiolib_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
 BAREBOX_CMD_END
 #endif
diff --git a/drivers/mtd/nand/nand_imx_bbm.c b/drivers/mtd/nand/nand_imx_bbm.c
index 670a5e1..e9ce3b1 100644
--- a/drivers/mtd/nand/nand_imx_bbm.c
+++ b/drivers/mtd/nand/nand_imx_bbm.c
@@ -213,12 +213,9 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_imx_nand_bbm_help[] =
-"Usage: imx_nand_bbm\n";
-
 BAREBOX_CMD_START(imx_nand_bbm)
 	.cmd		= do_imx_nand_bbm,
-	.usage		= "create bbt for i.MX NAND",
+	BAREBOX_CMD_DESC("create BBT for i.MX NAND")
 	BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
 	BAREBOX_CMD_HELP(cmd_imx_nand_bbm_help)
 BAREBOX_CMD_END
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index 883d7dd..bee037b 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -638,14 +638,11 @@ static int do_nand_boot_test(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_nand_boot_test_help[] =
-"Usage: nand_boot_test <dest> <size>\n";
-
 BAREBOX_CMD_START(nand_boot_test)
 	.cmd		= do_nand_boot_test,
-	.usage		= "load an image from NAND",
+	BAREBOX_CMD_DESC("load an image from NAND")
+	BAREBOX_CMD_OPTS("DEST SIZE")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
-	BAREBOX_CMD_HELP(cmd_nand_boot_test_help)
 BAREBOX_CMD_END
 #endif
 
diff --git a/include/command.h b/include/command.h
index 15ce8d4..e5b7788 100644
--- a/include/command.h
+++ b/include/command.h
@@ -47,7 +47,8 @@ struct command {
 					/* Implementation function	*/
 	int		(*cmd)(int, char *[]);
 	int		(*complete)(struct string_list *sl, char *instr);
-	const char	*usage;		/* Usage message	(short)	*/
+	const char	*desc;		/* Short command description, start with lowercase */
+	const char	*opts;		/* command options */
 
 	struct list_head list;		/* List of commands		*/
 	uint32_t	group;
@@ -110,10 +111,8 @@ const struct command __barebox_cmd_##_name						\
 #define BAREBOX_CMD_HELP_START(_name) \
 static const __maybe_unused char cmd_##_name##_help[] =
 
-#define BAREBOX_CMD_HELP_USAGE(_name) "Usage: " _name
-#define BAREBOX_CMD_HELP_SHORT(_text) _text
-#define BAREBOX_CMD_HELP_OPT(_opt, _desc) _opt "\t" _desc
-#define BAREBOX_CMD_HELP_TEXT(_text) _text
+#define BAREBOX_CMD_HELP_OPT(_opt, _desc) "\t" _opt "\t" _desc "\n"
+#define BAREBOX_CMD_HELP_TEXT(_text) _text "\n"
 #define BAREBOX_CMD_HELP_END ;
 
 #ifdef CONFIG_LONGHELP
@@ -124,6 +123,10 @@ static const __maybe_unused char cmd_##_name##_help[] =
 
 #define BAREBOX_CMD_GROUP(grp)	.group = grp,
 
+#define BAREBOX_CMD_DESC(text)	.desc = text,
+
+#define BAREBOX_CMD_OPTS(text)	.opts = text,
+
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
 int register_command(struct command *);
diff --git a/net/dhcp.c b/net/dhcp.c
index 71d86d6..070e3bc 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -790,32 +790,19 @@ out:
 }
 
 BAREBOX_CMD_HELP_START(dhcp)
-BAREBOX_CMD_HELP_USAGE("dhcp [OPTIONS]\n")
-BAREBOX_CMD_HELP_SHORT("Invoke dhcp client to obtain ip/boot params.\n")
-BAREBOX_CMD_HELP_OPT  ("-H <hostname>",
-"Hostname to send to the DHCP server\n")
-BAREBOX_CMD_HELP_OPT  ("-v <vendor_id>",
-"DHCP Vendor ID (code 60) submitted in DHCP requests. It can\n"
-"be used in the DHCP server's configuration to select options\n"
-"(e.g. bootfile or server) which are valid for barebox clients only.\n")
-BAREBOX_CMD_HELP_OPT  ("-c <client_id>",
-"DHCP Client ID (code 61) submitted in DHCP requests. It can\n"
-"be used in the DHCP server's configuration to select options\n"
-"(e.g. bootfile or server) which are valid for barebox clients only.\n")
-BAREBOX_CMD_HELP_OPT  ("-u <client_uuid>",
-"DHCP Client UUID (code 97) submitted in DHCP requests. It can\n"
-"be used in the DHCP server's configuration to select options\n"
-"(e.g. bootfile or server) which are valid for barebox clients only.\n")
-BAREBOX_CMD_HELP_OPT  ("-U <user_class>",
-"DHCP User class (code 77) submitted in DHCP requests. It can\n"
-"be used in the DHCP server's configuration to select options\n"
-"(e.g. bootfile or server) which are valid for barebox clients only.\n")
-BAREBOX_CMD_HELP_OPT  ("-r <retry>", "retry limit by default "__stringify(DHCP_DEFAULT_RETRY)"\n");
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-H HOSTNAME", "hostname to send to the DHCP server")
+BAREBOX_CMD_HELP_OPT ("-v ID\t", "DHCP Vendor ID (code 60) submitted in DHCP requests")
+BAREBOX_CMD_HELP_OPT ("-c ID\t", "DHCP Client ID (code 61) submitted in DHCP requests")
+BAREBOX_CMD_HELP_OPT ("-u UUID\t", "DHCP Client UUID (code 97) submitted in DHCP requests")
+BAREBOX_CMD_HELP_OPT ("-U CLASS", "DHCP User class (code 77) submitted in DHCP requests")
+BAREBOX_CMD_HELP_OPT ("-r RETRY", "retry limit (default "__stringify(DHCP_DEFAULT_RETRY)")");
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(dhcp)
 	.cmd		= do_dhcp,
-	.usage		= "invoke dhcp client to obtain ip/boot params",
+	BAREBOX_CMD_DESC("DHCP client to obtain IP or boot params")
+	BAREBOX_CMD_OPTS("[-HvcuUr]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_dhcp_help)
 	BAREBOX_CMD_COMPLETE(empty_complete)
diff --git a/net/dns.c b/net/dns.c
index 847458b..4506baf 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -260,13 +260,10 @@ static int do_host(int argc, char *argv[])
 	return 0;
 }
 
-static const __maybe_unused char cmd_host_help[] =
-"Usage: host <hostname>\n";
-
 BAREBOX_CMD_START(host)
 	.cmd		= do_host,
-	.usage		= "resolve a hostname",
+	BAREBOX_CMD_DESC("resolve a hostname")
+	BAREBOX_CMD_OPTS("HOSTNAME")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
-	BAREBOX_CMD_HELP(cmd_host_help)
 BAREBOX_CMD_END
 
diff --git a/net/ifup.c b/net/ifup.c
index 7bb273b..2315952 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -171,14 +171,20 @@ static int do_ifup(int argc, char *argv[])
 }
 
 BAREBOX_CMD_HELP_START(ifup)
-BAREBOX_CMD_HELP_USAGE("ifup [OPTIONS] <interface>\n")
-BAREBOX_CMD_HELP_OPT  ("-a",  "bring up all interfaces\n")
-BAREBOX_CMD_HELP_OPT  ("-f",  "Force. Configure even if ip already set\n")
+BAREBOX_CMD_HELP_TEXT("Each INTF must have a script /env/network/INTF that set the variables")
+BAREBOX_CMD_HELP_TEXT("ip (to 'static' or 'dynamic'), ipaddr, netmask, gateway, serverip and/or")
+BAREBOX_CMD_HELP_TEXT("ethaddr. A script /env/network/INTF-discover can contains for discovering")
+BAREBOX_CMD_HELP_TEXT("the ethernet device, e.g. 'usb'.")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-a",  "bring up all interfaces")
+BAREBOX_CMD_HELP_OPT ("-f",  "Force. Configure even if ip already set")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(ifup)
 	.cmd		= do_ifup,
-	.usage		= "Bring up network interfaces",
+	BAREBOX_CMD_DESC("bring a network interface up")
+	BAREBOX_CMD_OPTS("[-af] [INTF]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 	BAREBOX_CMD_HELP(cmd_ifup_help)
 BAREBOX_CMD_END
diff --git a/net/nfs.c b/net/nfs.c
index 94260b9..2753330 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -725,14 +725,10 @@ err_udp:
 	return nfs_err == 0 ? 0 : 1;
 }
 
-static const __maybe_unused char cmd_nfs_help[] =
-"Usage: nfs <file> [localfile]\n"
-"Load a file via network using nfs protocol.\n";
-
 BAREBOX_CMD_START(nfs)
 	.cmd		= do_nfs,
-	.usage		= "boot image via network using nfs protocol",
+	BAREBOX_CMD_DESC("boot image over NFS")
+	BAREBOX_CMD_OPTS("FILE [LOCALFILE]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
-	BAREBOX_CMD_HELP(cmd_nfs_help)
 BAREBOX_CMD_END
 
diff --git a/net/ping.c b/net/ping.c
index 15cd692..2349f4b 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -117,6 +117,7 @@ out:
 
 BAREBOX_CMD_START(ping)
 	.cmd		= do_ping,
-	.usage		= "ping <destination>",
+	BAREBOX_CMD_DESC("send ICMP echo requests")
+	BAREBOX_CMD_OPTS("DESTINATION")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 03/19] commands: harmonize in-barebox docs with Kconfig docs
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
  2014-05-13  8:28 ` [PATCH 01/19] commands: group 'help' output Holger Schurig
  2014-05-13  8:28 ` [PATCH 02/19] commands: harmonize in-barebox documentation Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 04/19] commands: CMD_MEMORY -> COMPILE_MEMORY Holger Schurig
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 commands/Kconfig | 2036 +++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 1495 insertions(+), 541 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 3ef8860..fb9a036 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -12,311 +12,1218 @@ config HAS_POWEROFF
 
 if COMMAND_SUPPORT
 
-menu "commands"
+menu "Commands"
 
-menu "scripting"
 
-config CMD_EDIT
+
+
+menu "Information"
+
+config CMD_DEVINFO
+	tristate
+	default y
+	prompt "devinfo"
+	help
+	  Show information about devices and drivers.
+
+	  devinfo [DEVICE]
+
+	  If called without arguments, devinfo shows a summary of the known
+	  devices and drivers.
+
+	  If called with a device path being the argument, devinfo shows more
+	  default information about this device and its parameters.
+
+config CMD_HELP
+	tristate
+	default y
+	prompt "help"
+	help
+	  Without arguments, lists all all commands. With an argument, print help
+	  about the specified command. If the argument is 'all', then output help
+	  for all commands.
+
+	  Options:
+	  	-a	output help on all commands
+	  	-v	verbose
+
+config CMD_IOMEM
+	tristate
+	prompt "iomem and ioport"
+	help
+	  Show information about iomem/ioport usage. Pendant to
+	  'cat /proc/iomem' and 'cat /proc/ioports' under Linux.
+
+config CMD_MEMINFO
+	tristate
+	prompt "meminfo"
+	help
+	  Print info about barebox' memory allocation. Example:
+
+	  max system bytes =     282616
+	  system bytes     =     282616
+	  in use bytes     =     274752
+
+config CMD_REGINFO
+	depends on HAS_REGINFO
+	select REGINFO
+	tristate
+	prompt "reginfo"
+	help
+	  Print register information.
+
+config CMD_REGULATOR
+	bool
+	depends on REGULATOR
+	prompt "regulator command"
+	help
+	  the regulator command lists the currently registered regulators and
+	  their current state.
+
+config CMD_VERSION
+	tristate
+	default y
+	depends on BANNER
+	prompt "version"
+	help
+	  Pring barebox version. Example:
+
+	  barebox 2014.05.0-00142-gb289373 #177 Mon May 12 20:35:55 CEST 2014
+
+# end Information commands
+endmenu
+
+
+
+
+menu "Boot"
+
+# TODO: isn't a command
+config FLEXIBLE_BOOTARGS
+	bool
+	prompt "flexible Linux bootargs generation"
+	depends on CMD_GLOBAL
+	help
+	  Select this to get a more flexible bootargs generation. With this
+	  option the bootargs are concatenated together from global variables
+	  beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.'
+	  This allows for more flexible scripting since with it it's possible
+	  to replace parts of the bootargs string without reconstructing it
+	  completely.
+
+config CMD_BOOT
+	tristate
+	select BOOTM
+	prompt "boot"
+	help
+	  Select this for booting based on scripts. Unlike the bootm command which
+	  can boot a single image this command offers the possibility to boot with
+	  scripts (by default placed under /env/boot/). This command iterates over
+	  multiple scripts until one succeeds.
+
+	  Usage: boot [-vdlmt] [BOOTSRC...]
+
+	  BOOTSRC can be:
+	  - a filename under /env/boot/
+	  - a full path to a boot script
+	  - a device name
+	  - a partition name under /dev/
+	  - a full path to a directory which
+   	  -- contains boot scripts, or
+   	  -- contains a loader/entries/ directory containing bootspec entries
+
+	  Multiple bootsources may be given which are probed in order until
+	  one succeeds.
+
+	  Options:
+		  -v	Increase verbosity
+		  -d	Dryrun. See what happens but do no actually boot
+		  -l	List available boot sources
+		  -m	Show a menu with boot options
+		  -t SECS	specify timeout in SECS
+
+config CMD_BOOTM
+	tristate
+	default y
+	select BOOTM
+	select CRC32
+	select UIMAGE
+	select UNCOMPRESS
+	select FILETYPE
+	select GLOBALVAR
+	prompt "bootm"
+	help
+	  Boot an application image
+
+	  Usage: bootm [-cdaeo] IMAGE
+
+	  Options:
+		  -c	crc check uImage data
+		  -d	dryrun. Check data, but do not run
+		  -a ADDR	specify os load address
+		  -e OFFS	entry point to the image relative to start (0)
+		  -o DTS	specify device tree
+
+
+config CMD_BOOTM_SHOW_TYPE
+	bool
+	depends on CMD_BOOTM
+	prompt "show image information"
+	help
+	  Displays some tags from the uImage:
+
+	  - OS type
+	  - architecture,
+	  - type
+	  - compression method.
+
+config CMD_BOOTM_VERBOSE
+	bool
+	prompt "verbose support"
+	depends on CMD_BOOTM
+	help
+	  Adds the verbose (-v switch) command line option.
+
+config CMD_BOOTM_INITRD
+	bool
+	prompt "initial RAM disk (initrd) support"
+	depends on CMD_BOOTM
+	help
+	  Adds support for initial RAM disk and this two command line options:
+
+	  -r INITRD  specify an initrd image
+	  -L ADDR    specify initrd load address
+
+config CMD_BOOTM_OFTREE
+	bool
+	depends on CMD_BOOTM
+	select OFTREE
+	prompt "device tree (oftree) support"
+	help
+	  Add support to pass a device tree (a.k.a Open Firmware Tree, oftree). Adds
+	  this command line option:
+
+	  -o DTS  specify device tre
+
+config CMD_BOOTM_OFTREE_UIMAGE
+	bool
+	prompt "support passing device tree (oftree) uImages"
+	depends on CMD_BOOTM_OFTREE
+	help
+	  Support using oftree uImages. Without this only raw oftree
+	  blobs can be used.
+
+config CMD_BOOTM_AIMAGE
+	bool
+	prompt "Android image support"
+	depends on CMD_BOOTM && ARM
+	help
+	  Support using Android Images.
+
+config CMD_BOOTU
+	tristate
+	default y
+	depends on ARM
+	prompt "bootu"
+	help
+	  Boot into already loaded Linux kernel, which must be raw (uncompressed).
+
+	  Usage: bootu ADDRESS
+
+config CMD_BOOTZ
+	tristate
+	depends on ARM
+	prompt "bootz"
+	help
+	  Boot Linux zImage
+
+	  Usage: bootz FILE
+
+config CMD_LINUX16
+	tristate
+	depends on X86
+	default y if X86
+	prompt "linux16"
+	help
+	  Usage: linux16 [-v VESAMODE] FILE
+
+	  Load kernel from FILE and boot on x86 in real-mode.
+
+	  Only kernel images in bzImage format are supported by now.
+
+	  For the video mode refer the Linux kernel documentation
+	  'Documentation/fb/vesafb.txt' for correct VESA mode numbers. Use 'ask'
+	  instead of a number to make Linux prompt for options.
+
+	  Options:
+	  -v VESAMODE   set VESAMODE
+
+
+config CMD_GO
+	tristate
+	prompt "go"
+	help
+	  Start application at address or file
+
+	  Usage: go ADDR [ARG...]
+
+	  Start application at ADDR passing ARG as arguments.
+
+	  If addr does not start with a digit it is interpreted as a filename
+	  in which case the file is memmapped and executed
+
+config CMD_LOADB
+	depends on !CONSOLE_NONE
+	select CRC16
+	tristate
+	prompt "loadb"
+	help
+	  Load binary file over serial line (Kermit)
+
+	  Usage: loadb  FILE
+
+	  Options:
+		  -f FILE	download to FILE (default image.bin)
+		  -o OFFS	destination file OFFSet (default 0)
+		  -b BAUD	baudrate for download (default: console baudrate
+		  -c	create file if not present
+
+config CMD_LOADS
+	depends on !CONSOLE_NONE
+	tristate
+	prompt "loads"
+	help
+	  Loads - load binary file over serial line (S-Records)
+
+	  Usage: loads OFFS
+
+	  Load S-Record file over serial line with offset OFFS.
+
+config CMD_LOADY
+	select CRC16
+	select XYMODEM
+	depends on !CONSOLE_NONE
+	tristate
+	prompt "loady"
+	help
+	  Adds the loadx and loady commands:
+
+	  loadx - load binary file over serial line (X-Modem)
+
+	  Usage: loadx [-fptbc]
+
+	  Options:
+		  -f FILE	download to FILE (default image.bin)
+		  -o OFFS	destination file OFFSet (default 0)
+		  -b BAUD	baudrate for download (default: console baudrate
+		  -t NAME	console name to use (default: current)
+		  -c	create file if not present
+
+
+	  loady - load binary file over serial line (Y-Modem)
+
+	  Usage: loady [-gtb]
+
+	  Options:
+		  -g	use Y-Modem/G (use on lossless tty such as USB)
+		  -b BAUD	baudrate for download (default: console baudrate
+		  -t NAME	console name to use (default: current)
+
+
+config CMD_RESET
+	tristate
+	prompt "reset"
+	help
+	  Perform RESET of the CPU
+
+	  Usage: reset [-f]
+
+	  Options:
+		  -f	force RESET, don't call shutdown
+
+config CMD_SAVES
+	tristate
+	depends on CMD_LOADS
+	prompt "saves"
+	help
+	  Save file over serial line (S-Records)
+
+	  Usage: saves OFFS LEN
+
+	  Save S-Record file to serial line with offset OFFS and length LEN.
+
+config CMD_UIMAGE
+	select UIMAGE
+	tristate
+	prompt "uimage"
+	help
+	  Show information about uImage and also extract and verify uImages.
+
+	  Usage: uimage [-vien] FILE
+
+	  Options:
+		  -i		show information about image
+		  -v		verify image
+		  -e OUTFILE	extract image to OUTFILE
+		  -n NO		use image number NO in multifile image
+
+# end Boot commands
+endmenu
+
+
+
+
+menu "Partition"
+
+config CMD_PARTITION
+	tristate
+	prompt "addpart and delpart"
+	help
+	  addpart - add a partition description to a device
+
+	  Usage: addpart [-n] DEVICE PART
+
+	  The size and the offset can be given in decimal (without any prefix) and
+	  in hex (prefixed with 0x). Both can have an optional suffix K, M or G.
+	  The size of the last partition can be specified as '-' for the remaining
+	  space on the device.  This format is the same as used by the Linux
+	  kernel or cmdline mtd partitions.
+
+	  Options:
+		  -n	do not use the device name as prefix of the partition name
+		  DEVICE	device being worked on
+		  PART	SIZE1[@OFFSET1](NAME1)[RO],SIZE2[@OFFSET2](NAME2)[RO],...
+
+
+	  delpart - delete partition(s)
+
+	  Usage: delpart PART...
+
+	  Delete partitions previously added to a device with addpart.
+
+config CMD_AUTOMOUNT
+	tristate
+	select FS_AUTOMOUNT
+	prompt "automount"
+	help
+	  Automount allows o automatically execute a script when a certain
+	  directory is accessed for the first time. The script should then make
+	  this directory available (discover USB devices, bring network interface
+	  up and finally mount the filesystem).
+
+	  Usage: automount [-ldr] PATH [COMMAND]
+
+	  Options:
+		  -l	list registered automount-points
+		  -d	create the mount directory
+		  -r	remove an automountpoint
+
+config CMD_MOUNT
+	tristate
+	default y
+	prompt "mount"
+	help
+	  Mount a filesystem or list mounted filesystems
+
+	  Usage: mount [[-atov] [DEVICE] [MOUNTPOINT]]
+
+	  If no argument is given, list mounted filesystems.
+	  If no FSTYPE is specified, try to detect it automatically.
+	  With -a the mount command mounts all block devices whose filesystem
+	  can be detected automatically to /mnt/PARTNAME
+	  If mountpoint is not given, a standard mountpoint of /mnt/DEVICE
+	  is used. This directoy is created automatically if necessary.
+
+	  Options:
+		  -a		mount all blockdevices
+		  -t FSTYPE	specify filesystem type
+		  -o OPTIONS	set file system OPTIONS
+		  -v		verbose
+
+config CMD_UBI
+	tristate
+	default y if MTD_UBI
+	depends on MTD_UBI
+	prompt "ubiattach, ubimkvol and ubirmvol"
+	help
+	  ubiattach - attach mtd device to UBI
+
+	  Usage: ubiattach [-O] MTDDEV
+
+	  Options:
+		  -O OFFS	VID header offset
+
+
+	  ubimkvol - create an UBI volume
+
+	  Usage: ubimkvol UBIDEV NAME SIZE
+
+	  Create an UBI volume on UBIDEV with NAME and SIZE.
+	  If SIZE is 0 all available space is used for the volume.
+
+
+	  ubirmvol - delete an UBI volume
+
+	  Usage: ubirmvol UBIDEV NAME
+
+	  Delete UBI volume NAME from UBIDEV
+
+
+config CMD_UBIFORMAT
+	tristate
+	depends on MTD_UBI
+	select LIBMTD
+	select LIBSCAN
+	select LIBUBIGEN
+	prompt "ubiformat"
+
+config CMD_UMOUNT
+	tristate
+	default y
+	prompt "umount"
+	help
+	  Usage: umount MOUNTPOINT
+
+	  Unmount a filesystem mounted on a specific MOINTPOINT
+
+# end Partition commands
+endmenu
+
+
+
+menu "Environment"
+
+config CMD_EXPORT
+	depends on ENVIRONMENT_VARIABLES
+	tristate
+	prompt "export"
+	help
+	  Export environment variables
+
+	  Usage: export VAR[=VALUE]
+
+	  Export an environment variable to subsequently executed scripts.
+
+config CMD_GLOBAL
+	select GLOBALVAR
+	tristate
+	prompt "global"
+	help
+	  Create or set global variables
+
+	  Usage: global [-r] VAR[=VALUE]
+
+	  Add a new global variable named VAR, optionally set to VALUE.
+
+	  Options:
+	  	-r	set value of all global variables beginning with 'match'
+
+config CMD_LOADENV
+	tristate
+	select ENV_HANDLING
+	prompt "loadenv"
+	help
+	  Load environment from ENVFS
+
+	  Usage: loadenv {-nsd] [ENVFS] [DIRECTORY]
+
+	  Load environment from files in ENVFS (default /dev/env0) in
+	  DIRECTORY (default /env
+
+	  Options:
+	  	-n	do not overwrite existing files
+	  	-s	scrub old environment
+	  	-d	load default environment
+
+config CMD_PRINTENV
+	tristate
+	depends on ENVIRONMENT_VARIABLES
+	prompt "printenv"
+	help
+	  Print value of environment variables
+
+	  Usage: printenv [VARIABLE]
+
+	  If an argument is given, printenv prints the content of an environment
+	  variable to the terminal. If no argument is specified, all variables are
+	  printed.
+
+config CMD_MAGICVAR
+	tristate
+	prompt "magicvar"
+	help
+	  Barebox has some shell variables with special meanings. This
+	  command shows the available magic variables.
+
+config CMD_MAGICVAR_HELP
+	bool
+	prompt "display description"
+	depends on CMD_MAGICVAR
+	help
+	  Also display a description to the magic variables
+
+config CMD_SAVEENV
+	tristate
+	select ENV_HANDLING
+	prompt "saveenv"
+	help
+	  Save environment to persistent storage
+
+	  Usage: saveenv [ENVFS] [DIRECTORY]
+
+	  Save the files in DIRECTORY to the persistent storage device ENVFS.
+
+	  ENVFS is usually a block in flash but can be any other file. If
+	  omitted, DIRECTORY defaults to /env and ENVFS defaults to
+	  /dev/env0. Note that envfs can only handle files, directories are being
+	  skipped silently.
+
+# end Environment commands
+endmenu
+
+
+
+
+menu "File"
+
+config CMD_DIGEST
+	tristate
+	select DIGEST
+	help
+	  TODO This is actually not a command, but turns on digest.c compilation.
+
+config CMD_BASENAME
+	tristate
+	prompt "basename"
+	help
+	  Usage: basename PATH VAR
+
+	  Remove directory and suffix from the PATH and store result into variable VAR.
+
+config CMD_CAT
+	tristate
+	default y
+	prompt "cat"
+	help
+	  Concatenate file(s) to stdout
+
+	  Usage: cat FILE...
+
+	  Currently only printable characters and NL, TAB are printed.
+
+config CMD_CD
+	tristate
+	default y
+	prompt "cd"
+	help
+	  Change working directory
+
+	  Usage: cd DIRECTORY
+
+	  If called without an argument, change to the root directory '/'.
+
+config CMD_CP
+	tristate
+	default y
+	prompt "cp"
+	help
+	  Copy files
+
+	  Usage: cp [-v] SRC DEST
+
+	  Copy file from SRC to DEST.
+
+	  Options:
+		  -v	verbose
+
+config CMD_DIRNAME
+	tristate
+	prompt "dirname"
+	help
+	  Strip last component of file name and store the result in a
+	  environment variable
+
+config CMD_FILETYPE
+	tristate
+	select FILETYPE
+	prompt "filetype"
+	help
+Detect file type
+
+	  Usage: filetype [-vsl] FILE
+
+	  Detect type of a file and export result to a variable.
+
+	  Options:
+		  -v	verbose
+		  -s VAR	set variable VAR to shortname
+		  -l	list known filetypes
+
+	  Detected file types are registered at runtime, depending on
+	  what you have compiled into barebox. Example of "filetype -l":
+
+	  known filetypes:
+	  arm-zimage      : arm Linux zImage
+	  lzo             : lzo compressed
+	  lz4             : lz4 compressed
+	  arm-barebox     : arm barebox image
+	  u-boot          : U-Boot uImage
+	  ubi             : UBI image
+	  jffs2           : JFFS2 image
+	  gzip            : gzip compressed
+	  bzip2           : bzip2 compressed
+	  dtb             : open firmware flat device tree
+	  android         : Android boot image
+	  sh              : Bourne Shell
+	  mips-barebox    : MIPS barebox image
+	  fat             : FAT filesytem
+	  mbr             : MBR sector
+	  bmp             : BMP image
+	  png             : PNG image
+	  ext             : ext filesystem
+	  gpt             : GUID Partition Table
+	  bpk             : Binary PacKage
+	  bbenv           : barebox environment file
+
+config CMD_LN
+	tristate
+	prompt "ln"
+	help
+	  Create symlink (make a new name for a file)
+
+	  Usage: ln SRC DEST
+
+config CMD_LS
+	tristate
+	default y
+	prompt "ls"
+	help
+	  List a file or directory
+
+	  Usage: ls [-lCR] [FILEDIR...]
+
+	  List information about the specified files or directories.
+
+	  Options:
+		  -l	long format
+		  -C	column format (opposite of long format)
+		  -R	list subdirectories recursively
+
+config CMD_MD5SUM
+	tristate
+	select CMD_DIGEST
+	select MD5
+	prompt "md5sum"
+	help
+	  Usage: md5sum FILE|AREA...
+
+	  Calculate a MD5 digest over a FILE or a memory area.
+
+config CMD_MKDIR
+	tristate
+	default y
+	prompt "mkdir"
+	help
+	  Usage: mkdir [DIRECTORY ...]
+
+	  Create new directories
+
+	  Options:
+		  -p	make parent directories as needed
+
+config CMD_PWD
+	tristate
+	default y
+	prompt "pwd"
+	help
+	  Print working directory.
+
+config CMD_READLINK
+	tristate
+	prompt "readlink"
+	help
+	  Read value of a symbolic link
+
+	  Usage: readlink [-f] FILE VARIABLE
+
+	  Read value of a symbolic link and store it into VARIABLE.
+
+	  Options:
+		  -f	canonicalize by following first symlink
+
+config CMD_RM
+	tristate
+	default y
+	prompt "rm"
+	help
+	  Remove files
+
+	  Usage: rm [-r] FILES...
+
+	  Options:
+		  -r	remove directories and their contents recursively
+
+config CMD_RMDIR
+	tristate
+	default y
+	prompt "rmdir"
+	help
+	  Remove empty directory(s)
+
+	  Usage: rmdir DIRECTORY...
+
+	  Remove directories. The directories have to be empty.
+
+config CMD_SHA1SUM
+	tristate
+	select CMD_DIGEST
+	select SHA1
+	prompt "sha1sum"
+	help
+	  Calculate SHA1 digest
+
+	  Usage: sha1sum FILE|AREA
+
+	  Calculate a SHA1 digest over a FILE or a memory area.
+
+config CMD_SHA224SUM
 	tristate
-	prompt "edit"
+	select CMD_DIGEST
+	select SHA224
+	prompt "sha224sum"
+	help
+	  Calculate SHA224 digest
+
+	  Usage: sha224sum FILE|AREA
+
+	  Calculate a SHA224 digest over a FILE or a memory area.
+
+config CMD_SHA256SUM
+	tristate
+	select CMD_DIGEST
+	select SHA256
+	prompt "sha256sum"
+	help
+	  sha256sum - calculate SHA256 digest
+
+	  Usage: sha256sum FILE|AREA
+
+	  Calculate a SHA256 digest over a FILE or a memory area.
+
+config CMD_UNCOMPRESS
+	bool
+	select UNCOMPRESS
+	prompt "uncompress"
+	help
+	  Uncompress handles lzo, gzip and bzip2 compressed files
+	  depending on the compiled in compression libraries.
+
+	  Usage: uncompress INFILE OUTFILE
+
+# end File commands
+endmenu
+
+
+
+
+menu "Shell scripting"
 
 config CMD_EXEC
 	depends on !SHELL_HUSH
 	tristate
 	prompt "exec"
 
-config CMD_SLEEP
+config CMD_FALSE
 	tristate
-	prompt "sleep"
+	default y
+	prompt "false"
+	help
+	  Do nothing, unsuccessfully
+
+config CMD_LET
+	tristate
+	prompt "let"
+	help
+	  Evaluate arithmetic expressions
+
+	  Usage: let EXPR [EXPR ...]
+
+	  Supported operations are in order of decreasing precedence:
+		  X++, X--
+		  ++X, --X
+		  +X, -X
+		  !X, ~X
+		  X**Y
+		  X*Y, X/Y, X%Y
+		  X+Y, X-Y
+		  X<<Y, X>>Y
+		  X<Y, X<=Y, X>=Y, X>Y
+		  X==Y, X!=Y
+		  X&Y
+		  X^Y
+		  X|Y
+		  X&&Y
+		  X||Y
+		  X?Y:Z
+		  X*=Y, X/=Y, X%=Y
+		  X=Y, X&=Y, X|=Y, X^=Y, X+=Y, X-=Y, X<<=Y, X>>=Y
 
 config CMD_MSLEEP
 	tristate
 	prompt "msleep"
+	help
+	  Delay execution for n milli-seconds
 
-config CMD_SAVEENV
-	tristate
-	select ENV_HANDLING
-	prompt "saveenv"
+	  Usage: msleep MILLISECONDS
 
-config CMD_LOADENV
+config CMD_READF
 	tristate
-	select ENV_HANDLING
-	prompt "loadenv"
+	prompt "readf"
+	help
+	  Read file into variable
 
-config CMD_EXPORT
-	depends on ENVIRONMENT_VARIABLES
+	  Usage: readf FILE VAR
+
+	  Read a single line from FILE into a VARiable. Leading and trailing
+	  whitespaces are removed, nonvisible characters are stripped. Input is
+	  limited to 1024 characters.
+
+config CMD_SLEEP
 	tristate
-	prompt "export"
+	prompt "sleep"
+	help
+	  Delay execution for n seconds
 
-config CMD_PRINTENV
+	  Usage: sleep SECONDS
+
+config CMD_TEST
 	tristate
-	depends on ENVIRONMENT_VARIABLES
-	prompt "printenv"
+	depends on SHELL_HUSH
+	default y
+	prompt "test"
+	help
+	  Minimal test command like in /bin/sh
 
-config CMD_READLINE
+	  Usage: test [EXPR]
+
+	  Options:
+		  !, =, !=, -eq, -ne, -ge, -gt, -le, -lt, -o, -a, -z, -n, -d, -e,
+		  -f, -L; see 'man test' on your PC for more information.
+
+config CMD_TRUE
 	tristate
-	prompt "readline"
+	default y
+	prompt "true"
+	help
+	  Do nothing, successfully.
 
-config CMD_READF
+# end Scripting commands
+endmenu
+
+
+
+
+menu "Network"
+
+config CMD_MIITOOL
 	tristate
-	prompt "readf"
+	depends on PHYLIB
+	prompt "miitool"
 	help
-	  The readf command is used to read a files content into a shell variable.
+	  The miitool command allows to view media-independent interface status.
+	  The default short output reports the negotiated link speed and
+	  link status for selected MII. The '-v' option displays more
+	  detailed MII status information, such as MII capabilities,
+	  current advertising mode, and link partner capabilities.
 
-config CMD_LET
+config CMD_TFTP
+	depends on FS_TFTP
 	tristate
-	prompt "let"
+	prompt "tftp"
 	help
-	  the 'let' command is used for arithmetics. It works like the corresponding
-	  Unix shell command.
+	  Load (or save) a file using TFTP
 
-config CMD_TRUE
+	  Note that barebox can mount tftp as a filesystem. Therefore
+	  this 'tftp' command is only needed to preserve backward
+	  compatibility.
+
+	  Usage: tftp [-p] SOURCE [DEST]
+
+	  Load (or save) a file via TFTP.
+
+	  Options:
+		  -p	push to TFTP server
+
+# end Network commands
+endmenu
+
+
+
+
+menu "Console and Framebuffer interaction"
+
+config CMD_CLEAR
 	tristate
 	default y
-	prompt "true"
+	prompt "clear"
+	help
+	  Clear screen
 
-config CMD_FALSE
+	  Send ANSI ESC sequence to clear the screen.
+
+config CMD_ECHO
 	tristate
 	default y
-	prompt "false"
+	prompt "echo"
+	help
+	  Echo args to console
 
-config CMD_MENU
-	tristate
-	depends on MENU
-	prompt "menu"
+	  Usage: echo [-neao] STRING
 
-config CMD_MENU_MANAGEMENT
-	bool
-	depends on CMD_MENU
-	prompt "menu scripts management"
+	  Display a line of TEXT on the console.
 
-config CMD_MENUTREE
+	  Options:
+		  -n	do not output the trailing newline
+		  -a FILE	append to FILE instead of using stdout
+		  -o FILE	overwrite FILE instead of using stdout
+
+config CMD_ECHO_E
 	bool
-	depends on MENU
-	select MENUTREE
-	prompt "menutree"
+	depends on CMD_ECHO
+	select PROCESS_ESCAPE_SEQUENCE
+	prompt "support -e option to echo"
 	help
-	  The menutree command allows to create a menu from a directory structure
+	  Adds this command line option:
+	  -e	recognize escape sequences
+
+config CMD_EDIT
+	tristate
+	prompt "edit"
+	help
+	  A  small fill-screen editor.
+
+	  Usage: edit FILE
+
+	  Use cursor keys, Ctrl-C to exit and Ctrl-D to exit-with-save.
 
 config CMD_LOGIN
 	tristate
 	select PASSWORD
 	prompt "login"
+	help
+	  Ask for a password
 
-config CMD_PASSWD
-	tristate
-	select CMD_LOGIN
-	prompt "passwd"
+	  Usage: login [-t TIMEOUT] COMMAND
 
-if CMD_LOGIN || CMD_PASSWD
+	  Asks for a password from the console before script execution continues.
+	  The password can be set with the 'passwd' command. Instead of specifying
+	  a TIMEOUT the magic variable 'global.login.timeout' could be set.
 
-choice
-	prompt "passwd mode"
+	  Options:
+		  -t TIMEOUT	Execute COMMAND if no login withing TIMEOUT seconds
 
-config PASSWD_MODE_HIDE
-	bool "Hide"
+config CMD_MENU
+	tristate
+	depends on MENU
+	prompt "menu"
+	help
+	  Create and display menus
 
-config PASSWD_MODE_STAR
-	bool "Star"
+	  Manage Menu:
+  	  -m  menu
+  	  -l  list
+  	  -s  show
 
-config PASSWD_MODE_CLEAR
-	bool "Clear"
+	  Show menu:
+  	  (-A auto select delay)
+  	  (-d auto select description)
+  	  menu -s -m MENU [-A delay] [-d auto_display]
 
-endchoice
+	  List menu:
+  	  menu -l
 
-endif
+	  Menu example:
+	  menu -s -m boot
 
-config CMD_TIME
-	bool "time"
+config CMD_MENU_MANAGEMENT
+	bool
+	depends on CMD_MENU
+	prompt "menu scripts management"
 	help
-	  Just like the unix time command this command allows to measure the
-	  execution time of a command. Note: barebox does not use interrupts,
-	  so the system timer can overrun during the execution of the command
-	  resulting in incorrect results. The timer gets updated in the function
-	  checking for ctrl-c, so the time command can be used with commands
-	  which are interruptible with ctrl-c.
+	  Adds this options:
+  	  -e  menu entry
+  	  -a  add
+  	  -r  remove
+  	  -S  select
 
-config CMD_LINUX_EXEC
-	bool "linux exec"
-	depends on LINUX
-	help
-	  This command executes a command on the Linux host.
+	  Add a menu:
+  	  menu -a -m NAME -d DESC
 
-config CMD_GLOBAL
-	select GLOBALVAR
-	tristate
-	prompt "global"
-	help
-	  The global command allows to create global variables
+	  Remove a menu:
+  	  menu -r -m NAME
 
-endmenu
+	  Add an entry:
+  	  (-R for do no exit the menu after executing the command)
+  	  (-b for box style 1 for selected)
+  	  (and optional -c for the command to run when we change the state)
+  	  menu -e -a -m MENU -c COMMAND [-R] [-b 0|1] -d DESC
 
-menu "file commands"
+	  Add a submenu entry:
+  	  (-R is not needed)
+  	  (-b for box style 1 for selected)
+  	  (and -c is not needed)
+  	  menu -e -a -m MENU -u submenu -d [-b 0|1] DESC
 
-config CMD_LS
-	tristate
-	default y
-	prompt "ls"
+	  Remove an entry:
+  	  menu -e -r -m NAME -n ENTRY
 
-config CMD_RM
-	tristate
-	default y
-	prompt "rm"
+	  Select an entry:
+  	  menu -m <menu> -S -n ENTRY
 
-config CMD_CAT
-	tristate
-	default y
-	prompt "cat"
+	  List menu:
+  	  menu -e -l [menu]
 
-config CMD_MKDIR
-	tristate
-	default y
-	prompt "mkdir"
+	  Menu examples:
+  	  menu -a -m boot -d "Boot Menu"
+  	  menu -e -a -m boot -c boot -d "Boot"
+  	  menu -e -a -m boot -c reset -d "Reset"
 
-config CMD_RMDIR
-	tristate
-	default y
-	prompt "rmdir"
 
-config CMD_CP
-	tristate
-	default y
-	prompt "cp"
+config CMD_MENUTREE
+	bool
+	depends on MENU
+	select MENUTREE
+	prompt "menutree"
+	help
+	  Create menu from directory structure
 
-config CMD_PWD
-	tristate
-	default y
-	prompt "pwd"
+	  Usage: menutree [-m] DIR
 
-config CMD_CD
-	tristate
-	default y
-	prompt "cd"
+	  Each menu entry is described by a subdirectory. Each subdirectory
+	  can contain the following files which further describe the entry:
 
-config CMD_MOUNT
-	tristate
-	default y
-	prompt "mount"
+	  title  A file containing the title of the entry as shown in the menu
+	  box    If present, the entry is a 'bool' entry. The file contains a
+       	  name from which the current state of the bool is taken from and saved
+       	  to.
+	  action if present this file contains a shell script which is executed when
+       	  when the entry is selected.
 
-config CMD_UMOUNT
-	tristate
-	default y
-	prompt "umount"
+	  If neither 'box' or 'action' are present, this entry is considered a submenu
+	  containing more entries.
 
-config CMD_NAND
-	tristate
-	default y
-	depends on NAND
-	prompt "nand"
+	  Options:
+		  -m DIR	directory where the menu starts (Default: /env/menu)
 
-config CMD_AUTOMOUNT
+config CMD_PASSWD
 	tristate
-	select FS_AUTOMOUNT
-	prompt "automount"
+	select CMD_LOGIN
+	prompt "passwd"
 	help
-	  automount allows it to automatically execute a script when a certain
-	  directory is accessed for the first time. The script should then make
-	  this directory available (discover USB devices, bring network interface
-	  up and finally mount the filesystem).
+	  Set password
+
+	  'Interactively asks for a password. The digest of this password will be
+	  stored in /env/etc//passwd. This is then used by the 'login' command.
+
+	  Entering an empty string will disable the password function.
+
+if CMD_LOGIN || CMD_PASSWD
+
+choice
+	prompt "passwd mode"
+
+config PASSWD_MODE_HIDE
+	bool "Hide"
+
+config PASSWD_MODE_STAR
+	bool "Star"
+
+config PASSWD_MODE_CLEAR
+	bool "Clear"
 
-config CMD_BASENAME
-	tristate
-	prompt "basename"
-	help
-	  Strip directory and suffix from filenames and store the result in a
-	  environment variable
+endchoice
 
-config CMD_DIRNAME
-	tristate
-	prompt "dirname"
+endif
+config CMD_SPLASH
+	bool
+	select IMAGE_RENDERER
+	prompt "splash"
 	help
-	  Strip last component of file name and store the result in a
-	  environment variable
+	  Display a BMP image on a framebuffer device
 
-config CMD_LN
-	tristate
-	prompt "ln"
+	  Usage: splash [-fxyno] FILE
 
-config CMD_READLINK
-	tristate
-	prompt "readlink"
-	help
-	  read value of a symbolic link
+	  This command displays a graphics in the bitmap (.bmp) format on the
+	  framebuffer. Currently images with 8 and 24 bit color depth are supported.
 
-config CMD_TFTP
-	depends on FS_TFTP
-	tristate
-	prompt "tftp"
-	help
-	  barebox can mount tftp as a filesystem. This command is only needed to
-	  preserve backward compatibility to the old tftp command.
+	  Options:
+		  -f FB		framebuffer device (default /dev/fb0)
+		  -x XOFFS	x offset (default center)
+		  -y YOFFS	y offset (default center)
+		  -b COLOR	background color in 0xttrrggbb
+		  -o		render offscreen
 
-config CMD_FILETYPE
+config CMD_READLINE
 	tristate
-	select FILETYPE
-	prompt "filetype"
+	prompt "Readline"
+	help
+	  rompt for user input
 
-endmenu
+	  Usage: readline PROMPT VAR
 
-menu "console"
+	  First it displays the PROMPT, then it reads a line of user input into
+	  variable VAR.
 
-config CMD_CLEAR
+config CMD_TIMEOUT
 	tristate
-	default y
-	prompt "clear"
+	prompt "timeout"
+	help
+	  Usage: timeout [-acrs] SECONDS
 
-config CMD_ECHO
-	tristate
-	default y
-	prompt "echo"
+	  Wait SECONDS for a timeout. Return 1 if the user intervented.
 
-config CMD_ECHO_E
-	bool
-	depends on CMD_ECHO
-	select PROCESS_ESCAPE_SEQUENCE
-	prompt "support -e option to echo"
+	  Options:
+		  -a	interrupt on any key
+		  -c	interrupt on Ctrl-C
+		  -r	interrupt on RETURN
+		  -s	silent mode
 
+# end Console interaction commands
 endmenu
 
-menu "memory"
 
-config CMD_LOADB
-	depends on !CONSOLE_NONE
-	select CRC16
-	tristate
-	prompt "loadb"
 
-config CMD_LOADY
-	select CRC16
-	select XYMODEM
-	depends on !CONSOLE_NONE
-	tristate
-	prompt "loady"
 
-config CMD_LOADS
-	depends on !CONSOLE_NONE
-	tristate
-	prompt "loads"
+menu "Memory"
 
-config CMD_SAVES
-	tristate
-	depends on CMD_LOADS
-	prompt "saves"
+config CMD_MEMORY
+	bool
+	default y
+	help
+	  TODO This is actually not a command, but turns in the /dev/mem device
+	  and common memory options (e.g. range parsing).
 
-config CMD_MEMINFO
+config CMD_CRC
 	tristate
-	prompt "meminfo"
+	select CRC32
+	prompt "crc32"
+	help
+	  Usage: crc32 [-fFvV] AREA
 
-config CMD_IOMEM
+	  Calculate a CRC32 checksum of a memory area.
+	  Options:
+		  -f FILE	Use file instead of memory.
+		  -F FILE	Use file to compare.
+		  -v CRC	Verify
+
+config CMD_CRC_CMP
 	tristate
-	prompt "iomem/ioport"
+	depends on CMD_CRC
+	prompt "compare 2 files using crc32"
 	help
-	  Show information about iomem/ioport usage. Pendant to
-	  'cat /proc/iomem' and 'cat /proc/ioports' under Linux.
+	Adds this option:
 
-config CMD_MEMORY
-	bool
-	default y
+	-V FILE	Verify with CRC read from FILE
 
 config CMD_MD
 	tristate
@@ -324,23 +1231,23 @@ config CMD_MD
 	select CMD_MEMORY
 	prompt "md"
 	help
-	  the md command allows to display (hexdump) memory locations and files.
+	  Memory display
 
-config CMD_MW
-	tristate
-	default y
-	select CMD_MEMORY
-	prompt "mw"
-	help
-	  the mw command allows to write to memory locations and files.
+	  Usage: md [-bwlsx] REGION
 
-config CMD_MM
-	tristate
-	select CMD_MEMORY
-	prompt "memory modify (mm)"
-	help
-	  the mm command allows to read-modify-write registers by doing:
-	  reg = (reg & ~mask) | (val & mask)
+	  Display (hex dump) a memory region.
+
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -s FILE	display file (default /dev/mem)
+		  -x	swap bytes at output
+
+	  Memory regions can be specified in two different forms: START+SIZE
+	  or START-END, If START is omitted it defaults to 0x100
+	  Sizes can be specified as decimal, or if prefixed with 0x as hexadecimal.
+	  An optional suffix of k, M or G is for kbytes, Megabytes or Gigabytes.
 
 config CMD_MEMCMP
 	tristate
@@ -348,7 +1255,21 @@ config CMD_MEMCMP
 	select CMD_MEMORY
 	prompt "memcmp"
 	help
-	  the memcmp command allows to compare memory and file regions.
+	  Memory compare
+
+	  Usage: memcmp [-bwlsd] ADDR1 ADDR2 COUNT
+
+	  Compare memory regions specified with ADDR and ADDR2
+	  of size COUNT bytes. If source is a file COUNT can
+	  be left unspecified, in which case the whole file is
+	  compared.
+
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -s FILE	source file (default /dev/mem)
+		  -d FILE	destination file (default /dev/mem)
 
 config CMD_MEMCPY
 	tristate
@@ -356,7 +1277,18 @@ config CMD_MEMCPY
 	select CMD_MEMORY
 	prompt "memcpy"
 	help
-	  the memcpy command allows to copy memory and file regions.
+	  Memory copy
+
+	  Usage: memcpy [-bwlsd] SRC DEST COUNT
+
+	  Copy memory at SRC of COUNT bytes to DEST
+
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -s FILE	source file (default /dev/mem)
+		  -d FILE	write file (default /dev/mem)
 
 config CMD_MEMSET
 	tristate
@@ -364,383 +1296,306 @@ config CMD_MEMSET
 	select CMD_MEMORY
 	prompt "memset"
 	help
-	  the memset command allows to set regions of memory and files to
-	  a specific value.
+	  Memory fill
 
-config CMD_CRC
-	tristate
-	select CRC32
-	prompt "crc32"
+	  Usage: memset [-bwld] ADDR COUNT DATA
 
-config CMD_CRC_CMP
-	tristate
-	depends on CMD_CRC
-	prompt "compare 2 files using crc32"
+	  Fills the first COUNT bytes at offset ADDR with byte DATA,
 
-config CMD_DIGEST
-	tristate
-	select DIGEST
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -d FILE	write file (default /dev/mem)
 
-config CMD_MD5SUM
+config CMD_MEMTEST
 	tristate
-	select CMD_DIGEST
-	select MD5
-	prompt "md5sum"
+	prompt "memtest"
+	help
+	  The memtest command can test the registered barebox memory.
+	  During this test barebox memory regions like heap, stack, ...
+	  will be skipped. If the tested architecture has MMU with PTE
+	  flags support, the memtest is running twice with cache enabled
+	  and with cache disabled
 
-config CMD_SHA1SUM
-	tristate
-	select CMD_DIGEST
-	select SHA1
-	prompt "sha1sum"
+	  Usage: memtest [-ib]
 
-config CMD_SHA256SUM
-	tristate
-	select CMD_DIGEST
-	select SHA256
-	prompt "sha256sum"
+	  Options:
+		  -i ITERATIONS	perform number of iterations (default 1, 0 is endless)
+		  -b	perform only a test on bus lines
 
-config CMD_SHA224SUM
+config CMD_MM
 	tristate
-	select CMD_DIGEST
-	select SHA224
-	prompt "sha224sum"
-
-endmenu
+	select CMD_MEMORY
+	prompt "memory modify (mm)"
+	help
+	  Memory modify with mask
 
-menu "flash"
+	  Usage: mm [-bwld] ADDR VAL MASK
 
-config CMD_FLASH
-	tristate
-	prompt "protect/erase"
+	  Set/clear bits specified with MASK in ADDR to VALUE
 
-config CMD_UBI
-	tristate
-	default y if MTD_UBI
-	depends on MTD_UBI
-	prompt "ubimkvol, ubirmvol, ubiattach"
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -d FILE	write file (default /dev/mem)
 
-config CMD_UBIFORMAT
+config CMD_MW
 	tristate
-	depends on MTD_UBI
-	select LIBMTD
-	select LIBSCAN
-	select LIBUBIGEN
-	prompt "ubiformat"
-
-endmenu
+	default y
+	select CMD_MEMORY
+	prompt "mw"
+	help
+	  Memory write
 
-menu "booting"
+	  Usage: mw [-bwld] REGION DATA...
 
-config CMD_BOOTM
-	tristate
-	default y
-	select BOOTM
-	select CRC32
-	select UIMAGE
-	select UNCOMPRESS
-	select FILETYPE
-	select GLOBALVAR
-	prompt "bootm"
+	  Write DATA value(s) to the specified REGION.
 
-config CMD_BOOTM_SHOW_TYPE
-	bool
-	depends on CMD_BOOTM
-	prompt "show image information"
+	  Options:
+		  -b	byte access
+		  -w	word access (16 bit)
+		  -l	long access (32 bit)
+		  -d FILE  destination file (default /dev/mem)
 
-config CMD_BOOTM_VERBOSE
-	bool
-	prompt "bootm verbose support"
-	depends on CMD_BOOTM
-	help
-	  support verbose bootm (-v switch)
+#end Memory commands
+endmenu
 
-config CMD_BOOTM_INITRD
-	bool
-	prompt "bootm initrd support"
-	depends on CMD_BOOTM
-	help
-	  support initrds in bootm
 
-config CMD_BOOTM_OFTREE
-	bool
-	depends on CMD_BOOTM
-	select OFTREE
-	prompt "bootm oftree support"
-	help
-	  say yes here to support passing a flat device tree to the kernel
 
-config CMD_BOOTM_OFTREE_UIMAGE
-	bool
-	prompt "support passing oftree uImages"
-	depends on CMD_BOOTM_OFTREE
-	help
-	  Support using oftree uImages. Without this only raw oftree
-	  blobs can be used.
 
-config CMD_BOOTM_AIMAGE
-	bool
-	prompt "bootm Android image support"
-	depends on CMD_BOOTM && ARM
-	help
-	  Support using Android Images.
+menu "Hardware manipulation"
 
-config CMD_UIMAGE
-	select UIMAGE
+config CMD_CLK
 	tristate
-	prompt "uimage"
+	depends on COMMON_CLK
+	prompt "clk_dump, clk_set_parent, clk_set_rate"
 	help
-	  Show information about uImage and also extract and verify uImages.
+	  clk_dump - show information about registered clocks
 
-config CMD_BOOTZ
-	tristate
-	depends on ARM
-	prompt "bootz"
-	help
-	  compile in the 'bootz' command to start zImages
+	  Usage: clk_dump [-v]
 
-config CMD_BOOTU
-	tristate
-	default y
-	depends on ARM
-	prompt "bootu"
-	help
-	  compile in the 'bootu' command to start raw (uncompressed)
-	  Linux images
+	  Options:
+	  -v  verbose
 
-config FLEXIBLE_BOOTARGS
-	bool
-	prompt "flexible Linux bootargs generation"
-	depends on CMD_GLOBAL
-	help
-	  Select this to get a more flexible bootargs generation. With this
-	  option the bootargs are concatenated together from global variables
-	  beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.'
-	  This allows for more flexible scripting since with it it's possible
-	  to replace parts of the bootargs string without reconstructing it
-	  completely
 
-config CMD_LINUX16
-	tristate
-	depends on X86
-	default y if X86
-	prompt "linux16"
-	help
-	  Compile the linux16 command to be able to boot bzImages
-	  via real mode.
+	  clk_set_parent - set parent of a clock
 
-config CMD_BOOT
-	tristate
-	select BOOTM
-	prompt "boot"
-	help
-	  Select this for booting based on scripts. unlike the bootm command which
-	  can boot a single image this command offers the possibility to boot with
-	  scripts (by default placed under /env/boot/). This command iterates over
-	  multiple scripts until one succeeds. It supersedes the previous 'boot'
-	  script.
+	  Usage: clk_set_parent CLK PARENT
 
-config CMD_RESET
-	tristate
-	prompt "reset"
 
-config CMD_POWEROFF
-	tristate
-	depends on HAS_POWEROFF
-	prompt "poweroff"
+	  clk_set_rate - set a clocks rate
+
+	  Usage: clk_set_rate CLK HZ
 
-config CMD_GO
-	tristate
-	prompt "go"
+	  Set clock CLK to RATE Hz.
 
-config CMD_OFTREE
+config CMD_DETECT
 	tristate
-	select OFTREE
-	prompt "oftree"
+	prompt "detect"
 	help
-	  The oftree command has support for dumping devicetrees and, if
-	  enabled, to probe devices from the devicetree
+	  Some devices take longer time to probe, like slow disks or
+	  SD/MMC cards. These can defer the actual probe of the client
+	  devices until they are needed. Use the 'detect' command on
+	  the physical device to trigger probing.
 
-config CMD_OF_PROPERTY
-	tristate
-	select OFTREE
-	prompt "of_property"
-	help
-	  The of_property command allows setting and deleting of properties in
-	  the currently loaded devicetree.
+	  Usage: detect [-lea] [devices]
 
-config CMD_OF_NODE
+	  Options:
+		  -l	list detectable devices
+		  -e	bail out if one device fails to detect
+		  -a	detect all devices
+
+config CMD_FLASH
 	tristate
-	select OFTREE
-	prompt "of_node"
+	prompt "erase, protect and unprotect"
 	help
-	  The of_node command allows adding and removing devicetree nodes.
+	  erase - erase flash memory
 
-endmenu
+	  Usage: erase DEVICE [AREA]
 
-menu "testing"
+	  Erase the flash memory handled by DEVICE. Which AREA will be erased
+	  depends on the device: If the device represents the whole flash
+	  memory, the whole memory will be erased. If the device represents a
+	  partition on a main flash memory, only this partition part will be
+	  erased.
 
-config CMD_NANDTEST
-	tristate
-	depends on NAND
-	depends on PARTITION
-	depends on NAND_ECC_HW || NAND_ECC_SOFT
-	select PARTITION_NEED_MTD
-	prompt "nandtest"
+	  Use 'addpart' and 'delpart' to manage partitions
 
-config CMD_MEMTEST
-	tristate
-	prompt "memtest"
-	help
-	  The memtest command can test the registered barebox memory.
-	  During this test barebox memory regions like heap, stack, ...
-	  will be skipped. If the tested architecture has MMU with PTE
-	  flags support, the memtest is running twice with cache enabled
-	  and with cache disabled
 
-config CMD_2048
-	tristate
-	prompt "2048"
-	help
-	  Console version of the game "2048" for GNU/Linux
+	  protect - enable flash write protection
 
-endmenu
+	  Usage: protect DEVICE [AREA]
 
-menu "video command"
+	  Protect the flash memory behind the device. It depends on the device
+	  given, what area will be protected. If the device represents the whole
+	  flash memory, the whole memory will be protected. If the device
+	  represents a partition on a main flash memory, only this partition part
+	  will be protected.
 
-if VIDEO
+	  Use 'addpart' and 'delpart' to manage partitions.
 
-config CMD_SPLASH
+
+	  unprotect - disable flash write protection
+
+	  Usage: unprotect DEVICE [AREA]
+
+	  Unprotect the flash memory behind the device. It depends on the device
+	  given, what area will be unprotected. If the device represents the whole
+	  flash memory, the whole memory will be unprotected. If the device
+	  represents a partition on a main flash memory, only this partition part
+	  will be unprotected.
+
+config CMD_GPIO
 	bool
-	select IMAGE_RENDERER
-	prompt "splash"
+	depends on GENERIC_GPIO
+	prompt "gpio_direction_input, gpio_direction_output, gpio_get_value and gpio_set_value"
 	help
-	  show bmp files on framebuffer devices
+	  gpio_direction_input - set direction of a GPIO pin to input
 
-endif
+	  Usage: gpio_direction_input GPIO
 
-endmenu
 
-config CMD_BAREBOX_UPDATE
-	tristate
-	select BAREBOX_UPDATE
-	prompt "barebox-update"
+	  gpio_direction_output - set direction of a GPIO pin to output
 
-config CMD_TIMEOUT
-	tristate
-	prompt "timeout"
+	  Usage: gpio_direction_output GPIO
 
-config CMD_PARTITION
-	tristate
-	prompt "addpart/delpart"
 
-config CMD_TEST
-	tristate
-	depends on SHELL_HUSH
-	default y
-	prompt "test"
-	help
-	  shell like test function
+	  gpio_get_value - return value of a GPIO pin
 
-config CMD_REGINFO
-	depends on HAS_REGINFO
-	select REGINFO
-	tristate
-	prompt "reginfo"
+	  Usage: gpio_get_value GPIO
 
-config CMD_VERSION
-	tristate
-	default y
-	depends on BANNER
-	prompt "version"
 
-config CMD_HELP
-	tristate
-	default y
-	prompt "help"
+	  gpio_set_value - set a GPIO's output value
 
-config CMD_MAGICVAR
-	tristate
-	prompt "magicvar"
-	help
-	  barebox has some shell variables with special meanings. This
-	  command shows the available magic variables.
+	  Usage: gpio_set_value GPIO VALUE
 
-config CMD_MAGICVAR_HELP
+config CMD_I2C
 	bool
-	prompt "display description"
-	depends on CMD_MAGICVAR
+	depends on I2C
+	prompt "i2c_probe, i2c_read and i2c_write"
 	help
-	  Also display a description to the magic variables
+	  i2c_probe - probe for an i2c device
 
-config CMD_DEVINFO
-	tristate
-	default y
-	prompt "devinfo"
+	  Usage: i2c_probe BUS START END
 
-config CMD_INSMOD
-	bool
-	depends on MODULES
-	default y
-	prompt "insmod"
+	  Probe the i2c bus BUS, address range from START to END for devices.
 
-config CMD_LSMOD
-	bool
-	depends on MODULES
-	prompt "lsmod"
 
-config CMD_GPIO
+	  i2c_read - read from an i2c device
+
+	  Usage: i2c_read [-bacrwv] DATA...
+
+	  Options:
+		  -b BUS		i2c bus number (default 0)
+		  -a ADDR		i2c device address
+		  -r START	start register
+		  -w		use word (16 bit) wide access
+		  -c COUNT	byte count
+		  -v		verbose
+
+
+	  i2c_write - write to an i2c device
+
+	  Usage: i2c_write [-barwv] DATA...
+
+	  Options:
+		  -b BUS		i2c bus number (default 0)
+		  -a ADDR		i2c device address
+		  -r START	start register
+		  -w		use word (16 bit) wide access
+		  -v		verbose
+
+config CMD_LED
 	bool
-	depends on GENERIC_GPIO
-	prompt "gpio commands"
+	depends on LED
+	prompt "led command"
 	help
-	  include gpio_set_value, gpio_get_value, gpio_direction_input and
-	  gpio_direction_output commands to control gpios.
+	  Control LEDs
 
-config CMD_REGULATOR
-	bool
-	depends on REGULATOR
-	prompt "regulator command"
+	  Usage: led LED VALUE
+
+	  Control the value of a LED. The exact meaning of VALUE is unspecified,
+	  it can be a brightness, or a color. Most often a value of '1' means on
+	  and '0' means off.
+
+	  Without arguments the available LEDs are listed.
+
+config CMD_NAND
+	tristate
+	default y
+	depends on NAND
+	prompt "nand"
 	help
-	  the regulator command lists the currently registered regulators and
-	  their current state.
+	  NAND flash handling
 
-config CMD_UNCOMPRESS
-	bool
-	select UNCOMPRESS
-	prompt "uncompress"
+	  Usage: nand [-adb] NANDDEV
+
+	  Options:
+		  -a		register a bad block aware device ontop of a normal NAND device
+		  -d		deregister a bad block aware device
+		  -b OFFS	mark block at OFFSet as bad
+
+config CMD_NANDTEST
+	tristate
+	depends on NAND
+	depends on PARTITION
+	depends on NAND_ECC_HW || NAND_ECC_SOFT
+	select PARTITION_NEED_MTD
+	prompt "nandtest"
 	help
-	  Say yes here to get the uncompress command. uncompress handles
-	  lzo, gzip and bzip2 compressed files depending on the compiled
-	  in compression libraries
+	  NAND flash memory test
 
-config CMD_I2C
-	bool
-	depends on I2C
-	prompt "i2c commands"
+	  Usage: nandtest [-tmsiol] NANDDEVICE
+
+	  Options:
+		  -t	Really do a nandtest on device
+		  -m	Mark blocks bad if they appear so
+		  -s SEED	supply random seed
+		  -i ITERATIONS	nNumber of iterations
+		  -o OFFS	start offset on flash
+		  -l LEN	length of flash to test
+
+config CMD_POWEROFF
+	tristate
+	depends on HAS_POWEROFF
+	prompt "poweroff"
 	help
-	  include i2c_probe, i2c_read and i2c_write commands to communicate
-	  on i2c bus.
+	  Turn the power off.
 
 config CMD_SPI
 	bool
 	depends on SPI
 	prompt "spi command"
 	help
+	  Write/read from SPI device
 
-config CMD_LED
-	bool
-	depends on LED
-	prompt "led command"
-	help
-	  include led command to control LEDs
+	  Usage: spi [-brcmfwv] DATA...
+
+	  Options:
+		  -b BUS	SPI bus number (default 0)
+		  -r COUNT	bytes to read
+		  -c		chip select (default 0)
+		  -m MODE	SPI mode (default 0)
+		  -f HZ		max speed frequency, in Hz (default 1 MHz)
+		  -w BIT	bits per word (default 8)
+		  -v		verbose
 
 config CMD_LED_TRIGGER
 	bool
 	depends on LED_TRIGGERS
 	prompt "trigger command"
 	help
-	  The trigger command allows to control LED triggers from the command
-	  line.
+	  Handle LED triggers
+
+	  Usage: trigger [-td] TRIGGER [LED]
+
+	  Control a LED trigger. Without options assigned triggers are shown.
+
+	  Options:
+	  -t  set a trigger (needs LED argument)
+	  -d  disable a trigger
 
 config CMD_USB
 	bool
@@ -748,56 +1603,155 @@ config CMD_USB
 	prompt "usb command"
 	default y
 	help
-	  The usb command allows to rescan for USB devices.
+	  (re-)detect USB devices
 
-config CMD_MIITOOL
-	tristate
-	depends on PHYLIB
-	prompt "miitool"
-	help
-	  The miitool command allows to view media-independent interface status.
-	  The default short output reports the negotiated link speed and
-	  link status for selected MII. The '-v' option displays more
-	  detailed MII status information, such as MII capabilities,
-	  current advertising mode, and link partner capabilities.
+	  Usage: usb [-f]
 
-config CMD_CLK
-	tristate
-	depends on COMMON_CLK
-	prompt "clock manipulation commands"
-	help
-	  Say yes here to get clk_set_rate, clk_set_parent and clk_dump
-	  commands to manipulate clocks on your system.
+	  Scan for USB devices.
 
-config CMD_DETECT
-	tristate
-	prompt "detect"
-	help
-	  say yes here to get the 'detect' command. Some devices take longer
-	  time to probe, like slow disks or SD/MMC cards. These can defer the
-	  actual probe of the client devices until they are needed. Use the
-	  'detect' command on the physical device to trigger probing.
+	  Options:
+		  -f	force rescan
 
-menuconfig CMD_WD
+config CMD_WD
 	bool
 	depends on WATCHDOG
 	prompt "wd command"
 	help
-	  The 'wd' command which allows to start, stop and trigger the onboard
-	  watchdog.
+	  Enable/disable/trigger the watchdog
 
-if CMD_WD
+	  Usage: wd [TIME]
+
+	  Enable the watchdog to bark in TIME seconds.
+	  When TIME is 0, the watchdog gets disabled,
+	  Without a parameter the watchdog will be re-triggered.
 
 config CMD_WD_DEFAULT_TIMOUT
 	int
 	default 0
+	depends on CMD_WD
 	prompt "default timeout"
 	help
 	  Define the default timeout value in [seconds] if the first call of
 	  'wd' is done without a timeout value (which means the watchdog gets
 	  enabled and re-triggered with the default timeout value).
-endif
 
+# end Hardware manipulation commands
+endmenu
+
+
+
+menu "Miscelleanous"
+
+config CMD_2048
+	tristate
+	prompt "2048"
+	help
+	  Console version of the game "2048" for GNU/Linux
+
+config CMD_BAREBOX_UPDATE
+	tristate
+	select BAREBOX_UPDATE
+	prompt "barebox-update"
+	help
+	  Update barebox to persistent media.
+
+	  Usage: barebox_update [-ltdyf] [IMAGE]
+
+	  Options:
+		  -l		list registered targets
+		  -t TARGET	specify data target handler name
+		  -d DEVICE	write image to DEVICE
+		  -y		autom. use 'yes' when asking confirmations
+		  -f LEVEL	set force level
+
+config CMD_LINUX_EXEC
+	bool "linux exec"
+	depends on LINUX
+	help
+	  Execute a command on the host
+
+	  Usage: linux_exec COMMAND
+
+config CMD_INSMOD
+	bool
+	depends on MODULES
+	default y
+	prompt "insmod"
+	help
+	  Load a barebox module.
+
+config CMD_LSMOD
+	bool
+	depends on MODULES
+	prompt "lsmod"
+	help
+	  List loaded barebox modules.
+
+config CMD_OF_NODE
+	tristate
+	select OFTREE
+	prompt "of_node"
+	help
+	  Create/delete nodes in the device tree
+
+	  Usage: of_node [-cd] NODE NAME
+
+	  Options:
+		  -c	create a new node
+		  -d	delete a node
+
+config CMD_OF_PROPERTY
+	tristate
+	select OFTREE
+	prompt "of_property"
+	help
+	  Handle device tree properties
+
+	  Usage: of_property [-sd] NODE [PROPERTY] [VALUES]
+
+	  Options:
+		  -s	set property to value
+		  -d	delete property
+
+	  Valid formats for values:
+	  <0x00112233 4 05> - an array of cells. cells not beginning with a digit are
+                    interpreted as node pathes and converted to phandles
+	  [00 11 22 .. nn]  - byte stream
+	  If the value does not start with '<' or '[' it is interpreted as string
+
+config CMD_OFTREE
+	tristate
+	select OFTREE
+	prompt "oftree"
+	help
+	  oftree - handle device trees
+
+	  Usage: oftree [-lpfdn] [DTB]
+
+	  Options:
+		  -l		Load DTB to internal device tree
+		  -p		probe devices from stored device tree
+		  -f		free stored device tree
+		  -d		dump device tree from DTB or the parsed tree if no DTB is given
+		  -n NODE	specify root device NODE to dump for -d
+
+config CMD_TIME
+	bool "time"
+	help
+	  time - measure execution duration of a command
+
+	  Usage: time COMMAND
+
+	  Note: This command depends on COMMAND being interruptible,
+	  otherwise the timer may overrun resulting in incorrect results
+
+# end Miscelleanous commands
+endmenu
+
+
+
+
+# end Commands
 endmenu
 
 endif
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 04/19] commands: CMD_MEMORY -> COMPILE_MEMORY
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (2 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 03/19] commands: harmonize in-barebox docs with Kconfig docs Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 05/19] commands: CMD_DIGEST -> COMPILE_DIGEST Holger Schurig
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* CMD_MEMORY was defined both in common/Kconfig and commands/Kconfig
* that symbol turned not a command on, but just the compilation of
  commands/mem.c, so rename it accordingly

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 .../configs/omap3430_sdp3430_per_uart_defconfig    |    2 +-
 arch/arm/configs/omap3_evm_defconfig               |    2 +-
 arch/arm/configs/phytec-phycard-omap3_defconfig    |    2 +-
 arch/arm/configs/tx51stk5_defconfig                |    2 +-
 commands/Kconfig                                   |   24 +++++++++-----------
 commands/Makefile                                  |    2 +-
 common/Kconfig                                     |    3 ---
 7 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
index 013d000..445866f 100644
--- a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
+++ b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
@@ -1,7 +1,7 @@
 CONFIG_ARCH_OMAP=y
 # CONFIG_OMAP3_COPY_CLOCK_SRAM is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-# CONFIG_CMD_MEMORY is not set
+# CONFIG_COMPILE_MEMORY is not set
 CONFIG_TEXT_BASE=0x40200000
 CONFIG_MEMORY_LAYOUT_FIXED=y
 CONFIG_STACK_BASE=0x87BF7F10
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 3fe2647..90ace31 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARCH_OMAP=y
 # CONFIG_OMAP3_COPY_CLOCK_SRAM is not set
 CONFIG_MACH_OMAP3EVM=y
 CONFIG_AEABI=y
-# CONFIG_CMD_MEMORY is not set
+# CONFIG_COMPILE_MEMORY is not set
 CONFIG_TEXT_BASE=0x40200000
 CONFIG_MEMORY_LAYOUT_FIXED=y
 CONFIG_STACK_BASE=0x87BF7F10
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index b901658..d242c19 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -18,7 +18,7 @@ CONFIG_DEFCONFIG_LIST="$ARCH_DEFCONFIG"
 CONFIG_GREGORIAN_CALENDER=y
 CONFIG_HAS_KALLSYMS=y
 CONFIG_HAS_MODULES=y
-CONFIG_CMD_MEMORY=y
+CONFIG_COMPILE_MEMORY=y
 CONFIG_ENV_HANDLING=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_BLOCK=y
diff --git a/arch/arm/configs/tx51stk5_defconfig b/arch/arm/configs/tx51stk5_defconfig
index 354e809..b05c01d 100644
--- a/arch/arm/configs/tx51stk5_defconfig
+++ b/arch/arm/configs/tx51stk5_defconfig
@@ -18,7 +18,7 @@ CONFIG_ARM_UNWIND=y
 CONFIG_GREGORIAN_CALENDER=y
 CONFIG_HAS_KALLSYMS=y
 CONFIG_HAS_MODULES=y
-CONFIG_CMD_MEMORY=y
+CONFIG_COMPILE_MEMORY=y
 CONFIG_ENV_HANDLING=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_BLOCK=y
diff --git a/commands/Kconfig b/commands/Kconfig
index fb9a036..d987688 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -12,6 +12,11 @@ config HAS_POWEROFF
 
 if COMMAND_SUPPORT
 
+config COMPILE_MEMORY
+	bool
+	help
+	  Turns on compilation of mem.c
+
 menu "Commands"
 
 
@@ -1196,13 +1201,6 @@ endmenu
 
 menu "Memory"
 
-config CMD_MEMORY
-	bool
-	default y
-	help
-	  TODO This is actually not a command, but turns in the /dev/mem device
-	  and common memory options (e.g. range parsing).
-
 config CMD_CRC
 	tristate
 	select CRC32
@@ -1228,7 +1226,7 @@ config CMD_CRC_CMP
 config CMD_MD
 	tristate
 	default y
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "md"
 	help
 	  Memory display
@@ -1252,7 +1250,7 @@ config CMD_MD
 config CMD_MEMCMP
 	tristate
 	default y
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "memcmp"
 	help
 	  Memory compare
@@ -1274,7 +1272,7 @@ config CMD_MEMCMP
 config CMD_MEMCPY
 	tristate
 	default y
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "memcpy"
 	help
 	  Memory copy
@@ -1293,7 +1291,7 @@ config CMD_MEMCPY
 config CMD_MEMSET
 	tristate
 	default y
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "memset"
 	help
 	  Memory fill
@@ -1326,7 +1324,7 @@ config CMD_MEMTEST
 
 config CMD_MM
 	tristate
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "memory modify (mm)"
 	help
 	  Memory modify with mask
@@ -1344,7 +1342,7 @@ config CMD_MM
 config CMD_MW
 	tristate
 	default y
-	select CMD_MEMORY
+	select COMPILE_MEMORY
 	prompt "mw"
 	help
 	  Memory write
diff --git a/commands/Makefile b/commands/Makefile
index f927d21..f5aaf1c 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_STDDEV)		+= stddev.o
+obj-$(CONFIG_COMPILE_MEMORY)	+= mem.o
 obj-$(CONFIG_CMD_BOOTM)		+= bootm.o
 obj-$(CONFIG_CMD_UIMAGE)	+= uimage.o
 obj-$(CONFIG_CMD_LINUX16)	+= linux16.o
@@ -6,7 +7,6 @@ obj-$(CONFIG_CMD_LOADB)		+= loadb.o
 obj-$(CONFIG_CMD_LOADY)		+= loadxy.o
 obj-$(CONFIG_CMD_LOADS)		+= loads.o
 obj-$(CONFIG_CMD_ECHO)		+= echo.o
-obj-$(CONFIG_CMD_MEMORY)	+= mem.o
 obj-$(CONFIG_CMD_MD)		+= md.o
 obj-$(CONFIG_CMD_MM)		+= mm.o
 obj-$(CONFIG_CMD_MW)		+= mw.o
diff --git a/common/Kconfig b/common/Kconfig
index 0031cc8..20ce60c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -21,9 +21,6 @@ config HAS_KALLSYMS
 config HAS_MODULES
 	bool
 
-config CMD_MEMORY
-	bool
-
 config ENV_HANDLING
 	select CRC32
 	bool
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 05/19] commands: CMD_DIGEST -> COMPILE_DIGEST
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (3 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 04/19] commands: CMD_MEMORY -> COMPILE_MEMORY Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 06/19] commands: move CMD_ARM_CPUINFO to commands/Kconfig Holger Schurig
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

This config just turned on the compilation of digest.c (used by 'SHA1',
'sha256sum' etc), so name it accordingly.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/arm/configs/phytec-phycard-omap3_defconfig |    2 +-
 commands/Kconfig                                |   20 ++++++++++----------
 commands/Makefile                               |    2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index d242c19..95383aa 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -95,7 +95,7 @@ CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_IOMEM=y
 CONFIG_CMD_CRC=y
 CONFIG_CMD_CRC_CMP=y
-CONFIG_CMD_DIGEST=y
+CONFIG_COMPILE_DIGEST=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_CMD_SHA1SUM=y
 CONFIG_CMD_SHA256SUM=y
diff --git a/commands/Kconfig b/commands/Kconfig
index d987688..ad23dbf 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -12,6 +12,12 @@ config HAS_POWEROFF
 
 if COMMAND_SUPPORT
 
+config COMPILE_DIGEST
+	tristate
+	select DIGEST
+	help
+	  Turns on compilation of digest.c
+
 config COMPILE_MEMORY
 	bool
 	help
@@ -591,12 +597,6 @@ endmenu
 
 menu "File"
 
-config CMD_DIGEST
-	tristate
-	select DIGEST
-	help
-	  TODO This is actually not a command, but turns on digest.c compilation.
-
 config CMD_BASENAME
 	tristate
 	prompt "basename"
@@ -716,7 +716,7 @@ config CMD_LS
 
 config CMD_MD5SUM
 	tristate
-	select CMD_DIGEST
+	select COMPILE_DIGEST
 	select MD5
 	prompt "md5sum"
 	help
@@ -781,7 +781,7 @@ config CMD_RMDIR
 
 config CMD_SHA1SUM
 	tristate
-	select CMD_DIGEST
+	select COMPILE_DIGEST
 	select SHA1
 	prompt "sha1sum"
 	help
@@ -793,7 +793,7 @@ config CMD_SHA1SUM
 
 config CMD_SHA224SUM
 	tristate
-	select CMD_DIGEST
+	select COMPILE_DIGEST
 	select SHA224
 	prompt "sha224sum"
 	help
@@ -805,7 +805,7 @@ config CMD_SHA224SUM
 
 config CMD_SHA256SUM
 	tristate
-	select CMD_DIGEST
+	select COMPILE_DIGEST
 	select SHA256
 	prompt "sha256sum"
 	help
diff --git a/commands/Makefile b/commands/Makefile
index f5aaf1c..2373ccf 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_STDDEV)		+= stddev.o
+obj-$(CONFIG_COMPILE_DIGEST)	+= digest.o
 obj-$(CONFIG_COMPILE_MEMORY)	+= mem.o
 obj-$(CONFIG_CMD_BOOTM)		+= bootm.o
 obj-$(CONFIG_CMD_UIMAGE)	+= uimage.o
@@ -34,7 +35,6 @@ obj-$(CONFIG_CMD_MOUNT)		+= mount.o
 obj-$(CONFIG_CMD_UMOUNT)	+= umount.o
 obj-$(CONFIG_CMD_REGINFO)	+= reginfo.o
 obj-$(CONFIG_CMD_CRC)		+= crc.o
-obj-$(CONFIG_CMD_DIGEST)	+= digest.o
 obj-$(CONFIG_CMD_CLEAR)		+= clear.o
 obj-$(CONFIG_CMD_TEST)		+= test.o
 obj-$(CONFIG_CMD_FLASH)		+= flash.o
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 06/19] commands: move CMD_ARM_CPUINFO to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (4 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 05/19] commands: CMD_DIGEST -> COMPILE_DIGEST Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 07/19] commands: move CMD_ARM_MMUINFO " Holger Schurig
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* this places the command into the "Information commands"
  section of Kconfig
* while at it, imprive Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/arm/Kconfig |    7 -------
 commands/Kconfig |   16 ++++++++++++++++
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4a2ec41..f8f3da0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -256,13 +256,6 @@ endmenu
 
 menu "Arm specific settings"
 
-config CMD_ARM_CPUINFO
-	bool "cpuinfo command"
-	default y
-	help
-	  Say yes here to get a cpuinfo command to show some
-	  CPU information using the cp15 registers
-
 config CMD_ARM_MMUINFO
 	bool "mmuinfo command"
 	depends on CPU_V7
diff --git a/commands/Kconfig b/commands/Kconfig
index ad23dbf..8b5110c 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -30,6 +30,22 @@ menu "Commands"
 
 menu "Information"
 
+config CMD_ARM_CPUINFO
+	bool "cpuinfo command"
+	default y
+	depends on ARM
+	help
+	  Show info about ARM CPU
+
+	  Example:
+
+	  implementer: ARM
+	  architecture: v7
+	  core: Cortex-A9 r2p10
+	  I-cache: 512 bytes (linelen = 64)
+	  D-cache: 8192 bytes (linelen = 8)
+	  Control register: M C W P D L I V RR DT IT U XP
+
 config CMD_DEVINFO
 	tristate
 	default y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 07/19] commands: move CMD_ARM_MMUINFO to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (5 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 06/19] commands: move CMD_ARM_CPUINFO to commands/Kconfig Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 08/19] commands: move CMD_MIPS_CPUINFO " Holger Schurig
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* this places the command into the "Information commands"
  section of Kconfig
* while at it, imprive Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/arm/Kconfig |    8 --------
 commands/Kconfig |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f8f3da0..73c7382 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -256,14 +256,6 @@ endmenu
 
 menu "Arm specific settings"
 
-config CMD_ARM_MMUINFO
-	bool "mmuinfo command"
-	depends on CPU_V7
-	default n
-	help
-	  Say yes here to get a mmuinfo command to show some
-	  MMU and cache information using the cp15 registers
-
 config CPU_V7_DCACHE_SKIP
 	bool "Skip DCache Invalidate"
 	depends on CPU_V7
diff --git a/commands/Kconfig b/commands/Kconfig
index 8b5110c..9789af4 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -91,6 +91,40 @@ config CMD_MEMINFO
 	  system bytes     =     282616
 	  in use bytes     =     274752
 
+config CMD_ARM_MMUINFO
+	bool "mmuinfo command"
+	depends on CPU_V7
+	default n
+	help
+	  Say yes here to get a mmuinfo command to show some
+	  MMU and cache information using the cp15 registers.
+
+	  Example:
+
+	  PAR result for 0x00110000:
+ 	  privileged read: 0x00110090
+  	  Physical Address [31:12]: 0x00110000
+  	  Reserved [11]:            0x0
+  	  Not Outer Shareable [10]: 0x0
+  	  Non-Secure [9]:           0x0
+  	  Impl. def. [8]:           0x0
+  	  Shareable [7]:            0x1
+  	  Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
+  	  Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
+  	  SuperSection [1]:         0x0
+  	  Failure [0]:              0x0
+ 	  privileged write: 0x00110090
+  	  Physical Address [31:12]: 0x00110000
+  	  Reserved [11]:            0x0
+  	  Not Outer Shareable [10]: 0x0
+  	  Non-Secure [9]:           0x0
+  	  Impl. def. [8]:           0x0
+  	  Shareable [7]:            0x1
+  	  Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
+  	  Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
+  	  SuperSection [1]:         0x0
+  	  Failure [0]:              0x0
+
 config CMD_REGINFO
 	depends on HAS_REGINFO
 	select REGINFO
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (6 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 07/19] commands: move CMD_ARM_MMUINFO " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13 11:26   ` Antony Pavlov
  2014-05-13  8:28 ` [PATCH 09/19] commands: move CMD_BOOT_ORDER " Holger Schurig
                   ` (13 subsequent siblings)
  21 siblings, 1 reply; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* this places the command into the "Information commands"
  section of Kconfig

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/mips/Kconfig |    7 -------
 commands/Kconfig  |    8 ++++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9a240b7..6ce7fff 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -274,13 +274,6 @@ endchoice
 
 menu "MIPS specific settings"
 
-config CMD_MIPS_CPUINFO
-	bool "cpuinfo command"
-	default y
-	help
-	  Say yes here to get a cpuinfo command to show some
-	  information about the cpu model.
-
 config HAS_NMON
 	bool
 
diff --git a/commands/Kconfig b/commands/Kconfig
index 9789af4..db091c4 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -46,6 +46,14 @@ config CMD_ARM_CPUINFO
 	  D-cache: 8192 bytes (linelen = 8)
 	  Control register: M C W P D L I V RR DT IT U XP
 
+config CMD_MIPS_CPUINFO
+	bool "cpuinfo command"
+	default y
+	depends on MIPS
+	help
+	  Say yes here to get a cpuinfo command to show some
+	  information about the cpu model.
+
 config CMD_DEVINFO
 	tristate
 	default y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 09/19] commands: move CMD_BOOT_ORDER to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (7 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 08/19] commands: move CMD_MIPS_CPUINFO " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 10/19] commands: move CMD_AT91_BOOT_TEST " Holger Schurig
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* this places the command into the "Boot commands"
  section of Kconfig
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/arm/mach-omap/Kconfig |    7 -------
 commands/Kconfig           |   12 ++++++++++++
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 12b9c1f..201944c 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -107,13 +107,6 @@ config OMAP4_USBBOOT
 	  You need the utility program omap4_usbboot to boot from USB.
 	  Please read omap4_usb_booting.txt for more information.
 
-config CMD_BOOT_ORDER
-	tristate
-	depends on ARCH_OMAP4
-	prompt "boot_order"
-	help
-	  A command to choose the next boot device on a warm reset.
-
 config OMAP_MULTI_BOARDS
 	bool "Allow multiple boards to be selected"
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
diff --git a/commands/Kconfig b/commands/Kconfig
index db091c4..0145f00 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -180,6 +180,18 @@ config FLEXIBLE_BOOTARGS
 	  to replace parts of the bootargs string without reconstructing it
 	  completely.
 
+config CMD_BOOT_ORDER
+	tristate
+	depends on ARCH_OMAP4
+	prompt "boot_order"
+	help
+	  Set warm boot order (the next boot device on a warm reset).
+
+	  Usage: boot_order DEVICE...
+
+	  Each device can be one of:
+	  xip xipwait nand onenand mmc1 mmc2_1 mmc2_2 uart usb_1 usb_ulpi usb_2
+
 config CMD_BOOT
 	tristate
 	select BOOTM
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 10/19] commands: move CMD_AT91_BOOT_TEST to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (8 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 09/19] commands: move CMD_BOOT_ORDER " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 11/19] commands: move CMD_AT91MUX " Holger Schurig
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* this places the command into the "Boot commands"
  section of Kconfig
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 arch/arm/mach-at91/Kconfig |    6 ------
 commands/Kconfig           |   13 +++++++++++++
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index e3eeb2c..6222653 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -534,12 +534,6 @@ config CMD_AT91CLK
 	bool "at91clk dump command"
 	default y
 
-config CMD_AT91_BOOT_TEST
-	bool "at91_boot_test"
-	help
-	  allow to upload a boot binary to sram and execute it
-	  useful to test bootstrap or barebox lowlevel init
-
 endif
 
 config AT91_BOOTSTRAP
diff --git a/commands/Kconfig b/commands/Kconfig
index 0145f00..e48b2d1 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -180,6 +180,19 @@ config FLEXIBLE_BOOTARGS
 	  to replace parts of the bootargs string without reconstructing it
 	  completely.
 
+config CMD_AT91_BOOT_TEST
+	bool "at91_boot_test"
+	depends on ARCH_AT91
+	help
+	  allow to upload a boot binary to SRAM and execute it.
+	  Useful to test bootstrap or barebox lowlevel init.
+
+	  Usage: at91_boot_test [-js] FILE
+
+	  Options:
+	  -j ADDR  jump address
+	  -s SRAM  SRAM device (default /dev/sram0)
+
 config CMD_BOOT_ORDER
 	tristate
 	depends on ARCH_OMAP4
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 11/19] commands: move CMD_AT91MUX to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (9 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 10/19] commands: move CMD_AT91_BOOT_TEST " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 12/19] commands: move CMD_AT91MIX " Holger Schurig
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 arch/arm/mach-at91/Kconfig |    4 ----
 commands/Kconfig           |    7 +++++++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 6222653..a3f4f3f 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -530,10 +530,6 @@ config CMD_AT91MUX
 	bool "at91mux dump command"
 	default y
 
-config CMD_AT91CLK
-	bool "at91clk dump command"
-	default y
-
 endif
 
 config AT91_BOOTSTRAP
diff --git a/commands/Kconfig b/commands/Kconfig
index e48b2d1..166693d 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -30,6 +30,13 @@ menu "Commands"
 
 menu "Information"
 
+config CMD_AT91CLK
+	bool "at91clk"
+	default y
+	depends on ARCH_AT91
+	help
+	  List clock configuration.
+
 config CMD_ARM_CPUINFO
 	bool "cpuinfo command"
 	default y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 12/19] commands: move CMD_AT91MIX to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (10 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 11/19] commands: move CMD_AT91MUX " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 13/19] commands: HUSH_GETOPT -> CMD_GETOPT Holger Schurig
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 arch/arm/mach-at91/Kconfig |    8 --------
 commands/Kconfig           |   16 ++++++++++++++++
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index a3f4f3f..298ee3f 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -524,14 +524,6 @@ config CALAO_MB_QIL_A9260
 	bool "MB-QIL A9260 Motherboard Board support"
 	depends on MACH_QIL_A9260 || MACH_QIL_A9G20
 
-if COMMAND_SUPPORT
-
-config CMD_AT91MUX
-	bool "at91mux dump command"
-	default y
-
-endif
-
 config AT91_BOOTSTRAP
 	bool "at91 bootstrap"
 	depends on HAVE_AT91_LOWLEVEL_INIT
diff --git a/commands/Kconfig b/commands/Kconfig
index 166693d..47ac352 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -37,6 +37,22 @@ config CMD_AT91CLK
 	help
 	  List clock configuration.
 
+config CMD_AT91MUX
+	bool "at91mux"
+	default y
+	depends on ARCH_AT91
+	help
+	  List MUX configuration
+
+	  Usage: at91mux [-pn]
+
+	  Dump current MUX configuration. If a BANK or PIN has been
+	  specified dump pin details.
+
+	  Options:
+	  -p PIN   pin number
+	  -b BANK  bank number
+
 config CMD_ARM_CPUINFO
 	bool "cpuinfo command"
 	default y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 13/19] commands: HUSH_GETOPT -> CMD_GETOPT
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (11 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 12/19] commands: move CMD_AT91MIX " Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 14/19] commands: let all network commands depend on NET Holger Schurig
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 arch/arm/configs/chumbyone_defconfig            |    2 +-
 arch/arm/configs/mioa701_defconfig              |    2 +-
 arch/arm/configs/phytec-phycard-omap3_defconfig |    2 +-
 arch/arm/configs/phytec-phycard-omap4_defconfig |    2 +-
 arch/arm/configs/solidrun_cubox_defconfig       |    2 +-
 arch/arm/configs/tx51stk5_defconfig             |    2 +-
 arch/mips/configs/dlink-dir-320_defconfig       |    2 +-
 arch/mips/configs/loongson-ls1b_defconfig       |    2 +-
 arch/mips/configs/qemu-malta_defconfig          |    2 +-
 arch/mips/configs/ritmix-rzx50_defconfig        |    2 +-
 arch/ppc/configs/da923rc_defconfig              |    2 +-
 commands/Kconfig                                |   15 +++++++++++++++
 common/Kconfig                                  |   11 ++---------
 common/hush.c                                   |    8 ++++----
 14 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index 228a7b2..f73ff8d 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -9,7 +9,7 @@ CONFIG_PROMPT="chumby:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_PARTITION=y
diff --git a/arch/arm/configs/mioa701_defconfig b/arch/arm/configs/mioa701_defconfig
index 841b9be..2046880 100644
--- a/arch/arm/configs/mioa701_defconfig
+++ b/arch/arm/configs/mioa701_defconfig
@@ -15,7 +15,7 @@ CONFIG_KALLSYMS=y
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index 95383aa..12bfd26 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -44,7 +44,7 @@ CONFIG_SHELL_HUSH=y
 CONFIG_GLOB=y
 CONFIG_PROMPT_HUSH_PS2="> "
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index 2b7548b..e3e7688 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -11,7 +11,7 @@ CONFIG_PROMPT="barebox> "
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 # CONFIG_TIMESTAMP is not set
diff --git a/arch/arm/configs/solidrun_cubox_defconfig b/arch/arm/configs/solidrun_cubox_defconfig
index eca7d7f..2937949 100644
--- a/arch/arm/configs/solidrun_cubox_defconfig
+++ b/arch/arm/configs/solidrun_cubox_defconfig
@@ -12,7 +12,7 @@ CONFIG_KALLSYMS=y
 CONFIG_RELOCATABLE=y
 CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/arm/configs/tx51stk5_defconfig b/arch/arm/configs/tx51stk5_defconfig
index b05c01d..5c7c489 100644
--- a/arch/arm/configs/tx51stk5_defconfig
+++ b/arch/arm/configs/tx51stk5_defconfig
@@ -37,7 +37,7 @@ CONFIG_LONGHELP=y
 CONFIG_SHELL_HUSH=y
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_DYNAMIC_CRC_TABLE=y
diff --git a/arch/mips/configs/dlink-dir-320_defconfig b/arch/mips/configs/dlink-dir-320_defconfig
index 3cd16c9..c35ea18 100644
--- a/arch/mips/configs/dlink-dir-320_defconfig
+++ b/arch/mips/configs/dlink-dir-320_defconfig
@@ -4,7 +4,7 @@ CONFIG_BROKEN=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/mips/configs/loongson-ls1b_defconfig b/arch/mips/configs/loongson-ls1b_defconfig
index bc48aba..8e04170 100644
--- a/arch/mips/configs/loongson-ls1b_defconfig
+++ b/arch/mips/configs/loongson-ls1b_defconfig
@@ -8,7 +8,7 @@ CONFIG_EXPERIMENTAL=y
 CONFIG_MALLOC_TLSF=y
 CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index 1b9ee9a..3206222 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -6,7 +6,7 @@ CONFIG_BROKEN=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
diff --git a/arch/mips/configs/ritmix-rzx50_defconfig b/arch/mips/configs/ritmix-rzx50_defconfig
index 7691bae..62f23b2 100644
--- a/arch/mips/configs/ritmix-rzx50_defconfig
+++ b/arch/mips/configs/ritmix-rzx50_defconfig
@@ -6,7 +6,7 @@ CONFIG_PBL_IMAGE=y
 CONFIG_BAUDRATE=57600
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig
index 3b5292a..cdcc10e 100644
--- a/arch/ppc/configs/da923rc_defconfig
+++ b/arch/ppc/configs/da923rc_defconfig
@@ -3,7 +3,7 @@ CONFIG_DA923RC=y
 CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000
 CONFIG_BANNER=y
 CONFIG_CMD_READLINE=y
-CONFIG_HUSH_GETOPT=y
+CONFIG_CMD_GETOPT=y
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_CMDLINE_EDITING=y
diff --git a/commands/Kconfig b/commands/Kconfig
index 47ac352..a8f081e 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -951,6 +951,21 @@ config CMD_FALSE
 	help
 	  Do nothing, unsuccessfully
 
+config CMD_GETOPT
+	bool
+	depends on SHELL_HUSH
+	prompt "getopt"
+	help
+	  Parse option arguments
+
+	  Usage: getopt OPTSTRING VAR
+
+	  OPTSTRING contains the option letters. Add a colon to an
+	  options if this Option has a required argument or two colons
+	  for an optional argument. The Current option is saved in
+	  VAR, arguments are saved in $OPTARG. Any n-option arguments
+	  can be accessed starting from $1.
+
 config CMD_LET
 	tristate
 	prompt "let"
diff --git a/common/Kconfig b/common/Kconfig
index 20ce60c..7a92a59 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -369,13 +369,6 @@ config HUSH_FANCY_PROMPT
 	  Allow to set PS1 from the command line. PS1 can have several escaped commands
 	  like \h for the 'model' string or \w for the current working directory.
 
-config HUSH_GETOPT
-	bool
-	depends on SHELL_HUSH
-	prompt "enable builtin getopt"
-	help
-	  This enables a getopt function builtin to hush.
-
 config CMDLINE_EDITING
 	depends on !SHELL_NONE
 	bool
@@ -586,7 +579,7 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW
 	bool
 	depends on DEFAULT_ENVIRONMENT
 	depends on SHELL_HUSH
-	select HUSH_GETOPT
+	select CMD_GETOPT
 	select GLOB
 	select GLOB_SORT
 	select CMD_GLOBAL
@@ -616,7 +609,7 @@ config DEFAULT_ENVIRONMENT_GENERIC
 	depends on !HAVE_DEFAULT_ENVIRONMENT_NEW
 	depends on DEFAULT_ENVIRONMENT
 	depends on SHELL_HUSH
-	select HUSH_GETOPT
+	select CMD_GETOPT
 	select CMD_CRC
 	select CMD_CRC_CMP
 	select CMD_AUTOMOUNT if HAVE_DEFAULT_ENVIRONMENT_NEW
diff --git a/common/hush.c b/common/hush.c
index 92f9576..09239cd 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -533,7 +533,7 @@ static void setup_string_in_str(struct in_str *i, const char *s)
 	i->p = s;
 }
 
-#ifdef CONFIG_HUSH_GETOPT
+#ifdef CONFIG_CMD_GETOPT
 static int builtin_getopt(struct p_context *ctx, struct child_prog *child,
 		int argc, char *argv[])
 {
@@ -823,7 +823,7 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi)
 	remove_quotes(globbuf.gl_pathc, globbuf.gl_pathv);
 
 	if (!strcmp(globbuf.gl_pathv[0], "getopt") &&
-			IS_ENABLED(CONFIG_HUSH_GETOPT)) {
+			IS_ENABLED(CONFIG_CMD_GETOPT)) {
 		ret = builtin_getopt(ctx, child, globbuf.gl_pathc, globbuf.gl_pathv);
 	} else if (!strcmp(globbuf.gl_pathv[0], "exit")) {
 		ret = builtin_exit(ctx, child, globbuf.gl_pathc, globbuf.gl_pathv);
@@ -1154,7 +1154,7 @@ static void initialize_context(struct p_context *ctx)
 
 static void release_context(struct p_context *ctx)
 {
-#ifdef CONFIG_HUSH_GETOPT
+#ifdef CONFIG_CMD_GETOPT
 	struct option *opt, *tmp;
 
 	list_for_each_entry_safe(opt, tmp, &ctx->options, list) {
@@ -2000,7 +2000,7 @@ BAREBOX_CMD_START(exit)
 	BAREBOX_CMD_HELP(cmd_exit_help)
 BAREBOX_CMD_END
 
-#ifdef CONFIG_HUSH_GETOPT
+#ifdef CONFIG_CMD_GETOPT
 BAREBOX_CMD_HELP_START(getopt)
 BAREBOX_CMD_HELP_TEXT("OPTSTRING contains the option letters. Add a colon to an options if this")
 BAREBOX_CMD_HELP_TEXT("option has a required argument or two colons for an optional argument. The")
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 14/19] commands: let all network commands depend on NET
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (12 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 13/19] commands: HUSH_GETOPT -> CMD_GETOPT Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 15/19] commands: introduce CMD_HOST Holger Schurig
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

... by using an "if NET" ... "endif" clause.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 commands/Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/commands/Kconfig b/commands/Kconfig
index a8f081e..2f24cd5 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1048,6 +1048,7 @@ endmenu
 
 
 
+if NET
 
 menu "Network"
 
@@ -1083,6 +1084,9 @@ config CMD_TFTP
 # end Network commands
 endmenu
 
+# end if NET
+endif
+
 
 
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 15/19] commands: introduce CMD_HOST
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (13 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 14/19] commands: let all network commands depend on NET Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 16/19] commands: NET_PING -> CMD_PING Holger Schurig
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

... because NET_RESOLV can be used alone to turn on the functionality
of resolv().

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 commands/Kconfig |    9 +++++++++
 net/dns.c        |    3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 2f24cd5..966d5fd 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1052,6 +1052,15 @@ if NET
 
 menu "Network"
 
+config CMD_HOST
+	tristate
+	select NET_RESOLV
+	prompt "host"
+	help
+	  Resolv a hostname.
+
+	  Usage: host DESTINATION
+
 config CMD_MIITOOL
 	tristate
 	depends on PHYLIB
diff --git a/net/dns.c b/net/dns.c
index 4506baf..0a8ce8b 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -241,6 +241,7 @@ IPaddr_t resolv(char *host)
 	return dns_ip;
 }
 
+#ifdef CONFIG_CMD_HOST
 static int do_host(int argc, char *argv[])
 {
 	IPaddr_t ip;
@@ -266,4 +267,4 @@ BAREBOX_CMD_START(host)
 	BAREBOX_CMD_OPTS("HOSTNAME")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
-
+#endif
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 16/19] commands: NET_PING -> CMD_PING
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (14 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 15/19] commands: introduce CMD_HOST Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 17/19] commands: NET_DHCP -> CMD_DHCP Holger Schurig
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 arch/arm/configs/a9m2410_defconfig                   |    2 +-
 arch/arm/configs/a9m2440_defconfig                   |    2 +-
 arch/arm/configs/am335x_beaglebone_defconfig         |    2 +-
 arch/arm/configs/animeo_ip_defconfig                 |    2 +-
 arch/arm/configs/archosg9_defconfig                  |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig              |    2 +-
 arch/arm/configs/at91sam9260ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9261ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9261ek_first_stage_defconfig |    2 +-
 arch/arm/configs/at91sam9263ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9g10ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9g20ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9m10g45ek_defconfig          |    2 +-
 arch/arm/configs/at91sam9m10ihd_defconfig            |    2 +-
 arch/arm/configs/at91sam9n12ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9x5ek_defconfig              |    2 +-
 arch/arm/configs/ccmx51_defconfig                    |    2 +-
 arch/arm/configs/chumbyone_defconfig                 |    2 +-
 arch/arm/configs/cupid_defconfig                     |    2 +-
 arch/arm/configs/datamodul-edm-qmx6_defconfig        |    2 +-
 arch/arm/configs/dss11_defconfig                     |    2 +-
 arch/arm/configs/edb93xx_defconfig                   |    2 +-
 arch/arm/configs/efika-mx-smartbook_defconfig        |    2 +-
 arch/arm/configs/eukrea_cpuimx25_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx27_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx35_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx51_defconfig           |    2 +-
 arch/arm/configs/freescale-mx21-ads_defconfig        |    2 +-
 arch/arm/configs/freescale-mx25-3ds_defconfig        |    2 +-
 arch/arm/configs/freescale-mx27-ads_defconfig        |    2 +-
 arch/arm/configs/freescale-mx28-evk_defconfig        |    2 +-
 arch/arm/configs/freescale-mx35-3ds_defconfig        |    2 +-
 arch/arm/configs/freescale-mx51-babbage_defconfig    |    2 +-
 arch/arm/configs/freescale-mx53-qsb_defconfig        |    2 +-
 arch/arm/configs/freescale-mx53-smd_defconfig        |    2 +-
 arch/arm/configs/freescale-mx6-arm2_defconfig        |    2 +-
 arch/arm/configs/freescale-mx6-sabrelite_defconfig   |    2 +-
 arch/arm/configs/freescale-mx6-sabresd_defconfig     |    2 +-
 arch/arm/configs/friendlyarm_mini2440_defconfig      |    2 +-
 arch/arm/configs/friendlyarm_mini6410_defconfig      |    2 +-
 arch/arm/configs/friendlyarm_tiny6410_defconfig      |    2 +-
 arch/arm/configs/highbank_defconfig                  |    2 +-
 arch/arm/configs/imx233-olinuxino_defconfig          |    2 +-
 arch/arm/configs/imx_v7_defconfig                    |    2 +-
 arch/arm/configs/mmccpu_defconfig                    |    2 +-
 arch/arm/configs/neso_defconfig                      |    2 +-
 arch/arm/configs/netx_nxdb500_defconfig              |    2 +-
 arch/arm/configs/nhk8815_defconfig                   |    2 +-
 arch/arm/configs/omap3530_beagle_defconfig           |    2 +-
 arch/arm/configs/panda_defconfig                     |    2 +-
 arch/arm/configs/phytec-phycard-imx27_defconfig      |    2 +-
 arch/arm/configs/phytec-phycard-omap3_defconfig      |    2 +-
 arch/arm/configs/phytec-phycard-omap4_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-am335x_defconfig     |    2 +-
 arch/arm/configs/phytec-phycore-imx27_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-imx31_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-imx35_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-omap4460_defconfig   |    2 +-
 arch/arm/configs/phytec-phycore-pxa270_defconfig     |    2 +-
 arch/arm/configs/pm9261_defconfig                    |    2 +-
 arch/arm/configs/pm9263_defconfig                    |    2 +-
 arch/arm/configs/pm9g45_defconfig                    |    2 +-
 arch/arm/configs/qil_a9260_128mib_defconfig          |    2 +-
 arch/arm/configs/qil_a9260_defconfig                 |    2 +-
 arch/arm/configs/qil_a9g20_128mib_defconfig          |    2 +-
 arch/arm/configs/qil_a9g20_defconfig                 |    2 +-
 arch/arm/configs/rockchip_defconfig                  |    2 +-
 arch/arm/configs/sama5d3xek_defconfig                |    2 +-
 arch/arm/configs/scb9328_defconfig                   |    2 +-
 arch/arm/configs/socfpga_defconfig                   |    2 +-
 arch/arm/configs/telit_evk_pro3_defconfig            |    2 +-
 arch/arm/configs/tny_a9260_defconfig                 |    2 +-
 arch/arm/configs/tny_a9263_defconfig                 |    2 +-
 arch/arm/configs/tny_a9g20_defconfig                 |    2 +-
 arch/arm/configs/tqma53_defconfig                    |    2 +-
 arch/arm/configs/tx25stk5_defconfig                  |    2 +-
 arch/arm/configs/tx51stk5_defconfig                  |    2 +-
 arch/arm/configs/tx53stk5_defconfig                  |    2 +-
 arch/arm/configs/usb_a9260_defconfig                 |    2 +-
 arch/arm/configs/usb_a9263_128mib_defconfig          |    2 +-
 arch/arm/configs/usb_a9263_defconfig                 |    2 +-
 arch/arm/configs/usb_a9g20_128mib_defconfig          |    2 +-
 arch/arm/configs/usb_a9g20_defconfig                 |    2 +-
 arch/arm/configs/versatilepb_defconfig               |    2 +-
 arch/arm/configs/vexpress_ca9_defconfig              |    2 +-
 arch/arm/configs/vexpress_defconfig                  |    2 +-
 arch/arm/configs/vincell_defconfig                   |    2 +-
 arch/blackfin/configs/ipe337_defconfig               |    2 +-
 arch/mips/configs/dlink-dir-320_defconfig            |    2 +-
 arch/mips/configs/qemu-malta_defconfig               |    2 +-
 arch/nios2/configs/generic_defconfig                 |    2 +-
 arch/openrisc/configs/generic_defconfig              |    2 +-
 arch/ppc/configs/da923rc_defconfig                   |    2 +-
 arch/ppc/configs/p1022ds_defconfig                   |    2 +-
 arch/ppc/configs/p2020rdb_defconfig                  |    2 +-
 arch/ppc/configs/pcm030_defconfig                    |    2 +-
 arch/sandbox/configs/sandbox_defconfig               |    2 +-
 commands/Kconfig                                     |    8 ++++++++
 net/Kconfig                                          |    4 ----
 net/Makefile                                         |    2 +-
 100 files changed, 106 insertions(+), 102 deletions(-)

diff --git a/arch/arm/configs/a9m2410_defconfig b/arch/arm/configs/a9m2410_defconfig
index a69b0f9..c4cb564 100644
--- a/arch/arm/configs/a9m2410_defconfig
+++ b/arch/arm/configs/a9m2410_defconfig
@@ -28,7 +28,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_SMC91111=y
diff --git a/arch/arm/configs/a9m2440_defconfig b/arch/arm/configs/a9m2440_defconfig
index c4c4e1e..b46a847 100644
--- a/arch/arm/configs/a9m2440_defconfig
+++ b/arch/arm/configs/a9m2440_defconfig
@@ -30,7 +30,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_SMC91111=y
diff --git a/arch/arm/configs/am335x_beaglebone_defconfig b/arch/arm/configs/am335x_beaglebone_defconfig
index 857b89c..8adcd15 100644
--- a/arch/arm/configs/am335x_beaglebone_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_defconfig
@@ -62,7 +62,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index e076162..31290bd 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_WD_DEFAULT_TIMOUT=16
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_MICREL_PHY=y
 CONFIG_DRIVER_NET_MACB=y
 CONFIG_NET_USB=y
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index 40e4433..a0bcc1f 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -66,7 +66,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index cc63445..3593c14 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 9c5c7d5..2486314 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index ac5c663..25469a8 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
index c4bc207..2b5162a 100644
--- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig
+++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_DM9K=y
 CONFIG_DRIVER_SPI_ATMEL=y
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index e78849a..f2a0aa5 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index b22969c..3bb1e55 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig
index af10c6c..1a69fec 100644
--- a/arch/arm/configs/at91sam9g20ek_defconfig
+++ b/arch/arm/configs/at91sam9g20ek_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 7e05e95..0898410 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -56,7 +56,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9m10ihd_defconfig b/arch/arm/configs/at91sam9m10ihd_defconfig
index 2faaa68..174039b 100644
--- a/arch/arm/configs/at91sam9m10ihd_defconfig
+++ b/arch/arm/configs/at91sam9m10ihd_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_SPI=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig
index 55cf5bc..132083d 100644
--- a/arch/arm/configs/at91sam9n12ek_defconfig
+++ b/arch/arm/configs/at91sam9n12ek_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_KS8851_MLL=y
 CONFIG_DRIVER_SPI_ATMEL=y
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index d2cdaf2..0af68f9 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_MACB=y
 CONFIG_NET_USB=y
diff --git a/arch/arm/configs/ccmx51_defconfig b/arch/arm/configs/ccmx51_defconfig
index b406686..ff201fd 100644
--- a/arch/arm/configs/ccmx51_defconfig
+++ b/arch/arm/configs/ccmx51_defconfig
@@ -42,7 +42,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_SMC911X=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 CONFIG_I2C=y
diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index f73ff8d..35c90e3 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -35,7 +35,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/cupid_defconfig b/arch/arm/configs/cupid_defconfig
index e2ad9c6..a49df4b 100644
--- a/arch/arm/configs/cupid_defconfig
+++ b/arch/arm/configs/cupid_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/datamodul-edm-qmx6_defconfig b/arch/arm/configs/datamodul-edm-qmx6_defconfig
index 30e5a53..bc39b74 100644
--- a/arch/arm/configs/datamodul-edm-qmx6_defconfig
+++ b/arch/arm/configs/datamodul-edm-qmx6_defconfig
@@ -68,7 +68,7 @@ CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
diff --git a/arch/arm/configs/dss11_defconfig b/arch/arm/configs/dss11_defconfig
index b4fcf01..9665c7c 100644
--- a/arch/arm/configs/dss11_defconfig
+++ b/arch/arm/configs/dss11_defconfig
@@ -19,7 +19,7 @@ CONFIG_CMD_LED=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/edb93xx_defconfig b/arch/arm/configs/edb93xx_defconfig
index 86b1040..1fa3257 100644
--- a/arch/arm/configs/edb93xx_defconfig
+++ b/arch/arm/configs/edb93xx_defconfig
@@ -25,7 +25,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_EP93XX=y
diff --git a/arch/arm/configs/efika-mx-smartbook_defconfig b/arch/arm/configs/efika-mx-smartbook_defconfig
index f436d0d..eb03a8e 100644
--- a/arch/arm/configs/efika-mx-smartbook_defconfig
+++ b/arch/arm/configs/efika-mx-smartbook_defconfig
@@ -73,7 +73,7 @@ CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index 4f8a95c..172be3c 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/eukrea_cpuimx27_defconfig b/arch/arm/configs/eukrea_cpuimx27_defconfig
index 97b4291..7d0d430 100644
--- a/arch/arm/configs/eukrea_cpuimx27_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx27_defconfig
@@ -38,7 +38,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index 88e1e3d..b1d65bf 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -54,7 +54,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/eukrea_cpuimx51_defconfig b/arch/arm/configs/eukrea_cpuimx51_defconfig
index 3f5d817..fb53f40 100644
--- a/arch/arm/configs/eukrea_cpuimx51_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx51_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/freescale-mx21-ads_defconfig b/arch/arm/configs/freescale-mx21-ads_defconfig
index 05f21d3..c2a4933 100644
--- a/arch/arm/configs/freescale-mx21-ads_defconfig
+++ b/arch/arm/configs/freescale-mx21-ads_defconfig
@@ -27,7 +27,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_CS8900=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
diff --git a/arch/arm/configs/freescale-mx25-3ds_defconfig b/arch/arm/configs/freescale-mx25-3ds_defconfig
index 57d3465..c5a3272 100644
--- a/arch/arm/configs/freescale-mx25-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx25-3ds_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/freescale-mx27-ads_defconfig b/arch/arm/configs/freescale-mx27-ads_defconfig
index d374582..fb85181 100644
--- a/arch/arm/configs/freescale-mx27-ads_defconfig
+++ b/arch/arm/configs/freescale-mx27-ads_defconfig
@@ -29,7 +29,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_SPI_IMX=y
diff --git a/arch/arm/configs/freescale-mx28-evk_defconfig b/arch/arm/configs/freescale-mx28-evk_defconfig
index d06bac8..ffbfd44 100644
--- a/arch/arm/configs/freescale-mx28-evk_defconfig
+++ b/arch/arm/configs/freescale-mx28-evk_defconfig
@@ -32,7 +32,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_AUART=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/freescale-mx35-3ds_defconfig b/arch/arm/configs/freescale-mx35-3ds_defconfig
index e3f3262..f58ee87 100644
--- a/arch/arm/configs/freescale-mx35-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx35-3ds_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_SMC911X=y
diff --git a/arch/arm/configs/freescale-mx51-babbage_defconfig b/arch/arm/configs/freescale-mx51-babbage_defconfig
index 3d1ad31..8842952 100644
--- a/arch/arm/configs/freescale-mx51-babbage_defconfig
+++ b/arch/arm/configs/freescale-mx51-babbage_defconfig
@@ -59,7 +59,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/freescale-mx53-qsb_defconfig b/arch/arm/configs/freescale-mx53-qsb_defconfig
index 8365234..292a223 100644
--- a/arch/arm/configs/freescale-mx53-qsb_defconfig
+++ b/arch/arm/configs/freescale-mx53-qsb_defconfig
@@ -79,7 +79,7 @@ CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/freescale-mx53-smd_defconfig b/arch/arm/configs/freescale-mx53-smd_defconfig
index f18c436..b00cdfe 100644
--- a/arch/arm/configs/freescale-mx53-smd_defconfig
+++ b/arch/arm/configs/freescale-mx53-smd_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/freescale-mx6-arm2_defconfig b/arch/arm/configs/freescale-mx6-arm2_defconfig
index e071d1b..c336fbf 100644
--- a/arch/arm/configs/freescale-mx6-arm2_defconfig
+++ b/arch/arm/configs/freescale-mx6-arm2_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 CONFIG_NET_USB=y
diff --git a/arch/arm/configs/freescale-mx6-sabrelite_defconfig b/arch/arm/configs/freescale-mx6-sabrelite_defconfig
index 520c31a..20d9e98 100644
--- a/arch/arm/configs/freescale-mx6-sabrelite_defconfig
+++ b/arch/arm/configs/freescale-mx6-sabrelite_defconfig
@@ -63,7 +63,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/freescale-mx6-sabresd_defconfig b/arch/arm/configs/freescale-mx6-sabresd_defconfig
index 4f31cb7..1b7b9e5 100644
--- a/arch/arm/configs/freescale-mx6-sabresd_defconfig
+++ b/arch/arm/configs/freescale-mx6-sabresd_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/friendlyarm_mini2440_defconfig b/arch/arm/configs/friendlyarm_mini2440_defconfig
index 955e71b..e0fe43a 100644
--- a/arch/arm/configs/friendlyarm_mini2440_defconfig
+++ b/arch/arm/configs/friendlyarm_mini2440_defconfig
@@ -31,7 +31,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_DM9K=y
diff --git a/arch/arm/configs/friendlyarm_mini6410_defconfig b/arch/arm/configs/friendlyarm_mini6410_defconfig
index b80f8fb..ca0ff91 100644
--- a/arch/arm/configs/friendlyarm_mini6410_defconfig
+++ b/arch/arm/configs/friendlyarm_mini6410_defconfig
@@ -31,7 +31,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_DM9K=y
 # CONFIG_SPI is not set
diff --git a/arch/arm/configs/friendlyarm_tiny6410_defconfig b/arch/arm/configs/friendlyarm_tiny6410_defconfig
index 5246196..864405e 100644
--- a/arch/arm/configs/friendlyarm_tiny6410_defconfig
+++ b/arch/arm/configs/friendlyarm_tiny6410_defconfig
@@ -32,7 +32,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_DM9K=y
 # CONFIG_SPI is not set
diff --git a/arch/arm/configs/highbank_defconfig b/arch/arm/configs/highbank_defconfig
index b034ed1..6793dba 100644
--- a/arch/arm/configs/highbank_defconfig
+++ b/arch/arm/configs/highbank_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_SERIAL_AMBA_PL011=y
diff --git a/arch/arm/configs/imx233-olinuxino_defconfig b/arch/arm/configs/imx233-olinuxino_defconfig
index 40b7e1d..aebf89b 100644
--- a/arch/arm/configs/imx233-olinuxino_defconfig
+++ b/arch/arm/configs/imx233-olinuxino_defconfig
@@ -39,7 +39,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_NET_TFTP_PUSH=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index b3157e3..75bcb48 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -96,7 +96,7 @@ CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/mmccpu_defconfig b/arch/arm/configs/mmccpu_defconfig
index 0e6914f..b6b4dfa 100644
--- a/arch/arm/configs/mmccpu_defconfig
+++ b/arch/arm/configs/mmccpu_defconfig
@@ -28,7 +28,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig
index 7e1cce8..f7f065c 100644
--- a/arch/arm/configs/neso_defconfig
+++ b/arch/arm/configs/neso_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/netx_nxdb500_defconfig b/arch/arm/configs/netx_nxdb500_defconfig
index 8e7a0b3..abf20ff 100644
--- a/arch/arm/configs/netx_nxdb500_defconfig
+++ b/arch/arm/configs/netx_nxdb500_defconfig
@@ -22,7 +22,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_NETX=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index 015b576..f5331ae 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -38,7 +38,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index e3eee8d..d0acb87 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -59,7 +59,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig
index c42140a..727afd1 100644
--- a/arch/arm/configs/panda_defconfig
+++ b/arch/arm/configs/panda_defconfig
@@ -59,7 +59,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/phytec-phycard-imx27_defconfig b/arch/arm/configs/phytec-phycard-imx27_defconfig
index 6e3a3ad..8694cb2 100644
--- a/arch/arm/configs/phytec-phycard-imx27_defconfig
+++ b/arch/arm/configs/phytec-phycard-imx27_defconfig
@@ -61,7 +61,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index 12bfd26..fcd5471 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -123,7 +123,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index e3e7688..0c25829 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -38,7 +38,7 @@ CONFIG_CMD_UNLZO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/phytec-phycore-am335x_defconfig b/arch/arm/configs/phytec-phycore-am335x_defconfig
index c74116b..f18e460 100644
--- a/arch/arm/configs/phytec-phycore-am335x_defconfig
+++ b/arch/arm/configs/phytec-phycore-am335x_defconfig
@@ -63,7 +63,7 @@ CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/phytec-phycore-imx27_defconfig b/arch/arm/configs/phytec-phycore-imx27_defconfig
index 07751ea..77e8377 100644
--- a/arch/arm/configs/phytec-phycore-imx27_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx27_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/phytec-phycore-imx31_defconfig b/arch/arm/configs/phytec-phycore-imx31_defconfig
index 2aa87fe..6bec9a5 100644
--- a/arch/arm/configs/phytec-phycore-imx31_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx31_defconfig
@@ -64,7 +64,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_SMC911X=y
diff --git a/arch/arm/configs/phytec-phycore-imx35_defconfig b/arch/arm/configs/phytec-phycore-imx35_defconfig
index 6674015..26e5725 100644
--- a/arch/arm/configs/phytec-phycore-imx35_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx35_defconfig
@@ -70,7 +70,7 @@ CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 # CONFIG_SPI is not set
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index 906dfea..80563f5 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -49,7 +49,7 @@ CONFIG_CMD_I2C=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 CONFIG_SMSC_PHY=y
diff --git a/arch/arm/configs/phytec-phycore-pxa270_defconfig b/arch/arm/configs/phytec-phycore-pxa270_defconfig
index 0e8d1b3..b67f6a7 100644
--- a/arch/arm/configs/phytec-phycore-pxa270_defconfig
+++ b/arch/arm/configs/phytec-phycore-pxa270_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_SERIAL_PXA=y
diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig
index 0aea2c9..c523473 100644
--- a/arch/arm/configs/pm9261_defconfig
+++ b/arch/arm/configs/pm9261_defconfig
@@ -38,7 +38,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/pm9263_defconfig b/arch/arm/configs/pm9263_defconfig
index c9a7141..cc5af5b 100644
--- a/arch/arm/configs/pm9263_defconfig
+++ b/arch/arm/configs/pm9263_defconfig
@@ -28,7 +28,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index d242bdc..692aa8d 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -37,7 +37,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
diff --git a/arch/arm/configs/qil_a9260_128mib_defconfig b/arch/arm/configs/qil_a9260_128mib_defconfig
index a19e083..4292845 100644
--- a/arch/arm/configs/qil_a9260_128mib_defconfig
+++ b/arch/arm/configs/qil_a9260_128mib_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig
index 67ca804..3bc1e17 100644
--- a/arch/arm/configs/qil_a9260_defconfig
+++ b/arch/arm/configs/qil_a9260_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/qil_a9g20_128mib_defconfig b/arch/arm/configs/qil_a9g20_128mib_defconfig
index 2c4a160..88ea874 100644
--- a/arch/arm/configs/qil_a9g20_128mib_defconfig
+++ b/arch/arm/configs/qil_a9g20_128mib_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig
index 5b2e9ef..05e6cdf 100644
--- a/arch/arm/configs/qil_a9g20_defconfig
+++ b/arch/arm/configs/qil_a9g20_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/rockchip_defconfig b/arch/arm/configs/rockchip_defconfig
index 3bc4a80..e8067ca 100644
--- a/arch/arm/configs/rockchip_defconfig
+++ b/arch/arm/configs/rockchip_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig
index 970ded5..030cb1f 100644
--- a/arch/arm/configs/sama5d3xek_defconfig
+++ b/arch/arm/configs/sama5d3xek_defconfig
@@ -55,7 +55,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_MICREL_PHY=y
 CONFIG_DRIVER_NET_MACB=y
diff --git a/arch/arm/configs/scb9328_defconfig b/arch/arm/configs/scb9328_defconfig
index 21a2571..0e90302 100644
--- a/arch/arm/configs/scb9328_defconfig
+++ b/arch/arm/configs/scb9328_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig
index 0c5a6a7..0758561 100644
--- a/arch/arm/configs/socfpga_defconfig
+++ b/arch/arm/configs/socfpga_defconfig
@@ -64,7 +64,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig
index 050d176..62e779b 100644
--- a/arch/arm/configs/telit_evk_pro3_defconfig
+++ b/arch/arm/configs/telit_evk_pro3_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig
index af22234..a3611be 100644
--- a/arch/arm/configs/tny_a9260_defconfig
+++ b/arch/arm/configs/tny_a9260_defconfig
@@ -54,7 +54,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig
index 652fd3d..5554eb1 100644
--- a/arch/arm/configs/tny_a9263_defconfig
+++ b/arch/arm/configs/tny_a9263_defconfig
@@ -54,7 +54,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig
index a84e90f..2995ce8 100644
--- a/arch/arm/configs/tny_a9g20_defconfig
+++ b/arch/arm/configs/tny_a9g20_defconfig
@@ -55,7 +55,7 @@ CONFIG_CMD_SPI=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/tqma53_defconfig b/arch/arm/configs/tqma53_defconfig
index 26e6b28..2d36bc0 100644
--- a/arch/arm/configs/tqma53_defconfig
+++ b/arch/arm/configs/tqma53_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
diff --git a/arch/arm/configs/tx25stk5_defconfig b/arch/arm/configs/tx25stk5_defconfig
index b499b5d..67620d3 100644
--- a/arch/arm/configs/tx25stk5_defconfig
+++ b/arch/arm/configs/tx25stk5_defconfig
@@ -62,7 +62,7 @@ CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
diff --git a/arch/arm/configs/tx51stk5_defconfig b/arch/arm/configs/tx51stk5_defconfig
index 5c7c489..4f9a345 100644
--- a/arch/arm/configs/tx51stk5_defconfig
+++ b/arch/arm/configs/tx51stk5_defconfig
@@ -105,7 +105,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_SERIAL_IMX=y
diff --git a/arch/arm/configs/tx53stk5_defconfig b/arch/arm/configs/tx53stk5_defconfig
index e0ab9c8..d9444d8 100644
--- a/arch/arm/configs/tx53stk5_defconfig
+++ b/arch/arm/configs/tx53stk5_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 CONFIG_MTD=y
 CONFIG_NAND=y
diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig
index 5f78c56..c3a5c31 100644
--- a/arch/arm/configs/usb_a9260_defconfig
+++ b/arch/arm/configs/usb_a9260_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig
index 71774f9..c9f8f56 100644
--- a/arch/arm/configs/usb_a9263_128mib_defconfig
+++ b/arch/arm/configs/usb_a9263_128mib_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 251c654..522aaff 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/usb_a9g20_128mib_defconfig b/arch/arm/configs/usb_a9g20_128mib_defconfig
index f4d412c..1e73e8f 100644
--- a/arch/arm/configs/usb_a9g20_128mib_defconfig
+++ b/arch/arm/configs/usb_a9g20_128mib_defconfig
@@ -59,7 +59,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig
index 3062fb4..3e5f2c4 100644
--- a/arch/arm/configs/usb_a9g20_defconfig
+++ b/arch/arm/configs/usb_a9g20_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/versatilepb_defconfig b/arch/arm/configs/versatilepb_defconfig
index 8daf9ae..7fe30f7 100644
--- a/arch/arm/configs/versatilepb_defconfig
+++ b/arch/arm/configs/versatilepb_defconfig
@@ -38,7 +38,7 @@ CONFIG_CMD_I2C=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/vexpress_ca9_defconfig b/arch/arm/configs/vexpress_ca9_defconfig
index f16a8ca..ba1aaf5 100644
--- a/arch/arm/configs/vexpress_ca9_defconfig
+++ b/arch/arm/configs/vexpress_ca9_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_SERIAL_AMBA_PL011=y
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index e166078..1b8e4ad 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_SERIAL_AMBA_PL011=y
diff --git a/arch/arm/configs/vincell_defconfig b/arch/arm/configs/vincell_defconfig
index ac1f877..f788992 100644
--- a/arch/arm/configs/vincell_defconfig
+++ b/arch/arm/configs/vincell_defconfig
@@ -59,7 +59,7 @@ CONFIG_CMD_CLK=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 # CONFIG_SPI is not set
diff --git a/arch/blackfin/configs/ipe337_defconfig b/arch/blackfin/configs/ipe337_defconfig
index 086a971..881aa83 100644
--- a/arch/blackfin/configs/ipe337_defconfig
+++ b/arch/blackfin/configs/ipe337_defconfig
@@ -21,7 +21,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_SMC911X=y
diff --git a/arch/mips/configs/dlink-dir-320_defconfig b/arch/mips/configs/dlink-dir-320_defconfig
index c35ea18..e9276aa 100644
--- a/arch/mips/configs/dlink-dir-320_defconfig
+++ b/arch/mips/configs/dlink-dir-320_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index 3206222..0643e3d 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/nios2/configs/generic_defconfig b/arch/nios2/configs/generic_defconfig
index 4189990..9f9c85e 100644
--- a/arch/nios2/configs/generic_defconfig
+++ b/arch/nios2/configs/generic_defconfig
@@ -25,7 +25,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_TSE=y
 CONFIG_MTD=y
 CONFIG_DRIVER_CFI=y
diff --git a/arch/openrisc/configs/generic_defconfig b/arch/openrisc/configs/generic_defconfig
index 53ff671..03242bb 100644
--- a/arch/openrisc/configs/generic_defconfig
+++ b/arch/openrisc/configs/generic_defconfig
@@ -20,7 +20,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_DRIVER_NET_ETHOC=y
diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig
index cdcc10e..a6d38fd 100644
--- a/arch/ppc/configs/da923rc_defconfig
+++ b/arch/ppc/configs/da923rc_defconfig
@@ -28,7 +28,7 @@ CONFIG_CMD_SLEEP=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_NET_TFTP_PUSH=y
 CONFIG_FS_TFTP=y
diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/ppc/configs/p1022ds_defconfig
index 878286b..c517336 100644
--- a/arch/ppc/configs/p1022ds_defconfig
+++ b/arch/ppc/configs/p1022ds_defconfig
@@ -35,7 +35,7 @@ CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_RELOCATABLE=y
 CONFIG_DRIVER_NET_GIANFAR=y
 CONFIG_NET=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_TFTP=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig
index c34e48d..817c9a0 100644
--- a/arch/ppc/configs/p2020rdb_defconfig
+++ b/arch/ppc/configs/p2020rdb_defconfig
@@ -38,7 +38,7 @@ CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_RELOCATABLE=y
 CONFIG_DRIVER_NET_GIANFAR=y
 CONFIG_NET=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_TFTP=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/ppc/configs/pcm030_defconfig b/arch/ppc/configs/pcm030_defconfig
index 9743841..da82fad 100644
--- a/arch/ppc/configs/pcm030_defconfig
+++ b/arch/ppc/configs/pcm030_defconfig
@@ -30,7 +30,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_ARCH_MPC5XXX=y
diff --git a/arch/sandbox/configs/sandbox_defconfig b/arch/sandbox/configs/sandbox_defconfig
index 2ef8fa4..e651838 100644
--- a/arch/sandbox/configs/sandbox_defconfig
+++ b/arch/sandbox/configs/sandbox_defconfig
@@ -22,7 +22,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
-CONFIG_NET_PING=y
+CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_TAP=y
 # CONFIG_SPI is not set
 CONFIG_FS_CRAMFS=y
diff --git a/commands/Kconfig b/commands/Kconfig
index 966d5fd..c4e1d97 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1072,6 +1072,14 @@ config CMD_MIITOOL
 	  detailed MII status information, such as MII capabilities,
 	  current advertising mode, and link partner capabilities.
 
+config CMD_PING
+	tristate
+	prompt "ping"
+	help
+	  Send ICMP echo requests.
+
+	  Usage: ping DESTINATION
+
 config CMD_TFTP
 	depends on FS_TFTP
 	tristate
diff --git a/net/Kconfig b/net/Kconfig
index 59b6417..e1acd3c 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -11,10 +11,6 @@ config NET_NFS
 	bool
 	prompt "nfs support"
 
-config NET_PING
-	bool
-	prompt "ping support"
-
 config NET_NETCONSOLE
 	bool
 	depends on !CONSOLE_NONE
diff --git a/net/Makefile b/net/Makefile
index fabb17e..e0bb6bb 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -2,7 +2,7 @@ obj-$(CONFIG_NET_DHCP)	+= dhcp.o
 obj-$(CONFIG_NET)	+= eth.o
 obj-$(CONFIG_NET)	+= net.o
 obj-$(CONFIG_NET_NFS)	+= nfs.o
-obj-$(CONFIG_NET_PING)	+= ping.o
+obj-$(CONFIG_CMD_PING)	+= ping.o
 obj-$(CONFIG_NET_RESOLV)+= dns.o
 obj-$(CONFIG_NET_NETCONSOLE) += netconsole.o
 obj-$(CONFIG_NET_IFUP)	+= ifup.o
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 17/19] commands: NET_DHCP -> CMD_DHCP
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (15 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 16/19] commands: NET_PING -> CMD_PING Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 18/19] commands: move CMD_IFUP to commands/Kconfig Holger Schurig
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 arch/arm/configs/a9m2410_defconfig                   |    2 +-
 arch/arm/configs/a9m2440_defconfig                   |    2 +-
 arch/arm/configs/am335x_beaglebone_defconfig         |    2 +-
 arch/arm/configs/animeo_ip_defconfig                 |    2 +-
 arch/arm/configs/archosg9_defconfig                  |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig              |    2 +-
 arch/arm/configs/at91sam9260ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9261ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9261ek_first_stage_defconfig |    2 +-
 arch/arm/configs/at91sam9263ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9g10ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9g20ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9m10g45ek_defconfig          |    2 +-
 arch/arm/configs/at91sam9m10ihd_defconfig            |    2 +-
 arch/arm/configs/at91sam9n12ek_defconfig             |    2 +-
 arch/arm/configs/at91sam9x5ek_defconfig              |    2 +-
 arch/arm/configs/ccmx51_defconfig                    |    2 +-
 arch/arm/configs/chumbyone_defconfig                 |    2 +-
 arch/arm/configs/cupid_defconfig                     |    2 +-
 arch/arm/configs/datamodul-edm-qmx6_defconfig        |    2 +-
 arch/arm/configs/dss11_defconfig                     |    2 +-
 arch/arm/configs/edb93xx_defconfig                   |    2 +-
 arch/arm/configs/efika-mx-smartbook_defconfig        |    2 +-
 arch/arm/configs/eukrea_cpuimx25_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx27_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx35_defconfig           |    2 +-
 arch/arm/configs/eukrea_cpuimx51_defconfig           |    2 +-
 arch/arm/configs/freescale-mx21-ads_defconfig        |    2 +-
 arch/arm/configs/freescale-mx25-3ds_defconfig        |    2 +-
 arch/arm/configs/freescale-mx27-ads_defconfig        |    2 +-
 arch/arm/configs/freescale-mx28-evk_defconfig        |    2 +-
 arch/arm/configs/freescale-mx35-3ds_defconfig        |    2 +-
 arch/arm/configs/freescale-mx51-babbage_defconfig    |    2 +-
 arch/arm/configs/freescale-mx53-qsb_defconfig        |    2 +-
 arch/arm/configs/freescale-mx53-smd_defconfig        |    2 +-
 arch/arm/configs/freescale-mx6-arm2_defconfig        |    2 +-
 arch/arm/configs/freescale-mx6-sabrelite_defconfig   |    2 +-
 arch/arm/configs/freescale-mx6-sabresd_defconfig     |    2 +-
 arch/arm/configs/friendlyarm_mini2440_defconfig      |    2 +-
 arch/arm/configs/friendlyarm_mini6410_defconfig      |    2 +-
 arch/arm/configs/friendlyarm_tiny6410_defconfig      |    2 +-
 arch/arm/configs/highbank_defconfig                  |    2 +-
 arch/arm/configs/imx233-olinuxino_defconfig          |    2 +-
 arch/arm/configs/imx_v7_defconfig                    |    2 +-
 arch/arm/configs/mmccpu_defconfig                    |    2 +-
 arch/arm/configs/neso_defconfig                      |    2 +-
 arch/arm/configs/netx_nxdb500_defconfig              |    2 +-
 arch/arm/configs/nhk8815_defconfig                   |    2 +-
 arch/arm/configs/omap3530_beagle_defconfig           |    2 +-
 arch/arm/configs/panda_defconfig                     |    2 +-
 arch/arm/configs/phytec-phycard-imx27_defconfig      |    2 +-
 arch/arm/configs/phytec-phycard-omap3_defconfig      |    2 +-
 arch/arm/configs/phytec-phycard-omap4_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-am335x_defconfig     |    2 +-
 arch/arm/configs/phytec-phycore-imx27_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-imx31_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-imx35_defconfig      |    2 +-
 arch/arm/configs/phytec-phycore-omap4460_defconfig   |    2 +-
 arch/arm/configs/phytec-phycore-pxa270_defconfig     |    2 +-
 arch/arm/configs/pm9261_defconfig                    |    2 +-
 arch/arm/configs/pm9263_defconfig                    |    2 +-
 arch/arm/configs/pm9g45_defconfig                    |    2 +-
 arch/arm/configs/qil_a9260_128mib_defconfig          |    2 +-
 arch/arm/configs/qil_a9260_defconfig                 |    2 +-
 arch/arm/configs/qil_a9g20_128mib_defconfig          |    2 +-
 arch/arm/configs/qil_a9g20_defconfig                 |    2 +-
 arch/arm/configs/rockchip_defconfig                  |    2 +-
 arch/arm/configs/sama5d3xek_defconfig                |    2 +-
 arch/arm/configs/scb9328_defconfig                   |    2 +-
 arch/arm/configs/socfpga_defconfig                   |    2 +-
 arch/arm/configs/telit_evk_pro3_defconfig            |    2 +-
 arch/arm/configs/tny_a9260_defconfig                 |    2 +-
 arch/arm/configs/tny_a9263_defconfig                 |    2 +-
 arch/arm/configs/tny_a9g20_defconfig                 |    2 +-
 arch/arm/configs/tqma53_defconfig                    |    2 +-
 arch/arm/configs/tx25stk5_defconfig                  |    2 +-
 arch/arm/configs/tx28stk5_defconfig                  |    2 +-
 arch/arm/configs/tx51stk5_defconfig                  |    2 +-
 arch/arm/configs/tx53stk5_defconfig                  |    2 +-
 arch/arm/configs/usb_a9260_defconfig                 |    2 +-
 arch/arm/configs/usb_a9263_128mib_defconfig          |    2 +-
 arch/arm/configs/usb_a9263_defconfig                 |    2 +-
 arch/arm/configs/usb_a9g20_128mib_defconfig          |    2 +-
 arch/arm/configs/usb_a9g20_defconfig                 |    2 +-
 arch/arm/configs/versatilepb_defconfig               |    2 +-
 arch/arm/configs/vexpress_ca9_defconfig              |    2 +-
 arch/arm/configs/vexpress_defconfig                  |    2 +-
 arch/arm/configs/vincell_defconfig                   |    2 +-
 arch/arm/configs/zedboard_defconfig                  |    2 +-
 arch/blackfin/configs/ipe337_defconfig               |    2 +-
 arch/mips/configs/dlink-dir-320_defconfig            |    2 +-
 arch/mips/configs/qemu-malta_defconfig               |    2 +-
 arch/openrisc/configs/generic_defconfig              |    2 +-
 arch/ppc/configs/pcm030_defconfig                    |    2 +-
 arch/sandbox/configs/sandbox_defconfig               |    2 +-
 commands/Kconfig                                     |   16 ++++++++++++++++
 net/Kconfig                                          |    4 ----
 net/Makefile                                         |    2 +-
 98 files changed, 112 insertions(+), 100 deletions(-)

diff --git a/arch/arm/configs/a9m2410_defconfig b/arch/arm/configs/a9m2410_defconfig
index c4cb564..d7b08f5 100644
--- a/arch/arm/configs/a9m2410_defconfig
+++ b/arch/arm/configs/a9m2410_defconfig
@@ -27,7 +27,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/a9m2440_defconfig b/arch/arm/configs/a9m2440_defconfig
index b46a847..59b16a8 100644
--- a/arch/arm/configs/a9m2440_defconfig
+++ b/arch/arm/configs/a9m2440_defconfig
@@ -29,7 +29,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/am335x_beaglebone_defconfig b/arch/arm/configs/am335x_beaglebone_defconfig
index 8adcd15..80c0ca5 100644
--- a/arch/arm/configs/am335x_beaglebone_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_defconfig
@@ -61,7 +61,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index 31290bd..ca8d2f1 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_WD=y
 CONFIG_CMD_WD_DEFAULT_TIMOUT=16
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_MICREL_PHY=y
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index a0bcc1f..0a6ad68 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -65,7 +65,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index 3593c14..6197b97 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 2486314..6e67f1f 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index 25469a8..591b5fe 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
index 2b5162a..6071aea 100644
--- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig
+++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index f2a0aa5..d7d147a 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -43,7 +43,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index 3bb1e55..9c12ed4 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -44,7 +44,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig
index 1a69fec..0faa485 100644
--- a/arch/arm/configs/at91sam9g20ek_defconfig
+++ b/arch/arm/configs/at91sam9g20ek_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 0898410..b088976 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -54,7 +54,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/at91sam9m10ihd_defconfig b/arch/arm/configs/at91sam9m10ihd_defconfig
index 174039b..c3df023 100644
--- a/arch/arm/configs/at91sam9m10ihd_defconfig
+++ b/arch/arm/configs/at91sam9m10ihd_defconfig
@@ -56,7 +56,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_SPI=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig
index 132083d..03fb063 100644
--- a/arch/arm/configs/at91sam9n12ek_defconfig
+++ b/arch/arm/configs/at91sam9n12ek_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index 0af68f9..93975d4 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -49,7 +49,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/ccmx51_defconfig b/arch/arm/configs/ccmx51_defconfig
index ff201fd..cc2baa2 100644
--- a/arch/arm/configs/ccmx51_defconfig
+++ b/arch/arm/configs/ccmx51_defconfig
@@ -41,7 +41,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_SMC911X=y
 CONFIG_DRIVER_NET_FEC_IMX=y
diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index 35c90e3..5eb5962 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -33,7 +33,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_SPLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/cupid_defconfig b/arch/arm/configs/cupid_defconfig
index a49df4b..6d5e3f5 100644
--- a/arch/arm/configs/cupid_defconfig
+++ b/arch/arm/configs/cupid_defconfig
@@ -49,7 +49,7 @@ CONFIG_CMD_SPLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/datamodul-edm-qmx6_defconfig b/arch/arm/configs/datamodul-edm-qmx6_defconfig
index bc39b74..1cbceca 100644
--- a/arch/arm/configs/datamodul-edm-qmx6_defconfig
+++ b/arch/arm/configs/datamodul-edm-qmx6_defconfig
@@ -67,7 +67,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/dss11_defconfig b/arch/arm/configs/dss11_defconfig
index 9665c7c..0785b9a 100644
--- a/arch/arm/configs/dss11_defconfig
+++ b/arch/arm/configs/dss11_defconfig
@@ -17,7 +17,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_LED=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/edb93xx_defconfig b/arch/arm/configs/edb93xx_defconfig
index 1fa3257..89b3ca8 100644
--- a/arch/arm/configs/edb93xx_defconfig
+++ b/arch/arm/configs/edb93xx_defconfig
@@ -24,7 +24,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/efika-mx-smartbook_defconfig b/arch/arm/configs/efika-mx-smartbook_defconfig
index eb03a8e..753e9b6 100644
--- a/arch/arm/configs/efika-mx-smartbook_defconfig
+++ b/arch/arm/configs/efika-mx-smartbook_defconfig
@@ -71,7 +71,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index 172be3c..e81fb70 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/eukrea_cpuimx27_defconfig b/arch/arm/configs/eukrea_cpuimx27_defconfig
index 7d0d430..6580dcb 100644
--- a/arch/arm/configs/eukrea_cpuimx27_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx27_defconfig
@@ -37,7 +37,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index b1d65bf..bec7336 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/eukrea_cpuimx51_defconfig b/arch/arm/configs/eukrea_cpuimx51_defconfig
index fb53f40..66bee63 100644
--- a/arch/arm/configs/eukrea_cpuimx51_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx51_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/freescale-mx21-ads_defconfig b/arch/arm/configs/freescale-mx21-ads_defconfig
index c2a4933..73d99b9 100644
--- a/arch/arm/configs/freescale-mx21-ads_defconfig
+++ b/arch/arm/configs/freescale-mx21-ads_defconfig
@@ -25,7 +25,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_CS8900=y
diff --git a/arch/arm/configs/freescale-mx25-3ds_defconfig b/arch/arm/configs/freescale-mx25-3ds_defconfig
index c5a3272..65d8f20 100644
--- a/arch/arm/configs/freescale-mx25-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx25-3ds_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/freescale-mx27-ads_defconfig b/arch/arm/configs/freescale-mx27-ads_defconfig
index fb85181..a8995ee 100644
--- a/arch/arm/configs/freescale-mx27-ads_defconfig
+++ b/arch/arm/configs/freescale-mx27-ads_defconfig
@@ -28,7 +28,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/freescale-mx28-evk_defconfig b/arch/arm/configs/freescale-mx28-evk_defconfig
index ffbfd44..b6a6320 100644
--- a/arch/arm/configs/freescale-mx28-evk_defconfig
+++ b/arch/arm/configs/freescale-mx28-evk_defconfig
@@ -31,7 +31,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_AUART=y
diff --git a/arch/arm/configs/freescale-mx35-3ds_defconfig b/arch/arm/configs/freescale-mx35-3ds_defconfig
index f58ee87..66436b5 100644
--- a/arch/arm/configs/freescale-mx35-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx35-3ds_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/freescale-mx51-babbage_defconfig b/arch/arm/configs/freescale-mx51-babbage_defconfig
index 8842952..708b564 100644
--- a/arch/arm/configs/freescale-mx51-babbage_defconfig
+++ b/arch/arm/configs/freescale-mx51-babbage_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/freescale-mx53-qsb_defconfig b/arch/arm/configs/freescale-mx53-qsb_defconfig
index 292a223..efcf284 100644
--- a/arch/arm/configs/freescale-mx53-qsb_defconfig
+++ b/arch/arm/configs/freescale-mx53-qsb_defconfig
@@ -77,7 +77,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/freescale-mx53-smd_defconfig b/arch/arm/configs/freescale-mx53-smd_defconfig
index b00cdfe..5ba62f5 100644
--- a/arch/arm/configs/freescale-mx53-smd_defconfig
+++ b/arch/arm/configs/freescale-mx53-smd_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/freescale-mx6-arm2_defconfig b/arch/arm/configs/freescale-mx6-arm2_defconfig
index c336fbf..7489c47 100644
--- a/arch/arm/configs/freescale-mx6-arm2_defconfig
+++ b/arch/arm/configs/freescale-mx6-arm2_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/freescale-mx6-sabrelite_defconfig b/arch/arm/configs/freescale-mx6-sabrelite_defconfig
index 20d9e98..48d1ed2 100644
--- a/arch/arm/configs/freescale-mx6-sabrelite_defconfig
+++ b/arch/arm/configs/freescale-mx6-sabrelite_defconfig
@@ -62,7 +62,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/freescale-mx6-sabresd_defconfig b/arch/arm/configs/freescale-mx6-sabresd_defconfig
index 1b7b9e5..0ad7cc9 100644
--- a/arch/arm/configs/freescale-mx6-sabresd_defconfig
+++ b/arch/arm/configs/freescale-mx6-sabresd_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/friendlyarm_mini2440_defconfig b/arch/arm/configs/friendlyarm_mini2440_defconfig
index e0fe43a..ed11014 100644
--- a/arch/arm/configs/friendlyarm_mini2440_defconfig
+++ b/arch/arm/configs/friendlyarm_mini2440_defconfig
@@ -30,7 +30,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/friendlyarm_mini6410_defconfig b/arch/arm/configs/friendlyarm_mini6410_defconfig
index ca0ff91..0d3f3e3 100644
--- a/arch/arm/configs/friendlyarm_mini6410_defconfig
+++ b/arch/arm/configs/friendlyarm_mini6410_defconfig
@@ -30,7 +30,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_DM9K=y
diff --git a/arch/arm/configs/friendlyarm_tiny6410_defconfig b/arch/arm/configs/friendlyarm_tiny6410_defconfig
index 864405e..1ab8c08 100644
--- a/arch/arm/configs/friendlyarm_tiny6410_defconfig
+++ b/arch/arm/configs/friendlyarm_tiny6410_defconfig
@@ -31,7 +31,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_DM9K=y
diff --git a/arch/arm/configs/highbank_defconfig b/arch/arm/configs/highbank_defconfig
index 6793dba..3e02c2e 100644
--- a/arch/arm/configs/highbank_defconfig
+++ b/arch/arm/configs/highbank_defconfig
@@ -46,7 +46,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/imx233-olinuxino_defconfig b/arch/arm/configs/imx233-olinuxino_defconfig
index aebf89b..3f444f1 100644
--- a/arch/arm/configs/imx233-olinuxino_defconfig
+++ b/arch/arm/configs/imx233-olinuxino_defconfig
@@ -37,7 +37,7 @@ CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_TFTP=y
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 75bcb48..0c32d7d 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -95,7 +95,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/mmccpu_defconfig b/arch/arm/configs/mmccpu_defconfig
index b6b4dfa..6390b56 100644
--- a/arch/arm/configs/mmccpu_defconfig
+++ b/arch/arm/configs/mmccpu_defconfig
@@ -27,7 +27,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig
index f7f065c..846eca0 100644
--- a/arch/arm/configs/neso_defconfig
+++ b/arch/arm/configs/neso_defconfig
@@ -49,7 +49,7 @@ CONFIG_CMD_SPLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/netx_nxdb500_defconfig b/arch/arm/configs/netx_nxdb500_defconfig
index abf20ff..745afc1 100644
--- a/arch/arm/configs/netx_nxdb500_defconfig
+++ b/arch/arm/configs/netx_nxdb500_defconfig
@@ -21,7 +21,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index f5331ae..f86b59c 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -36,7 +36,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index d0acb87..1ef4825 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig
index 727afd1..dab407c 100644
--- a/arch/arm/configs/panda_defconfig
+++ b/arch/arm/configs/panda_defconfig
@@ -58,7 +58,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/phytec-phycard-imx27_defconfig b/arch/arm/configs/phytec-phycard-imx27_defconfig
index 8694cb2..0d81544 100644
--- a/arch/arm/configs/phytec-phycard-imx27_defconfig
+++ b/arch/arm/configs/phytec-phycard-imx27_defconfig
@@ -60,7 +60,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index fcd5471..daff7ad 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -121,7 +121,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_DEVINFO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index 0c25829..cd9310e 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -36,7 +36,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNLZO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/phytec-phycore-am335x_defconfig b/arch/arm/configs/phytec-phycore-am335x_defconfig
index f18e460..edf204f 100644
--- a/arch/arm/configs/phytec-phycore-am335x_defconfig
+++ b/arch/arm/configs/phytec-phycore-am335x_defconfig
@@ -61,7 +61,7 @@ CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/phytec-phycore-imx27_defconfig b/arch/arm/configs/phytec-phycore-imx27_defconfig
index 77e8377..5cb9202 100644
--- a/arch/arm/configs/phytec-phycore-imx27_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx27_defconfig
@@ -49,7 +49,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/phytec-phycore-imx31_defconfig b/arch/arm/configs/phytec-phycore-imx31_defconfig
index 6bec9a5..7f19b4a 100644
--- a/arch/arm/configs/phytec-phycore-imx31_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx31_defconfig
@@ -63,7 +63,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/phytec-phycore-imx35_defconfig b/arch/arm/configs/phytec-phycore-imx35_defconfig
index 26e5725..91fab09 100644
--- a/arch/arm/configs/phytec-phycore-imx35_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx35_defconfig
@@ -68,7 +68,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index 80563f5..8d5543f 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/configs/phytec-phycore-pxa270_defconfig b/arch/arm/configs/phytec-phycore-pxa270_defconfig
index b67f6a7..b7bf190 100644
--- a/arch/arm/configs/phytec-phycore-pxa270_defconfig
+++ b/arch/arm/configs/phytec-phycore-pxa270_defconfig
@@ -47,7 +47,7 @@ CONFIG_CMD_SPLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig
index c523473..682c65f 100644
--- a/arch/arm/configs/pm9261_defconfig
+++ b/arch/arm/configs/pm9261_defconfig
@@ -36,7 +36,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/pm9263_defconfig b/arch/arm/configs/pm9263_defconfig
index cc5af5b..53e4a62 100644
--- a/arch/arm/configs/pm9263_defconfig
+++ b/arch/arm/configs/pm9263_defconfig
@@ -27,7 +27,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index 692aa8d..2079bcf 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -35,7 +35,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/qil_a9260_128mib_defconfig b/arch/arm/configs/qil_a9260_128mib_defconfig
index 4292845..c735bad 100644
--- a/arch/arm/configs/qil_a9260_128mib_defconfig
+++ b/arch/arm/configs/qil_a9260_128mib_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig
index 3bc1e17..8aa7528 100644
--- a/arch/arm/configs/qil_a9260_defconfig
+++ b/arch/arm/configs/qil_a9260_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/qil_a9g20_128mib_defconfig b/arch/arm/configs/qil_a9g20_128mib_defconfig
index 88ea874..1892399 100644
--- a/arch/arm/configs/qil_a9g20_128mib_defconfig
+++ b/arch/arm/configs/qil_a9g20_128mib_defconfig
@@ -51,7 +51,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig
index 05e6cdf..2ec9b6e 100644
--- a/arch/arm/configs/qil_a9g20_defconfig
+++ b/arch/arm/configs/qil_a9g20_defconfig
@@ -50,7 +50,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/rockchip_defconfig b/arch/arm/configs/rockchip_defconfig
index e8067ca..40442ac 100644
--- a/arch/arm/configs/rockchip_defconfig
+++ b/arch/arm/configs/rockchip_defconfig
@@ -44,7 +44,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig
index 030cb1f..c1cb0f6 100644
--- a/arch/arm/configs/sama5d3xek_defconfig
+++ b/arch/arm/configs/sama5d3xek_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/scb9328_defconfig b/arch/arm/configs/scb9328_defconfig
index 0e90302..f037a00 100644
--- a/arch/arm/configs/scb9328_defconfig
+++ b/arch/arm/configs/scb9328_defconfig
@@ -44,7 +44,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig
index 0758561..ca54a1a 100644
--- a/arch/arm/configs/socfpga_defconfig
+++ b/arch/arm/configs/socfpga_defconfig
@@ -63,7 +63,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig
index 62e779b..5924449 100644
--- a/arch/arm/configs/telit_evk_pro3_defconfig
+++ b/arch/arm/configs/telit_evk_pro3_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig
index a3611be..30b675f 100644
--- a/arch/arm/configs/tny_a9260_defconfig
+++ b/arch/arm/configs/tny_a9260_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig
index 5554eb1..94d6c10 100644
--- a/arch/arm/configs/tny_a9263_defconfig
+++ b/arch/arm/configs/tny_a9263_defconfig
@@ -52,7 +52,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig
index 2995ce8..6e7ae23 100644
--- a/arch/arm/configs/tny_a9g20_defconfig
+++ b/arch/arm/configs/tny_a9g20_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_SPI=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/tqma53_defconfig b/arch/arm/configs/tqma53_defconfig
index 2d36bc0..f163b7c 100644
--- a/arch/arm/configs/tqma53_defconfig
+++ b/arch/arm/configs/tqma53_defconfig
@@ -56,7 +56,7 @@ CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/tx25stk5_defconfig b/arch/arm/configs/tx25stk5_defconfig
index 67620d3..3bd896d 100644
--- a/arch/arm/configs/tx25stk5_defconfig
+++ b/arch/arm/configs/tx25stk5_defconfig
@@ -61,7 +61,7 @@ CONFIG_CMD_CLK=y
 CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
diff --git a/arch/arm/configs/tx28stk5_defconfig b/arch/arm/configs/tx28stk5_defconfig
index 3cefa76..fe80d98 100644
--- a/arch/arm/configs/tx28stk5_defconfig
+++ b/arch/arm/configs/tx28stk5_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_SPLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/tx51stk5_defconfig b/arch/arm/configs/tx51stk5_defconfig
index 4f9a345..3dc6372 100644
--- a/arch/arm/configs/tx51stk5_defconfig
+++ b/arch/arm/configs/tx51stk5_defconfig
@@ -104,7 +104,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/tx53stk5_defconfig b/arch/arm/configs/tx53stk5_defconfig
index d9444d8..fc6a9a6 100644
--- a/arch/arm/configs/tx53stk5_defconfig
+++ b/arch/arm/configs/tx53stk5_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 CONFIG_MTD=y
diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig
index c3a5c31..b6cb61c 100644
--- a/arch/arm/configs/usb_a9260_defconfig
+++ b/arch/arm/configs/usb_a9260_defconfig
@@ -55,7 +55,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig
index c9f8f56..81c502d 100644
--- a/arch/arm/configs/usb_a9263_128mib_defconfig
+++ b/arch/arm/configs/usb_a9263_128mib_defconfig
@@ -56,7 +56,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 522aaff..78fb26c 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -55,7 +55,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/usb_a9g20_128mib_defconfig b/arch/arm/configs/usb_a9g20_128mib_defconfig
index 1e73e8f..11ca9ee 100644
--- a/arch/arm/configs/usb_a9g20_128mib_defconfig
+++ b/arch/arm/configs/usb_a9g20_128mib_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig
index 3e5f2c4..2934b21 100644
--- a/arch/arm/configs/usb_a9g20_defconfig
+++ b/arch/arm/configs/usb_a9g20_defconfig
@@ -56,7 +56,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/versatilepb_defconfig b/arch/arm/configs/versatilepb_defconfig
index 7fe30f7..423e8cd 100644
--- a/arch/arm/configs/versatilepb_defconfig
+++ b/arch/arm/configs/versatilepb_defconfig
@@ -36,7 +36,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/arm/configs/vexpress_ca9_defconfig b/arch/arm/configs/vexpress_ca9_defconfig
index ba1aaf5..1da3779 100644
--- a/arch/arm/configs/vexpress_ca9_defconfig
+++ b/arch/arm/configs/vexpress_ca9_defconfig
@@ -44,7 +44,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index 1b8e4ad..6ad2c8a 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -43,7 +43,7 @@ CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/arm/configs/vincell_defconfig b/arch/arm/configs/vincell_defconfig
index f788992..11f61ee 100644
--- a/arch/arm/configs/vincell_defconfig
+++ b/arch/arm/configs/vincell_defconfig
@@ -57,7 +57,7 @@ CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_RESOLV=y
diff --git a/arch/arm/configs/zedboard_defconfig b/arch/arm/configs/zedboard_defconfig
index 773177c..7368418 100644
--- a/arch/arm/configs/zedboard_defconfig
+++ b/arch/arm/configs/zedboard_defconfig
@@ -42,7 +42,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_CLK=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 # CONFIG_SPI is not set
 CONFIG_FS_TFTP=y
 CONFIG_DIGEST=y
diff --git a/arch/blackfin/configs/ipe337_defconfig b/arch/blackfin/configs/ipe337_defconfig
index 881aa83..501c59a 100644
--- a/arch/blackfin/configs/ipe337_defconfig
+++ b/arch/blackfin/configs/ipe337_defconfig
@@ -20,7 +20,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/mips/configs/dlink-dir-320_defconfig b/arch/mips/configs/dlink-dir-320_defconfig
index e9276aa..52ab295 100644
--- a/arch/mips/configs/dlink-dir-320_defconfig
+++ b/arch/mips/configs/dlink-dir-320_defconfig
@@ -43,7 +43,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index 0643e3d..ba5fa96 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
diff --git a/arch/openrisc/configs/generic_defconfig b/arch/openrisc/configs/generic_defconfig
index 03242bb..deaef2a 100644
--- a/arch/openrisc/configs/generic_defconfig
+++ b/arch/openrisc/configs/generic_defconfig
@@ -19,7 +19,7 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/ppc/configs/pcm030_defconfig b/arch/ppc/configs/pcm030_defconfig
index da82fad..204f946 100644
--- a/arch/ppc/configs/pcm030_defconfig
+++ b/arch/ppc/configs/pcm030_defconfig
@@ -29,7 +29,7 @@ CONFIG_CMD_MAGICVAR=y
 CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_FS_TFTP=y
diff --git a/arch/sandbox/configs/sandbox_defconfig b/arch/sandbox/configs/sandbox_defconfig
index e651838..7ce2569 100644
--- a/arch/sandbox/configs/sandbox_defconfig
+++ b/arch/sandbox/configs/sandbox_defconfig
@@ -21,7 +21,7 @@ CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_NET=y
-CONFIG_NET_DHCP=y
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_DRIVER_NET_TAP=y
 # CONFIG_SPI is not set
diff --git a/commands/Kconfig b/commands/Kconfig
index c4e1d97..fa2e37a 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1052,6 +1052,22 @@ if NET
 
 menu "Network"
 
+config CMD_DHCP
+	bool
+	prompt "dhcp"
+	help
+	  DHCP client to obtain IP or boot params
+
+	  Usage: dhcp [-HvcuUr]
+
+	  Options:
+	          -H HOSTNAME     hostname to send to the DHCP server
+	          -v ID           DHCP Vendor ID (code 60) submitted in DHCP requests
+	          -c ID           DHCP Client ID (code 61) submitted in DHCP requests
+	          -u UUID         DHCP Client UUID (code 97) submitted in DHCP requests
+	          -U CLASS        DHCP User class (code 77) submitted in DHCP requests
+	          -r RETRY        retry limit (default 20)#
+
 config CMD_HOST
 	tristate
 	select NET_RESOLV
diff --git a/net/Kconfig b/net/Kconfig
index e1acd3c..d09ddee 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -3,10 +3,6 @@ menuconfig NET
 
 if NET
 
-config NET_DHCP
-	bool
-	prompt "dhcp support"
-
 config NET_NFS
 	bool
 	prompt "nfs support"
diff --git a/net/Makefile b/net/Makefile
index e0bb6bb..907dc28 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1,7 +1,7 @@
-obj-$(CONFIG_NET_DHCP)	+= dhcp.o
 obj-$(CONFIG_NET)	+= eth.o
 obj-$(CONFIG_NET)	+= net.o
 obj-$(CONFIG_NET_NFS)	+= nfs.o
+obj-$(CONFIG_CMD_DHCP)	+= dhcp.o
 obj-$(CONFIG_CMD_PING)	+= ping.o
 obj-$(CONFIG_NET_RESOLV)+= dns.o
 obj-$(CONFIG_NET_NETCONSOLE) += netconsole.o
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 18/19] commands: move CMD_IFUP to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (16 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 17/19] commands: NET_DHCP -> CMD_DHCP Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:28 ` [PATCH 19/19] commands: move CONFIG_LONGHELP " Holger Schurig
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

* 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>
---
 commands/Kconfig |   17 +++++++++++++++++
 net/Kconfig      |    7 -------
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index fa2e37a..e105b84 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1077,6 +1077,23 @@ config CMD_HOST
 
 	  Usage: host DESTINATION
 
+config NET_CMD_IFUP
+	bool
+	prompt "ifup"
+	help
+	  Bring up network interfaces based on config files.
+
+	  Usage: ifup [-af] [INTF]
+
+	  Each INTF must have a script /env/network/INTF that set the variables
+	  ip (to 'static' or 'dynamic'), ipaddr, netmask, gateway, serverip
+	  and/or ethaddr. A script /env/network/INTF-discover can contains for
+	  discovering the ethernet device, e.g. 'usb'.
+
+	  Options:
+	          -a      bring up all interfaces
+	          -f      Force. Configure even if ip already set
+
 config CMD_MIITOOL
 	tristate
 	depends on PHYLIB
diff --git a/net/Kconfig b/net/Kconfig
index d09ddee..918d776 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -22,11 +22,4 @@ config NET_IFUP
 	default y
 	bool
 
-config NET_CMD_IFUP
-	bool
-	prompt "ifup support"
-	help
-	  This enables the 'ifup' command which is used to bring up network
-	  interfaces based on config files under /env/network/<ethname>
-
 endif
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 19/19] commands: move CONFIG_LONGHELP to commands/Kconfig
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (17 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 18/19] commands: move CMD_IFUP to commands/Kconfig Holger Schurig
@ 2014-05-13  8:28 ` Holger Schurig
  2014-05-13  8:30 ` [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:28 UTC (permalink / raw)
  To: barebox

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
---
 commands/Kconfig |   37 +++++++++++++++++++++++++++++++++++++
 common/Kconfig   |    5 -----
 2 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index e105b84..9b61b57 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -105,6 +105,43 @@ config CMD_HELP
 	  	-a	output help on all commands
 	  	-v	verbose
 
+config LONGHELP
+	bool
+	depends on !SHELL_NONE && CMD_HELP
+	prompt "Long help texts"
+	help
+	  This make the "help" command of barebox spit out much more information,
+	  but (obviously) also makes barebox bigger.
+
+	  Example with CONFIG_LONGHELP:
+
+	  -----------------------------
+	  barebox:/ help ls
+
+	  ls - list a file or directory
+
+	  Usage: ls [-lCR] [FILEDIR...]
+
+	  List information about the specified files or directories.
+
+	  Options:
+	          -l      long format
+	          -C      column format (opposite of long format)
+	          -R      list subdirectories recursively
+	  -----------------------------
+
+	  And now without CONFIG_LONGHELP:
+
+	  -----------------------------
+	  barebox:/ help ls
+
+	  ls - list a file or directory
+
+	  Usage: ls [-lCR] [FILEDIR...]
+	  -----------------------------
+
+	  With my specific .config, the binary size increased from 461500 to 481980.
+
 config CMD_IOMEM
 	tristate
 	prompt "iomem and ioport"
diff --git a/common/Kconfig b/common/Kconfig
index 7a92a59..1afee93 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -294,11 +294,6 @@ config SIMPLE_READLINE
 	default y
 	depends on !CMDLINE_EDITING
 
-config LONGHELP
-	bool
-	depends on !SHELL_NONE
-	prompt "Enable long help texts"
-
 config CBSIZE
 	int
 	prompt "Buffer size for input from the Console"
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (18 preceding siblings ...)
  2014-05-13  8:28 ` [PATCH 19/19] commands: move CONFIG_LONGHELP " Holger Schurig
@ 2014-05-13  8:30 ` Holger Schurig
  2014-05-13  8:41   ` Sascha Hauer
  2014-05-13  9:00   ` Holger Schurig
  2014-05-13 13:46 ` Sascha Hauer
  2014-05-14  7:02 ` Sascha Hauer
  21 siblings, 2 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  8:30 UTC (permalink / raw)
  To: barebox

Wow, patch 2/19 is way toooooo big, so I put it on Google Drive:

https://drive.google.com/file/d/0B-OEhM3f0eCtc3BfY1BSQzE3NWs/edit?usp=sharing

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-13  8:30 ` [PATCH 00/19] commands rework patch series Holger Schurig
@ 2014-05-13  8:41   ` Sascha Hauer
  2014-05-13  9:00   ` Holger Schurig
  1 sibling, 0 replies; 35+ messages in thread
From: Sascha Hauer @ 2014-05-13  8:41 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, May 13, 2014 at 10:30:14AM +0200, Holger Schurig wrote:
> Wow, patch 2/19 is way toooooo big, so I put it on Google Drive:

It was in the moderator interface. I just accepted it manually.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-13  8:30 ` [PATCH 00/19] commands rework patch series Holger Schurig
  2014-05-13  8:41   ` Sascha Hauer
@ 2014-05-13  9:00   ` Holger Schurig
  1 sibling, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13  9:00 UTC (permalink / raw)
  To: barebox

... anyway, I noticed to compile simple errors in clk.c and gpio.c
when compiled for ARM in Patch 0002, v2 of this patch is now at
https://drive.google.com/file/d/0B-OEhM3f0eCtNXNUN01ETThZLWs/edit?usp=sharing

(I should have compiled this not just in the sandbox mode, but also
for my target. Grmpf.)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13  8:28 ` [PATCH 08/19] commands: move CMD_MIPS_CPUINFO " Holger Schurig
@ 2014-05-13 11:26   ` Antony Pavlov
  2014-05-13 11:28     ` Holger Schurig
  0 siblings, 1 reply; 35+ messages in thread
From: Antony Pavlov @ 2014-05-13 11:26 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, 13 May 2014 10:28:48 +0200
Holger Schurig <holgerschurig@gmail.com> wrote:

Can we use

  1. consolidated CMD_CPUINFO option which is selectable on MIPS || ARM;
  2. CMD_ARM_CPUINFO option which depends on ARM & CMD_CPUINFO;
  3. CMD_MIPS_CPUINFO option which depends on MIPS & CMD_CPUINFO.


> * this places the command into the "Information commands"
>   section of Kconfig
> 
> Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
> ---
>  arch/mips/Kconfig |    7 -------
>  commands/Kconfig  |    8 ++++++++
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 9a240b7..6ce7fff 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -274,13 +274,6 @@ endchoice
>  
>  menu "MIPS specific settings"
>  
> -config CMD_MIPS_CPUINFO
> -	bool "cpuinfo command"
> -	default y
> -	help
> -	  Say yes here to get a cpuinfo command to show some
> -	  information about the cpu model.
> -
>  config HAS_NMON
>  	bool
>  
> diff --git a/commands/Kconfig b/commands/Kconfig
> index 9789af4..db091c4 100644
> --- a/commands/Kconfig
> +++ b/commands/Kconfig
> @@ -46,6 +46,14 @@ config CMD_ARM_CPUINFO
>  	  D-cache: 8192 bytes (linelen = 8)
>  	  Control register: M C W P D L I V RR DT IT U XP
>  
> +config CMD_MIPS_CPUINFO
> +	bool "cpuinfo command"
> +	default y
> +	depends on MIPS
> +	help
> +	  Say yes here to get a cpuinfo command to show some
> +	  information about the cpu model.
> +
>  config CMD_DEVINFO
>  	tristate
>  	default y
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13 11:26   ` Antony Pavlov
@ 2014-05-13 11:28     ` Holger Schurig
  2014-05-13 12:23       ` Antony Pavlov
  0 siblings, 1 reply; 35+ messages in thread
From: Holger Schurig @ 2014-05-13 11:28 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

Hi,

i thought about having exactly one CONFIG_CMD_CPUINFO. No need for
your steps 2. and 3., because both arch/arm/Makefile and
arch/arm/Makefile could do "obj-$(CONFIG_CMD_CPUINFO) += cpuinfo.o",
you cannot compile for ARM and MIPS at the same time anyway.

However, I decided against it. Because then I'd have to remove the
example "cpuinfo" output from them the Kconfig help.

Just that generally I'd like to have output example in the Kconfig, so
that people see at "make xconfig" time if they want this command or
not. I, for example, don't want "cpuinfo", I know which CPU is
soldered into the board :-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13 11:28     ` Holger Schurig
@ 2014-05-13 12:23       ` Antony Pavlov
  2014-05-13 12:43         ` Holger Schurig
  0 siblings, 1 reply; 35+ messages in thread
From: Antony Pavlov @ 2014-05-13 12:23 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, 13 May 2014 13:28:17 +0200
Holger Schurig <holgerschurig@gmail.com> wrote:

> Hi,
> 
> i thought about having exactly one CONFIG_CMD_CPUINFO. No need for
> your steps 2. and 3., because both arch/arm/Makefile and
> arch/arm/Makefile could do "obj-$(CONFIG_CMD_CPUINFO) += cpuinfo.o",
> you cannot compile for ARM and MIPS at the same time anyway.
> 

You right, steps 2 and 3 are redundunt. I have forgotten that you move Kconfig, but you don't touch cpuinfo.c.

> However, I decided against it. Because then I'd have to remove the
> example "cpuinfo" output from them the Kconfig help.

Can we move example 'cpuinfo' output to *.dox?
 
> Just that generally I'd like to have output example in the Kconfig, so
> that people see at "make xconfig" time if they want this command or
> not. I, for example, don't want "cpuinfo", I know which CPU is
> soldered into the board :-)

There are pin-to-pin compatible SoC revisions that use just the same package.
cpuinfo can help you to determinate the exact SoC version :)

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13 12:23       ` Antony Pavlov
@ 2014-05-13 12:43         ` Holger Schurig
  2014-05-13 13:09           ` Juergen Borleis
  0 siblings, 1 reply; 35+ messages in thread
From: Holger Schurig @ 2014-05-13 12:43 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

> Can we move example 'cpuinfo' output to *.dox?

That can be done, but it is not done by me. The doxygen is in such a
bad state, that I'm not really wanting to work on it. How many
commands are in doxygen? How sorted are they, how complete are they?
Not even concepts like memory area etc are currently described nicely
there.

Also, when I was doing "make xconfig" and wanted to select the
options, I was looking into the xconfig program, not in some
(suboptimal) doxygen docs. So I think the documentation for this step
should be in the Kconfig in the first place, everything else is then
optional.



If it would be to me, I'd in long-term kill the doxygen. Or have the
doxygen only describe the internal API for barebox programmers.
Currently it mixes internal API and end-user documention, not so nice.

Finally, ideally there would be only one place with command
descriptions (currently we have three: BAREBOX_CMD_FOO macros, Kconfig
entries, doxygen comments). It would be nice if the BAREBOX_FOO ones
become the main one, and that other ones be automatically generated
from them. There could even be a BAREBOX_CMD_HELP_DOXY() macro for
text that just ends up in the doxyfile, but not in the barebox binary.

In fact I already have done a first step towards this. My
not-yet-published scripts/checkhelp.py program. It parses all the *.c
file recursively for the BAREBOX_CMD_foo macros, and checks for
various things (e.g. line length not > 77 characters). As this script
already parses the stuff, it could also be used store information and
output into some different format.

However, priority-wise I still think that all Kconfig entries (for
non-commands) without a help text should get one first, this is more
helpful than some long documentation file. And that barebox develops a
policy where patch with a new Kconfig but without a good documention
would simply be rejected.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/19] commands: move CMD_MIPS_CPUINFO to commands/Kconfig
  2014-05-13 12:43         ` Holger Schurig
@ 2014-05-13 13:09           ` Juergen Borleis
  0 siblings, 0 replies; 35+ messages in thread
From: Juergen Borleis @ 2014-05-13 13:09 UTC (permalink / raw)
  To: barebox

On Tuesday 13 May 2014 14:43:38 Holger Schurig wrote:
> If it would be to me, I'd in long-term kill the doxygen. Or have the
> doxygen only describe the internal API for barebox programmers.
> Currently it mixes internal API and end-user documention, not so nice.

The historical goal was to keep all the documentation and the corresponding 
code close to each other.

The API documentation of doxygen is mostly useless. But to have the description 
of the intention of the code close to the code was my idea, to make 
programmers also change the documentation when they change the code near by. 
But it doesn't work. Programmers are not interested in writing documentation.

jbe

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (19 preceding siblings ...)
  2014-05-13  8:30 ` [PATCH 00/19] commands rework patch series Holger Schurig
@ 2014-05-13 13:46 ` Sascha Hauer
  2014-05-14  7:02 ` Sascha Hauer
  21 siblings, 0 replies; 35+ messages in thread
From: Sascha Hauer @ 2014-05-13 13:46 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

Hi Holger,

On Tue, May 13, 2014 at 10:28:40AM +0200, Holger Schurig wrote:
> Hi,
> 
> this is my current patch series that should improve barebox'
> documentation about it's commands.
> 
> * when I started barebox and typed "help", the list of commands
>   was scrolling up quickly. Almost always did I had to use the
>   mouse and scroll my x-terminal backwards to see what I
>   actually wanted to see. So I reduced the output of the "help"
>   command to just spit out the command names, however grouped
>   by functions. This is now much smaller and fits in one
>   screen. The old list is available with "help -l".
> * Usage (synopsis) documention (e.g. "ls [-lCR]") was only in
>   the CONFIG_LONGHELP, but it's often usable if one forget the
>   exact command option letter. It's now part of the help even
>   without CONFIG_LONGHELP.
> * I reworked the long help texts to make them better understandable
>   (hopefully), and also tried to recuce their size if possible.
> * when I was new to barebox, I was wandering if I need some
>   of the commands in "make xconfig". I didn't have further
>   information, because almost no command had a help text.
>   This has now changed, the help texts in Kconfig are almost the
>   same as the help texts of "help FOOBAR" (with CONFIG_LONGHELP) on.
> * now that "help" has the commands grouped nicely, it was time
>   to group them in "make xconfig", too
> * many Kconfig entries turned on commands, but they were located
>   at various places (a.g. common, net, arch-depended). Moved them
>   all into commands/Kconfig
> * some CONFIG_CMD_foobar things didn't turn on commands. I renamed
>   them (and their occurences in the _defconfig)s.

This series looks really great! I haven't looked at the details, but it
has some very nice aspects, like the command grouping and the same
grouping into Kconfig submenus.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/19] commands: group 'help' output
  2014-05-13  8:28 ` [PATCH 01/19] commands: group 'help' output Holger Schurig
@ 2014-05-13 13:48   ` Sascha Hauer
  2014-05-13 14:07     ` Holger Schurig
  0 siblings, 1 reply; 35+ messages in thread
From: Sascha Hauer @ 2014-05-13 13:48 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, May 13, 2014 at 10:28:41AM +0200, Holger Schurig wrote:
> 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'.
> 

[...]

> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index c440a69..cdeebc0 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1713,8 +1713,10 @@ int of_add_memory(struct device_node *node, bool dump)
>  			continue;
>  		}
>  
> +#if 0
>  		of_add_memory_bank(node, dump, n,
>  				res.start, resource_size(&res));
> +#endif
>  		n++;
>  	}

This got in here accidently.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/19] commands: group 'help' output
  2014-05-13 13:48   ` Sascha Hauer
@ 2014-05-13 14:07     ` Holger Schurig
  0 siblings, 0 replies; 35+ messages in thread
From: Holger Schurig @ 2014-05-13 14:07 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hmm, I was doing the doc-rework at home, with sandbox-barebox. And
sandbox-barebox doesn't have device tree, so I uncommented this line
to get things compiled for the sandbox.

Will send v2 soon.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
                   ` (20 preceding siblings ...)
  2014-05-13 13:46 ` Sascha Hauer
@ 2014-05-14  7:02 ` Sascha Hauer
  2014-05-14 13:55   ` Antony Pavlov
  21 siblings, 1 reply; 35+ messages in thread
From: Sascha Hauer @ 2014-05-14  7:02 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, May 13, 2014 at 10:28:40AM +0200, Holger Schurig wrote:
> Hi,
> 
> this is my current patch series that should improve barebox'
> documentation about it's commands.
> 
> * when I started barebox and typed "help", the list of commands
>   was scrolling up quickly. Almost always did I had to use the
>   mouse and scroll my x-terminal backwards to see what I
>   actually wanted to see. So I reduced the output of the "help"
>   command to just spit out the command names, however grouped
>   by functions. This is now much smaller and fits in one
>   screen. The old list is available with "help -l".
> * Usage (synopsis) documention (e.g. "ls [-lCR]") was only in
>   the CONFIG_LONGHELP, but it's often usable if one forget the
>   exact command option letter. It's now part of the help even
>   without CONFIG_LONGHELP.
> * I reworked the long help texts to make them better understandable
>   (hopefully), and also tried to recuce their size if possible.
> * when I was new to barebox, I was wandering if I need some
>   of the commands in "make xconfig". I didn't have further
>   information, because almost no command had a help text.
>   This has now changed, the help texts in Kconfig are almost the
>   same as the help texts of "help FOOBAR" (with CONFIG_LONGHELP) on.
> * now that "help" has the commands grouped nicely, it was time
>   to group them in "make xconfig", too
> * many Kconfig entries turned on commands, but they were located
>   at various places (a.g. common, net, arch-depended). Moved them
>   all into commands/Kconfig
> * some CONFIG_CMD_foobar things didn't turn on commands. I renamed
>   them (and their occurences in the _defconfig)s.

Applied with some minor fixups like removing
BAREBOX_CMD_HELP(cmd_clk_enable_help) which doesn't exist.

For everyone who hasn't tried this series, here is the nice-and-shiny
sorted-by-categories output of help -v:

Information commands:
  ?                     print online help
  clk_dump              show information about registered clocks
  cpuinfo               show info about CPU
  devinfo               show information about devices and drivers
  gpiolib               list registered GPIOs
  help                  print online help
  iomem                 show IO memory usage
  meminfo               print info about memory usage
  mmuinfo               show MMU/cache information of an address
  version               print barebox version

Boot commands:
  boot                  boot from script, device, ...
  bootm                 boot an application image
  go                    start application at address or file
  reset                 perform RESET of the CPU
  uimage                extract/verify uImage

Partition commands:
  addpart               add a partition description to a device
  automount             execute (mount) COMMAND when PATH ist first accessed
  delpart               delete partition(s)
  mount                 mount a filesystem or list mounted filesystems
  ubiattach             attach mtd device to UBI
  ubidetach             detach an UBI device
  ubimkvol              create an UBI volume
  ubirmvol              delete an UBI volume
  umount                umount a filesystem

Environment commands:
  export                export environment variables
  global                create or set global variables
  loadenv               load environment from ENVFS
  magicvar              list information about magic variables
  printenv              print value of environment variables
  saveenv               save environment to persistent storage

File commands:
  basename              strip directory and suffix from filenames
  cat                   concatenate file(s) to stdout
  cd                    change working directory
  cp                    copy files
  dirname               strip last component from a path
  filetype              detect file type
  ln                    create symlink (make a new name for a file)
  ls                    list a file or directory
  md5sum                calculate MD5 checksum
  mkdir                 make directories
  pwd                   print working directory
  readlink              read value of a symbolic link
  rm                    remove files
  rmdir                 remove empty directory(s)
  uncompress            uncompress a compressed file

Scripting commands:
  .                     execute shell script in current shell environment
  [                     minimal test command like in /bin/sh
  exit                  exit script
  false                 do nothing, unsuccessfully
  getopt                parse option arguments
  let                   evaluate arithmetic expressions
  msleep                delay execution for n milli-seconds
  readf                 read file into variable
  sh                    execute a shell script
  sleep                 delay execution for n seconds
  source                execute shell script in current shell environment
  test                  minimal test command like in /bin/sh
  true                  do nothing, successfully

Network commands:
  dhcp                  DHCP client to obtain IP or boot params
  ethact                get or set current ethernet device
  ifup                  bring a network interface up
  miitool               view media-independent interface status
  ping                  send ICMP echo requests
  tftp                  load (or save) a file using TFTP

Console commands:
  clear                 clear screen
  echo                  echo args to console
  edit                  a small full-screen editor
  menu                  create and display menus
  readline              prompt for user input
  sedit                 a small full-screen editor
  splash                display a BMP image
  timeout               wait for a specified timeout

Memory commands:
  crc32                 CRC32 checksum calculation
  md                    memory display
  memcmp                memory compare
  memcpy                memory copy
  memset                memory fill
  memtest               extensive memory test
  mm                    memory modify with mask
  mw                    memory write

Hardware manipulation commands:
  clk_disable           disable a clock
  clk_enable            enable a clock
  clk_set_parent        set parent of a clock
  clk_set_rate          set a clocks rate
  detect                detect devices
  erase                 erase flash memory
  gpio_direction_input  set direction of a GPIO pin to input
  gpio_direction_output set direction of a GPIO pin to output
  gpio_get_value        return value of a GPIO pin
  gpio_set_value        set a GPIO's output value
  i2c_probe             probe for an i2c device
  i2c_read              read from an i2c device
  i2c_write             write to an i2c device
  imx_nand_bbm          create BBT for i.MX NAND
  led                   control LEDs
  nand                  NAND flash handling
  protect               enable flash write protection
  spi                   write/read from SPI device
  trigger               handle LED triggers
  unprotect             disable flash write protection
  usb                   (re-)detect USB devices
  wd                    enable/disable/trigger the watchdog

Miscellaneous commands:
  barebox_update        update barebox to persistent media
  dfu                   device firmware update
  of_node               create/delete nodes in the device tree
  of_property           handle device tree properties
  oftree                handle device trees
  time                  measure execution duration of a command

Use 'help COMMAND' for more details.



-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-14  7:02 ` Sascha Hauer
@ 2014-05-14 13:55   ` Antony Pavlov
  2014-05-15  8:09     ` Holger Schurig
  0 siblings, 1 reply; 35+ messages in thread
From: Antony Pavlov @ 2014-05-14 13:55 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Wed, 14 May 2014 09:02:50 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> On Tue, May 13, 2014 at 10:28:40AM +0200, Holger Schurig wrote:
> > Hi,
> > 
> > this is my current patch series that should improve barebox'
> > documentation about it's commands.
> > 
> > * when I started barebox and typed "help", the list of commands
> >   was scrolling up quickly. Almost always did I had to use the
> >   mouse and scroll my x-terminal backwards to see what I
> >   actually wanted to see. So I reduced the output of the "help"
> >   command to just spit out the command names, however grouped
> >   by functions. This is now much smaller and fits in one
> >   screen. The old list is available with "help -l".
> > * Usage (synopsis) documention (e.g. "ls [-lCR]") was only in
> >   the CONFIG_LONGHELP, but it's often usable if one forget the
> >   exact command option letter. It's now part of the help even
> >   without CONFIG_LONGHELP.
> > * I reworked the long help texts to make them better understandable
> >   (hopefully), and also tried to recuce their size if possible.
> > * when I was new to barebox, I was wandering if I need some
> >   of the commands in "make xconfig". I didn't have further
> >   information, because almost no command had a help text.
> >   This has now changed, the help texts in Kconfig are almost the
> >   same as the help texts of "help FOOBAR" (with CONFIG_LONGHELP) on.
> > * now that "help" has the commands grouped nicely, it was time
> >   to group them in "make xconfig", too
> > * many Kconfig entries turned on commands, but they were located
> >   at various places (a.g. common, net, arch-depended). Moved them
> >   all into commands/Kconfig
> > * some CONFIG_CMD_foobar things didn't turn on commands. I renamed
> >   them (and their occurences in the _defconfig)s.
> 
> Applied with some minor fixups like removing
> BAREBOX_CMD_HELP(cmd_clk_enable_help) which doesn't exist.
> 
> For everyone who hasn't tried this series, here is the nice-and-shiny
> sorted-by-categories output of help -v:
> 
> Information commands:
>   ?                     print online help
>   clk_dump              show information about registered clocks

clkinfo ?

>   cpuinfo               show info about CPU
>   devinfo               show information about devices and drivers
>   gpiolib               list registered GPIOs

gpioinfo?

>   help                  print online help
>   iomem                 show IO memory usage
>   meminfo               print info about memory usage
>   mmuinfo               show MMU/cache information of an address
>   version               print barebox version
> 
> Boot commands:
>   boot                  boot from script, device, ...
>   bootm                 boot an application image
>   go                    start application at address or file
>   reset                 perform RESET of the CPU
>   uimage                extract/verify uImage
> 
> Partition commands:
>   addpart               add a partition description to a device
>   automount             execute (mount) COMMAND when PATH ist first accessed
>   delpart               delete partition(s)
>   mount                 mount a filesystem or list mounted filesystems
>   ubiattach             attach mtd device to UBI
>   ubidetach             detach an UBI device
>   ubimkvol              create an UBI volume
>   ubirmvol              delete an UBI volume
>   umount                umount a filesystem
> 
> Environment commands:
>   export                export environment variables
>   global                create or set global variables
>   loadenv               load environment from ENVFS
>   magicvar              list information about magic variables
>   printenv              print value of environment variables
>   saveenv               save environment to persistent storage
> 
> File commands:
>   basename              strip directory and suffix from filenames
>   cat                   concatenate file(s) to stdout
>   cd                    change working directory
>   cp                    copy files
>   dirname               strip last component from a path
>   filetype              detect file type
>   ln                    create symlink (make a new name for a file)
>   ls                    list a file or directory
>   md5sum                calculate MD5 checksum
>   mkdir                 make directories
>   pwd                   print working directory
>   readlink              read value of a symbolic link
>   rm                    remove files
>   rmdir                 remove empty directory(s)
>   uncompress            uncompress a compressed file
> 
> Scripting commands:
>   .                     execute shell script in current shell environment
>   [                     minimal test command like in /bin/sh
>   exit                  exit script
>   false                 do nothing, unsuccessfully
>   getopt                parse option arguments
>   let                   evaluate arithmetic expressions
>   msleep                delay execution for n milli-seconds
>   readf                 read file into variable
>   sh                    execute a shell script
>   sleep                 delay execution for n seconds
>   source                execute shell script in current shell environment
>   test                  minimal test command like in /bin/sh
>   true                  do nothing, successfully
> 
> Network commands:
>   dhcp                  DHCP client to obtain IP or boot params
>   ethact                get or set current ethernet device
>   ifup                  bring a network interface up
>   miitool               view media-independent interface status
>   ping                  send ICMP echo requests
>   tftp                  load (or save) a file using TFTP
> 
> Console commands:
>   clear                 clear screen
>   echo                  echo args to console
>   edit                  a small full-screen editor
>   menu                  create and display menus
>   readline              prompt for user input
>   sedit                 a small full-screen editor
>   splash                display a BMP image
>   timeout               wait for a specified timeout
> 
> Memory commands:
>   crc32                 CRC32 checksum calculation
>   md                    memory display
>   memcmp                memory compare
>   memcpy                memory copy
>   memset                memory fill
>   memtest               extensive memory test
>   mm                    memory modify with mask
>   mw                    memory write
> 
> Hardware manipulation commands:
>   clk_disable           disable a clock
>   clk_enable            enable a clock
>   clk_set_parent        set parent of a clock
>   clk_set_rate          set a clocks rate
>   detect                detect devices
>   erase                 erase flash memory
>   gpio_direction_input  set direction of a GPIO pin to input
>   gpio_direction_output set direction of a GPIO pin to output
>   gpio_get_value        return value of a GPIO pin
>   gpio_set_value        set a GPIO's output value
>   i2c_probe             probe for an i2c device
>   i2c_read              read from an i2c device
>   i2c_write             write to an i2c device
>   imx_nand_bbm          create BBT for i.MX NAND
>   led                   control LEDs
>   nand                  NAND flash handling
>   protect               enable flash write protection
>   spi                   write/read from SPI device
>   trigger               handle LED triggers
>   unprotect             disable flash write protection
>   usb                   (re-)detect USB devices
>   wd                    enable/disable/trigger the watchdog
> 
> Miscellaneous commands:
>   barebox_update        update barebox to persistent media
>   dfu                   device firmware update
>   of_node               create/delete nodes in the device tree
>   of_property           handle device tree properties
>   oftree                handle device trees

Device Tree commands: ?

>   time                  measure execution duration of a command
> 
> Use 'help COMMAND' for more details.
> 
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-14 13:55   ` Antony Pavlov
@ 2014-05-15  8:09     ` Holger Schurig
  2014-05-15 11:52       ` Sascha Hauer
  0 siblings, 1 reply; 35+ messages in thread
From: Holger Schurig @ 2014-05-15  8:09 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

Yep, that "gpiolib" command is also on my list.

I personally also like to rename the device tree commands away from
of_ (Open Firmware), to dt_ (Device Tree). Today anyone uses the term
"Device Tree", the of_XXX is just a programmers view, e.g. a prefix
for C structures.

Still, I'm unsure about it.

The thing is: if I rename "gpiolib" to "gpioinfo", no init script will
be harmed. But maybe some init scripts add device tree nodes
on-the-fly?  If that is in the git tree, I can find it. But should I
care for things that aren't in the git tree?

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/19] commands rework patch series
  2014-05-15  8:09     ` Holger Schurig
@ 2014-05-15 11:52       ` Sascha Hauer
  0 siblings, 0 replies; 35+ messages in thread
From: Sascha Hauer @ 2014-05-15 11:52 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Thu, May 15, 2014 at 10:09:34AM +0200, Holger Schurig wrote:
> Yep, that "gpiolib" command is also on my list.
> 
> I personally also like to rename the device tree commands away from
> of_ (Open Firmware), to dt_ (Device Tree). Today anyone uses the term
> "Device Tree", the of_XXX is just a programmers view, e.g. a prefix
> for C structures.
> 
> Still, I'm unsure about it.
> 
> The thing is: if I rename "gpiolib" to "gpioinfo", no init script will
> be harmed. But maybe some init scripts add device tree nodes
> on-the-fly?  If that is in the git tree, I can find it. But should I
> care for things that aren't in the git tree?

No, what's not in the tree is not there.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2014-05-15 11:53 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13  8:28 [PATCH 00/19] commands rework patch series Holger Schurig
2014-05-13  8:28 ` [PATCH 01/19] commands: group 'help' output Holger Schurig
2014-05-13 13:48   ` Sascha Hauer
2014-05-13 14:07     ` Holger Schurig
2014-05-13  8:28 ` [PATCH 02/19] commands: harmonize in-barebox documentation Holger Schurig
2014-05-13  8:28 ` [PATCH 03/19] commands: harmonize in-barebox docs with Kconfig docs Holger Schurig
2014-05-13  8:28 ` [PATCH 04/19] commands: CMD_MEMORY -> COMPILE_MEMORY Holger Schurig
2014-05-13  8:28 ` [PATCH 05/19] commands: CMD_DIGEST -> COMPILE_DIGEST Holger Schurig
2014-05-13  8:28 ` [PATCH 06/19] commands: move CMD_ARM_CPUINFO to commands/Kconfig Holger Schurig
2014-05-13  8:28 ` [PATCH 07/19] commands: move CMD_ARM_MMUINFO " Holger Schurig
2014-05-13  8:28 ` [PATCH 08/19] commands: move CMD_MIPS_CPUINFO " Holger Schurig
2014-05-13 11:26   ` Antony Pavlov
2014-05-13 11:28     ` Holger Schurig
2014-05-13 12:23       ` Antony Pavlov
2014-05-13 12:43         ` Holger Schurig
2014-05-13 13:09           ` Juergen Borleis
2014-05-13  8:28 ` [PATCH 09/19] commands: move CMD_BOOT_ORDER " Holger Schurig
2014-05-13  8:28 ` [PATCH 10/19] commands: move CMD_AT91_BOOT_TEST " Holger Schurig
2014-05-13  8:28 ` [PATCH 11/19] commands: move CMD_AT91MUX " Holger Schurig
2014-05-13  8:28 ` [PATCH 12/19] commands: move CMD_AT91MIX " Holger Schurig
2014-05-13  8:28 ` [PATCH 13/19] commands: HUSH_GETOPT -> CMD_GETOPT Holger Schurig
2014-05-13  8:28 ` [PATCH 14/19] commands: let all network commands depend on NET Holger Schurig
2014-05-13  8:28 ` [PATCH 15/19] commands: introduce CMD_HOST Holger Schurig
2014-05-13  8:28 ` [PATCH 16/19] commands: NET_PING -> CMD_PING Holger Schurig
2014-05-13  8:28 ` [PATCH 17/19] commands: NET_DHCP -> CMD_DHCP Holger Schurig
2014-05-13  8:28 ` [PATCH 18/19] commands: move CMD_IFUP to commands/Kconfig Holger Schurig
2014-05-13  8:28 ` [PATCH 19/19] commands: move CONFIG_LONGHELP " Holger Schurig
2014-05-13  8:30 ` [PATCH 00/19] commands rework patch series Holger Schurig
2014-05-13  8:41   ` Sascha Hauer
2014-05-13  9:00   ` Holger Schurig
2014-05-13 13:46 ` Sascha Hauer
2014-05-14  7:02 ` Sascha Hauer
2014-05-14 13:55   ` Antony Pavlov
2014-05-15  8:09     ` Holger Schurig
2014-05-15 11:52       ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox