Catch-up/clean-up doxygen documentation
Subsystems (9)
cover Catch-up/clean-up doxygen documentation
I just started using BB and was a little anoyed by the fact that although there is plenty of documentation in the source code, it did not show up in the generated documentation. I think the availability of simple, clean and structured information is important for the success of BB and make it enjoyable for developers to get aquainted with BB. Therefore I put some effort in getting the doxygen output up to date.
This patch set tries to update the shell command documentation.
A short summary of the changes in this patch set:
- The first few patches deal with orphan pages; pages that were not linked to directly and hence showed up at top-level in the Doxygen output HTML.
- In the command overview page, a separation between platform-independent and dependent code has been made. In some cases I found 3 versions/ implementations of the same command on different ARCHs, including 3 copies of the same documentation. I will try to come up with a solution for this and make sure we have consistent command implementations across different platforms and architectures which IMHO is important.
- In a few cases I found the command help information inside an #ifdef. I took the liberty to move the BAREBOX_CMD_HELP_* macros outside these conditional sections so that the documentation for that command always shows up in the Doxygen-generated output. Of course the availability of the commands and the help text in bb should not have been altered.
- An attempt is made to make consistent use of the BAREBOX_CMD_HELP_* macro's. Also some clean-up was done or small amendments to the documentation.
- I changed a number of syntax errors in the drivers/mtd/nand directory. It was not my intention to touch source-generated documentation but decided to fix a number of syntax errors to make a first attempt to get rid of all Doxygen warnings and make the output usable again.
- I also tried to make sure all shell command documentation now uses the same format for describing cli options (for example the use of [OPTIONS] for options and [<arg1>] for an optional argument. This style is what I saw for most commands already so I just tried to make it's use consistent.
I realise that the distribution of the number of changes is not optimal, this patch set grew considerably bigger as I progressed. In the end it is just a big collection of lots of small and trivial changes and I hope you can still find the motivation to review these patches and provide me with some feedback.
Thanks in advance!
Mark
Mark Vels (9):
trivial: relocate doxygen help page for time command
trivial: relocate doxygen help page for led command
trivial: reorganize crc32 command doxygen output
trivial: fix doxygen error in dlink-dir-320.dox
trivial: De-orphan NAND doxygen output and fix @param syntax
docs: Enable BAREBOX_CMD_HELP_TEXT() in generated documentation
doxygen: Enable LONGHELP output in generated output
trivial: Small change in page link title
help: update of shell commands doxygen/online help documentation
Documentation/commands.dox | 158 ++++++++++++--------- Documentation/developers_manual.dox | 2 +- Documentation/manual_org.dox | 2 +- Doxyfile | 3 +- arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 11 ++ arch/arm/boards/guf-cupid/board.c | 11 ++ arch/arm/boards/pcm043/pcm043.c | 11 ++ arch/arm/cpu/cpu.c | 13 ++- arch/arm/cpu/cpuinfo.c | 10 ++ arch/arm/lib/bootu.c | 11 ++- arch/arm/lib/bootz.c | 12 ++- arch/arm/mach-imx/clko.c | 17 ++- arch/arm/mach-imx/internal-nand-boot.c | 15 ++- arch/arm/mach-imx/speed.c | 15 ++- arch/arm/mach-mxs/imx.c | 11 ++ arch/arm/mach-netx/generic.c | 10 ++ arch/blackfin/boards/ipe337/cmd_alternate.c | 10 ++ arch/mips/boards/dlink-dir-320/dlink-dir-320.dox | 2 +- arch/mips/lib/cpuinfo.c | 10 ++ commands/bmp.c | 18 +-- commands/bootm.c | 25 ++-- commands/cat.c | 8 +- commands/cd.c | 4 + commands/clear.c | 5 + commands/cp.c | 13 +- commands/crc.c | 13 ++- commands/dfu.c | 18 ++- commands/echo.c | 19 ++- commands/edit.c | 13 +- commands/exec.c | 10 ++ commands/export.c | 5 + commands/false.c | 17 +++ commands/flash.c | 75 +++++----- commands/go.c | 16 ++- commands/gpio.c | 19 +++ commands/help.c | 18 ++- commands/i2c.c | 53 +++++--- commands/insmod.c | 12 ++- commands/led.c | 16 ++- commands/loadb.c | 35 ++++- commands/login.c | 14 ++- commands/ls.c | 5 + commands/lsmod.c | 10 ++ commands/mem.c | 137 +++++++++++------- commands/meminfo.c | 10 ++ commands/memtest.c | 22 ++- commands/menu.c | 123 ++++++++-------- commands/mkdir.c | 14 ++- commands/mount.c | 21 ++-- commands/nand.c | 18 ++- commands/net.c | 21 +++- commands/partition.c | 33 +++-- commands/passwd.c | 13 +- commands/printenv.c | 11 +- commands/pwd.c | 9 ++ commands/readline.c | 12 +- commands/reginfo.c | 9 ++ commands/reset.c | 11 ++ commands/rm.c | 13 ++- commands/rmdir.c | 14 ++- commands/sleep.c | 15 ++- commands/test.c | 16 ++- commands/time.c | 10 +- commands/timeout.c | 22 ++- commands/trigger.c | 5 + commands/true.c | 12 ++ commands/ubi.c | 38 ++++-- commands/umount.c | 12 ++- commands/unlzo.c | 12 ++- commands/usb.c | 12 ++- commands/version.c | 9 ++ common/command.c | 11 ++- common/hush.c | 69 +++++----- drivers/base/driver.c | 28 ++-- drivers/led/led-triggers.c | 2 +- drivers/mtd/nand/nand_bbt.c | 14 ++- drivers/mtd/nand/nand_hwecc_syndrome.c | 44 ++++--- drivers/mtd/nand/nand_omap_bch_decoder.c | 19 ++- drivers/mtd/nand/nand_write.c | 136 +++++++++--------- include/command.h | 2 +- net/dhcp.c | 10 ++ net/dns.c | 11 ++- net/nfs.c | 12 ++- net/ping.c | 12 ++ net/tftp.c | 21 ++-- 85 files changed, 1212 insertions(+), 608 deletions(-)
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/9 trivial: relocate doxygen help page for time command
--- Documentation/commands.dox | 1 + commands/time.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
Documentation/commands.dox +1 -0
@@ -96,6 +96,7 @@ available in @a Barebox: @li @subpage sleep @li @subpage source @li @subpage test +@li @subpage time_command @li @subpage timeout @li @subpage true @li @subpage tftp_command
commands/time.c +8 -2
@@ -46,10 +46,16 @@ static int do_time(struct command *cmdtp, 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_SHORT("measure execution time of a command. Requires <command> to be interruptible!\n") BAREBOX_CMD_HELP_END +/** + * @page time_command + +\note @li This command depends on <command> being interruptible, otherwise the timer may overrun resulting in incorrect results. + @li This command is available only if enabled in menuconfig. + */ + BAREBOX_CMD_START(time) .cmd = do_time, .usage = "measure execution time of a command",
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/9 trivial: relocate doxygen help page for led command
In reply to Mark Vels--- Documentation/commands.dox | 1 + commands/led.c | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-)
Documentation/commands.dox +1 -0
@@ -58,6 +58,7 @@ available in @a Barebox: @li @subpage icache @li @subpage iminfo @li @subpage insmod +@li @subpage led_command @li @subpage linux16_command @li @subpage loadenv_command @li @subpage loadb
commands/led.c +9 -7
@@ -74,21 +74,23 @@ static int do_led(struct command *cmdtp, int argc, char *argv[])return 0 ; } + +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_END + /** * @page led_command -The exact meaning of <value> is unspecified. It can be a color in case of rgb +The exact meaning of <value> is unspecified. It can be a color in case of rgb LEDs or a brightness if this is controllable. In most cases only 1 for enabled is allowed. +\note This command is available only if enabled in menuconfig. */ -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_END - BAREBOX_CMD_START(led) .cmd = do_led, .usage = "led <led> <value>",
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/9 trivial: reorganize crc32 command doxygen output
In reply to Mark Vels--- Documentation/commands.dox | 3 +-- commands/crc.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
Documentation/commands.dox +1 -2
@@ -29,8 +29,7 @@ available in @a Barebox: @li @subpage cp_command @li @subpage cpufreq @li @subpage cpuinfo -@li @subpage crc_command -@li @subpage crc32 +@li @subpage crc32_command @li @subpage delpart_command @li @subpage devinfo_command @li @subpage dfu_command
commands/crc.c +1 -1
@@ -143,7 +143,7 @@ static int do_crc(struct command *cmdtp, int argc, char *argv[])return err; } -BAREBOX_CMD_HELP_START(crc) +BAREBOX_CMD_HELP_START(crc32) 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" )
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/9 trivial: fix doxygen error in dlink-dir-320.dox
In reply to Mark Vels--- arch/mips/boards/dlink-dir-320/dlink-dir-320.dox | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/boards/dlink-dir-320/dlink-dir-320.dox +1 -1
@@ -19,7 +19,7 @@ You must setup tftp-server on host 192.168.0.1. Put your barebox.bin to tftp-server directory (usual /tftpboot or /srv/tftp). Connect your DIR-320 to your tftp-server network via -one of four <LAN> sockets. +one of four <LAN> sockets. Next, setup network on DIR-320 and run barebox.bin, e.g.: @verbatim
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/9 trivial: De-orphan NAND doxygen output and fix @param syntax
In reply to Mark Vels--- drivers/mtd/nand/nand_hwecc_syndrome.c | 44 ++++++---- drivers/mtd/nand/nand_omap_bch_decoder.c | 19 +++-- drivers/mtd/nand/nand_write.c | 136 +++++++++++++++-------------- 3 files changed, 108 insertions(+), 91 deletions(-)
drivers/mtd/nand/nand_hwecc_syndrome.c +26 -18
@@ -9,12 +9,16 @@#include <io.h> #include <malloc.h> #include <module.h> +/** +* @file +*/ +/** -* nand_read_page_syndrome - [REPLACABLE] hardware ecc syndrom based page read -* @mtd: mtd info structure -* @chip: nand chip info structure -* @buf: buffer to store read data +* @brief nand_read_page_syndrome - [REPLACABLE] hardware ecc syndrom based page read +* @param mtd mtd info structure +* @param chip nand chip info structure +* @param buf buffer to store read data * * The hw generator calculates the error syndrome automatically. Therefor * we need a special oob layout and handling.
@@ -64,10 +68,10 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,return 0 ; }/** -* nand_write_page_syndrome - [REPLACABLE] hardware ecc syndrom based page write -* @mtd: mtd info structure -* @chip: nand chip info structure -* @buf: data buffer +* @brief nand_write_page_syndrome - [REPLACABLE] hardware ecc syndrom based page write +* @param mtd mtd info structure +* @param chip nand chip info structure +* @param buf data buffer * * The hw generator calculates the error syndrome automatically. Therefor * we need a special oob layout and handling.
@@ -110,12 +114,12 @@ static void nand_write_page_syndrome(struct mtd_info *mtd,#endif /** -* nand_read_oob_syndrome - [REPLACABLE] OOB data read function for HW ECC +* @brief nand_read_oob_syndrome - [REPLACABLE] OOB data read function for HW ECC * with syndromes -* @mtd: mtd info structure -* @chip: nand chip info structure -* @page: page number to read -* @sndcmd: flag whether to issue read command or not +* @param mtd mtd info structure +* @param chip nand chip info structure +* @param page page number to read +* @param sndcmd flag whether to issue read command or not */ static int nand_read_oob_syndrome (struct mtd_info *mtd,struct nand_chip *chip,int page,int sndcmd)
@@ -148,14 +152,14 @@ static int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip,return 1 ; } +#ifdef CONFIG_NAND_WRITE /** -* nand_write_oob_syndrome - [REPLACABLE] OOB data write function for HW ECC +* @brief nand_write_oob_syndrome - [REPLACABLE] OOB data write function for HW ECC * with syndrome - only for large page flash ! -* @mtd: mtd info structure -* @chip: nand chip info structure -* @page: page number to write +* @param mtd mtd info structure +* @param chip nand chip info structure +* @param page page number to write */ -#ifdef CONFIG_NAND_WRITE static int nand_write_oob_syndrome (struct mtd_info *mtd,struct nand_chip *chip,int page) {
@@ -209,6 +213,10 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd, }#endif +/** +* @brief nand_init_ecc_hw_syndrome - Init the HW ECC with syndrome. +* @param chip nand chip info structure +*/ void nand_init_ecc_hw_syndrome (struct nand_chip *chip) {/* Use standard syndrome read/write page function ? */
drivers/mtd/nand/nand_omap_bch_decoder.c +12 -7
@@ -22,9 +22,13 @@#define PPP 0x201B/* Primary Polynomial : x^13 + x^4 + x^3 + x + 1 */ #define P 0x001B/* With omitted x^13 */ #define POLY 12/* degree of the primary Polynomial less one */ +/** +* @file +*/ +/** -* mpy_mod_gf - GALOIS field multiplier +* @brief mpy_mod_gf - GALOIS field multiplier * Input : A(x), B(x) * Output : A(x)*B(x) mod P(x) */
@@ -52,7 +56,7 @@ static unsigned int mpy_mod_gf(unsigned int a, unsigned int b)/** * chien - CHIEN search * -* @location - Error location vector pointer +* @parm location Error location vector pointer * * Inputs : ELP(z) * No. of found errors
@@ -123,8 +127,8 @@ static int chien(unsigned int select_4_8, int err_nums, }/* synd : 16 Syndromes -* return: gamaas - Coefficients to the error polynomial -* return: : Number of detected errors +* @return gamaas - Coefficients to the error polynomial +* @return Number of detected errors */ static unsigned int berlekamp (unsigned int select_4_8,unsigned int synd[],unsigned int err[])
@@ -350,10 +354,11 @@ static void syndrome(unsigned int select_4_8, }/** -* decode_bch - BCH decoder for 4- and 8-bit error correction +* @brief decode_bch - BCH decoder for 4- and 8-bit error correction * -* @ecc - ECC syndrome generated by hw BCH engine -* @err_loc - pointer to error location array +* @param select_4_8 Indicates the number of error bits. +* @param ecc ECC syndrome generated by hw BCH engine +* @param err_loc pointer to error location array * * This function does post sydrome generation (hw generated) decoding * for:-
drivers/mtd/nand/nand_write.c +70 -66
242 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/9 docs: Enable BAREBOX_CMD_HELP_TEXT() in generated documentation
In reply to Mark Vels--- include/command.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/command.h +1 -1
@@ -95,7 +95,7 @@ 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) +#define BAREBOX_CMD_HELP_TEXT (_text) _text#define BAREBOX_CMD_HELP_END ;#ifdef CONFIG_LONGHELP
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/9 doxygen: Enable LONGHELP output in generated output
In reply to Mark Vels--- Doxyfile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Doxyfile +2 -1
@@ -1070,7 +1070,8 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = \ DOXYGEN_SHOULD_SKIP_THIS \ CONFIG_CMD_DEVINFO \ - CONFIG_NET_TFTP_PUSH + CONFIG_NET_TFTP_PUSH \ + CONFIG_LONGHELP # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded.
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/9 trivial: Small change in page link title
In reply to Mark Vels--- Documentation/manual_org.dox | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/manual_org.dox +1 -1
@@ -1,4 +1,4 @@ -/** @page manual_org Organisation of this Manual +/** @page manual_org Organisation of Doxygen-related files. There is no fixed organisation in this manual, as various source files forwards their content into different parts. So there are more visible menu entries,
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 9/9 help: update of shell commands doxygen/online help documentation
In reply to Mark Vels--- Documentation/commands.dox | 153 ++++++++++++--------- Documentation/developers_manual.dox | 2 +- arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 11 ++ arch/arm/boards/guf-cupid/board.c | 11 ++ arch/arm/boards/pcm043/pcm043.c | 11 ++ arch/arm/cpu/cpu.c | 13 ++- arch/arm/cpu/cpuinfo.c | 10 ++ arch/arm/lib/bootu.c | 11 ++- arch/arm/lib/bootz.c | 12 ++- arch/arm/mach-imx/clko.c | 17 ++- arch/arm/mach-imx/internal-nand-boot.c | 15 ++- arch/arm/mach-imx/speed.c | 15 ++- arch/arm/mach-mxs/imx.c | 11 ++ arch/arm/mach-netx/generic.c | 10 ++ arch/blackfin/boards/ipe337/cmd_alternate.c | 10 ++ arch/mips/lib/cpuinfo.c | 10 ++ commands/bmp.c | 18 +-- commands/bootm.c | 25 ++-- commands/cat.c | 8 +- commands/cd.c | 4 + commands/clear.c | 5 + commands/cp.c | 13 +- commands/crc.c | 11 +- commands/dfu.c | 18 ++- commands/echo.c | 19 ++- commands/edit.c | 13 +- commands/exec.c | 10 ++ commands/export.c | 5 + commands/false.c | 17 +++ commands/flash.c | 75 ++++++----- commands/go.c | 16 ++- commands/gpio.c | 19 +++ commands/help.c | 18 ++- commands/i2c.c | 53 +++++--- commands/insmod.c | 12 ++- commands/led.c | 2 +- commands/loadb.c | 35 ++++- commands/login.c | 14 ++- commands/ls.c | 5 + commands/lsmod.c | 10 ++ commands/mem.c | 137 +++++++++++-------- commands/meminfo.c | 10 ++ commands/memtest.c | 22 ++- commands/menu.c | 123 ++++++++--------- commands/mkdir.c | 14 ++- commands/mount.c | 21 ++-- commands/nand.c | 18 ++- commands/net.c | 21 +++- commands/partition.c | 33 +++-- commands/passwd.c | 13 +- commands/printenv.c | 11 +- commands/pwd.c | 9 ++ commands/readline.c | 12 +- commands/reginfo.c | 9 ++ commands/reset.c | 11 ++ commands/rm.c | 13 ++- commands/rmdir.c | 14 ++- commands/sleep.c | 15 ++- commands/test.c | 16 ++- commands/time.c | 4 +- commands/timeout.c | 22 ++- commands/trigger.c | 5 + commands/true.c | 12 ++ commands/ubi.c | 38 ++++-- commands/umount.c | 12 ++- commands/unlzo.c | 12 ++- commands/usb.c | 12 ++- commands/version.c | 9 ++ common/command.c | 11 ++- common/hush.c | 69 +++++----- drivers/base/driver.c | 28 ++-- drivers/led/led-triggers.c | 2 +- drivers/mtd/nand/nand_bbt.c | 14 ++- net/dhcp.c | 10 ++ net/dns.c | 11 ++- net/nfs.c | 12 ++- net/ping.c | 12 ++ net/tftp.c | 21 ++-- 78 files changed, 1081 insertions(+), 504 deletions(-)
Documentation/commands.dox +91 -62
@@ -15,98 +15,127 @@ available in @a Barebox: \todo Sort this by functionality? -@li @subpage _name +@section section_plat_independent_cmds Platform-independent commands + @li @subpage addpart_command -@li @subpage alternate @li @subpage bmp_command @li @subpage bootm_command -@li @subpage bootu -@li @subpage bootz @li @subpage cat_command @li @subpage cd_command @li @subpage clear_command -@li @subpage clko @li @subpage cp_command -@li @subpage cpufreq -@li @subpage cpuinfo @li @subpage crc32_command @li @subpage delpart_command @li @subpage devinfo_command @li @subpage dfu_command -@li @subpage dhcp -@li @subpage dump_clocks +@li @subpage dhcp_command @li @subpage echo_command @li @subpage edit_command @li @subpage erase_command -@li @subpage ethact -@li @subpage exec -@li @subpage exit +@li @subpage ethact_command +@li @subpage exec_command +@li @subpage exit_command @li @subpage export_command -@li @subpage false -@li @subpage getopt +@li @subpage false_command +@li @subpage getopt_command @li @subpage gpio_get_value_command @li @subpage gpio_set_value_command @li @subpage gpio_direction_input_command @li @subpage gpio_direction_output_command -@li @subpage go -@li @subpage help -@li @subpage host -@li @subpage i2c_probe -@li @subpage i2c_read -@li @subpage i2c_write -@li @subpage icache -@li @subpage iminfo -@li @subpage insmod +@li @subpage go_command +@li @subpage help_command +@li @subpage host_command +@li @subpage i2c_probe_command +@li @subpage i2c_read_command +@li @subpage i2c_write_command +@li @subpage iminfo_command +@li @subpage insmod_command @li @subpage led_command @li @subpage linux16_command @li @subpage loadenv_command -@li @subpage loadb -@li @subpage loady -@li @subpage loadxc -@li @subpage login +@li @subpage loadb_command +@li @subpage loady_command +@li @subpage login_command @li @subpage ls_command -@li @subpage lsmod -@li @subpage md -@li @subpage memcmp -@li @subpage meminfo -@li @subpage memset -@li @subpage menu -@li @subpage mkdir +@li @subpage lsmod_command +@li @subpage md_command +@li @subpage memcpy_command +@li @subpage memcmp_command +@li @subpage meminfo_command +@li @subpage memset_command +@li @subpage menu_command +@li @subpage mkdir_command @li @subpage mount_command -@li @subpage mtest -@li @subpage mw -@li @subpage mycdev -@li @subpage nand -@li @subpage nand_boot_test -@li @subpage nfs -@li @subpage passwd -@li @subpage ping +@li @subpage mtest_command +@li @subpage mw_command +@li @subpage nand_command +@li @subpage nfs_command +@li @subpage passwd_command +@li @subpage ping_command @li @subpage printenv_command @li @subpage protect_command -@li @subpage pwd -@li @subpage readline -@li @subpage reset -@li @subpage rarpboot -@li @subpage reginfo -@li @subpage rm -@li @subpage rmdir +@li @subpage pwd_command +@li @subpage readline_command +@li @subpage reset_command +@li @subpage rarpboot_command +@li @subpage reginfo_command +@li @subpage rm_command +@li @subpage rmdir_command @li @subpage saveenv_command @li @subpage setenv_command -@li @subpage sh -@li @subpage sleep -@li @subpage source -@li @subpage test +@li @subpage sh_command +@li @subpage sleep_command +@li @subpage source_command +@li @subpage test_command @li @subpage time_command -@li @subpage timeout -@li @subpage true +@li @subpage timeout_command +@li @subpage trigger_command +@li @subpage true_command @li @subpage tftp_command -@li @subpage ubiattach -@li @subpage ubimkvol -@li @subpage ubirmvol -@li @subpage umount -@li @subpage unlzo +@li @subpage ubiattach_command +@li @subpage ubimkvol_command +@li @subpage ubirmvol_command +@li @subpage umount_command +@li @subpage unlzo_command @li @subpage unprotect_command -@li @subpage usb -@li @subpage version +@li @subpage usb_command +@li @subpage version_command + +@section section_plat_specific_cmds arch-specific commands +@subsection subsect_arm_specific_cmds ARM platform + +@li @subpage bootu_command +@li @subpage bootz_command +@li @subpage cpuinfo_arm_command "cpuinfo" +@li @subpage icache_command + +@subsection subsect_mips_specific_cmds MIPS platform +@li @subpage cpuinfo_mips_command "cpuinfo" + +@section section_mach_specific_cmds mach-specific commands +@subsection subsection_mach_specific_machimx_cmds mach-imx +@li @subpage clko_command +@li @subpage nand_boot_test_command +@li @subpage dump_clocks_machimx_command "dump_clocks" + +@subsection subsection_mach_specific_machmxs_cmds mach-mxs +@li @subpage dump_clocks_machmxs_command "dump_clocks" + +@subsection subsection_mach_specific_mach_netx_cmds mach-netx +@li @subpage loadxc_command + +@section section_board_specific_cmds Board-specific commands + +@subsection subsection_board_specific_eukreaimx35_cmds Eukrea i.MX35 specific commands +@li @subpage cpufreq_eukreaimx35_command "cpufreq" + +@subsection subsection_board_specific_guf_cupid_cmds GUF Cupid specific commands +@li @subpage cpufreq_guf_cupid_command "cpufreq" + +@subsection subsection_board_specific_pcm043_cmds PCM043 specific commands +@li @subpage cpufreq_pcm043_command "cpufreq" + +@subsection subsection_board_specific_ipe337_cmds IPE337 specific commands +@li @subpage alternate_command */
Documentation/developers_manual.dox +1 -1
@@ -19,6 +19,6 @@ This part of the documentation is intended for developers of @a barebox. @li @subpage boot_preparation @li @subpage barebox_simul @li @subpage io_access_functions -@li @subpage mcfv4e_MCDlib +@li @subpage manual_org "Organisation of Doxygen-related files" */
arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c +11 -0
@@ -359,6 +359,17 @@ static const __maybe_unused char cmd_cpufreq_help[] ="\n" "Set CPU frequency to <freq> MHz\n" ; +BAREBOX_CMD_HELP_START(cpufreq_eukreaimx35) +BAREBOX_CMD_HELP_USAGE("cpufreq 399|532\n") +BAREBOX_CMD_HELP_SHORT("Adjust the CPU frequency\n") +BAREBOX_CMD_HELP_END + +/** + * @page cpufreq_eukreaimx35_command + * \note This command is available only if enabled in menuconfig (CONFIG_MACH_EUKREA_CPUIMX35). + * There are more versions of this command defined for different boards a/o architectures. +*/ + BAREBOX_CMD_START(cpufreq) .cmd = do_cpufreq, .usage = "adjust CPU frequency",
arch/arm/boards/guf-cupid/board.c +11 -0
@@ -361,6 +361,17 @@ static const __maybe_unused char cmd_cpufreq_help[] ="\n" "Set CPU frequency to <freq> MHz\n" ; +BAREBOX_CMD_HELP_START(cpufreq_guf_cupid) +BAREBOX_CMD_HELP_USAGE("cpufreq 399|532\n") +BAREBOX_CMD_HELP_SHORT("Adjust the CPU frequency\n") +BAREBOX_CMD_HELP_END + +/** + * @page cpufreq_guf_cupid_command + * \note This command is available only if enabled in menuconfig (CONFIG_MACH_GUF_CUPID). + * There are more versions of this command defined for different boards a/o architectures. +*/ + BAREBOX_CMD_START(cpufreq) .cmd = do_cpufreq, .usage = "adjust CPU frequency",
arch/arm/boards/pcm043/pcm043.c +11 -0
@@ -330,6 +330,17 @@ static const __maybe_unused char cmd_cpufreq_help[] ="\n" "Set CPU frequency to <freq> MHz\n" ; +BAREBOX_CMD_HELP_START(cpufreq_pcm043) +BAREBOX_CMD_HELP_USAGE("cpufreq 399|532\n") +BAREBOX_CMD_HELP_SHORT("Adjust the CPU frequency\n") +BAREBOX_CMD_HELP_END + +/** + * @page cpufreq_pcm043_command + * \note This command is available only if enabled in menuconfig (CONFIG_MACH_PCM043). + * There are more versions of this command defined for different boards a/o architectures. +*/ + BAREBOX_CMD_START(cpufreq) .cmd = do_cpufreq, .usage = "adjust CPU frequency",
arch/arm/cpu/cpu.c +11 -2
@@ -113,10 +113,19 @@ static int do_icache(struct command *cmdtp, int argc, char *argv[])return 0 ; } +#endif + +BAREBOX_CMD_HELP_START(icache) +BAREBOX_CMD_HELP_USAGE("icache [0|1]\n") +BAREBOX_CMD_HELP_SHORT("Show/change icache status\n") +BAREBOX_CMD_HELP_END -static const __maybe_unused char cmd_icache_help[] = -"Usage: icache [0|1]\n" ; +/** +* @page icache_command +* \note This command is only available for ARM architectures. +*/ +#ifdef CONFIG_COMMAND BAREBOX_CMD_START (icache) .cmd = do_icache, .usage = "show/change icache status",
arch/arm/cpu/cpuinfo.c +10 -0
@@ -129,6 +129,16 @@ static int do_cpuinfo(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(cpuinfo_arm) +BAREBOX_CMD_HELP_USAGE("cpuinfo\n") +BAREBOX_CMD_HELP_SHORT("Show info about CPU\n") +BAREBOX_CMD_HELP_END + +/** + * @page cpuinfo_arm_command + * \note This command is only available for ARM and MIPS architectures. +*/ + BAREBOX_CMD_START(cpuinfo) .cmd = do_cpuinfo, .usage = "Show info about CPU",
arch/arm/lib/bootu.c +9 -2
@@ -27,8 +27,15 @@ static int do_bootu(struct command *cmdtp, int argc, char *argv[])return 1 ; } -static const __maybe_unused char cmd_bootu_help[] = -"Usage: bootu <address>\n" ; +BAREBOX_CMD_HELP_START(bootu) +BAREBOX_CMD_HELP_USAGE("bootu <address>\n") +BAREBOX_CMD_HELP_SHORT("Start a raw linux image\n") +BAREBOX_CMD_HELP_END + +/** + * @page bootu_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_BOOTU). It is currently only available for ARM architectures. +*/ BAREBOX_CMD_START(bootu) .cmd = do_bootu,
arch/arm/lib/bootz.c +9 -3
@@ -118,9 +118,15 @@ err_out:return 1 ; } -static const __maybe_unused char cmd_bootz_help[] = -"Usage: bootz [FILE]\n" -"Boot a Linux zImage\n" ; +BAREBOX_CMD_HELP_START(bootz) +BAREBOX_CMD_HELP_USAGE("bootz <file>\n") +BAREBOX_CMD_HELP_SHORT("Start a linux zImage\n") +BAREBOX_CMD_HELP_END + +/** + * @page bootz_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_BOOTZ). It is currently only available for ARM architectures. +*/ BAREBOX_CMD_START(bootz) .cmd = do_bootz,
arch/arm/mach-imx/clko.c +11 -6
@@ -39,12 +39,17 @@ static int do_clko(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static __maybe_unused char cmd_clko_help[] = -"Usage: clko [OPTION]...\n" -"Route different signals to the i.MX clko pin\n" -" -d <div> Divider\n" -" -s <source> Clock select. See Ref. Manual for valid sources. Use -1\n" -" for disabling clock output\n" ; +BAREBOX_CMD_HELP_START(clko) +BAREBOX_CMD_HELP_USAGE("clko [OPTION]...\n") +BAREBOX_CMD_HELP_SHORT("Route different signals to the i.MX clko pin\n") +BAREBOX_CMD_HELP_OPT("-d <div>", "Divider\n") +BAREBOX_CMD_HELP_OPT("-s <source>", "Clock select. See Ref. Manual for valid sources. Use -1 for disabling clock output\n") +BAREBOX_CMD_HELP_END + +/** + * @page clko_command + * \note This command is available only if enabled in menuconfig (CONFIG_IMX_CLKO). +*/ BAREBOX_CMD_START(clko) .cmd = do_clko,
arch/arm/mach-imx/internal-nand-boot.c +11 -4
@@ -256,10 +256,17 @@ static int do_nand_boot_test(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_nand_boot_test_help[] = -"Usage: nand_boot_test <dest> <size>\n" -"This command loads the booloader from the NAND memory like the reset\n" -"routine does. Its intended for development tests only" ; +BAREBOX_CMD_HELP_START(nand_boot_test) +BAREBOX_CMD_HELP_USAGE("nand_boot_test <dest> <size>\n") +BAREBOX_CMD_HELP_SHORT("Load barebox from NAND.\n") +BAREBOX_CMD_HELP_TEXT("This command loads the booloader from the NAND memory like the reset") +BAREBOX_CMD_HELP_TEXT("routine does. Its intended for development tests only\n") +BAREBOX_CMD_HELP_END + +/** + * @page nand_boot_test_command + * \note This command is available only if enabled in menuconfig (CONFIG_ARCH_IMX_EXTERNAL_BOOT_NAND && CONFIG_NAND_IMX_BOOT_DEBUG). +*/ BAREBOX_CMD_START(nand_boot_test) .cmd = do_nand_boot_test,
arch/arm/mach-imx/speed.c +13 -2
@@ -70,15 +70,26 @@ unsigned int imx_decode_pll(unsigned int reg_val, unsigned int freq)extern void imx_dump_clocks (void ); -static int do_clocks (struct command *cmdtp,int argc,char *argv[]) +static int do_dump_clocks (struct command *cmdtp,int argc,char *argv[]) {imx_dump_clocks ();return 0 ; } +BAREBOX_CMD_HELP_START(dump_clocks_machimx) +BAREBOX_CMD_HELP_USAGE("dump_clocks\n") +BAREBOX_CMD_HELP_SHORT("Show clock frequencies\n") +BAREBOX_CMD_HELP_END + +/** + * @page dump_clocks_machimx_command + * \note This command is available only if enabled in menuconfig (CONFIG_ARCH_IMX). + * It is currently only available for the mach-imx and mach-mxs platforms. +*/ + BAREBOX_CMD_START(dump_clocks) - .cmd = do_clocks, + .cmd = do_dump_clocks, .usage = "show clock frequencies", BAREBOX_CMD_END
arch/arm/mach-mxs/imx.c +11 -0
@@ -29,6 +29,17 @@ static int do_clocks(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(dump_clocks_machmxs) +BAREBOX_CMD_HELP_USAGE("dump_clocks\n") +BAREBOX_CMD_HELP_SHORT("Show clock frequencies\n") +BAREBOX_CMD_HELP_END + +/** + * @page dump_clocks_machmxs_command + * \note This command is available only if enabled in menuconfig (CONFIG_ARCH_MXS). + * It is currently only available for the mach-imx and mach-mxs platforms. +*/ + BAREBOX_CMD_START(dump_clocks) .cmd = do_clocks, .usage = "show clock frequencies",
arch/arm/mach-netx/generic.c +10 -0
@@ -145,9 +145,19 @@ void __noreturn reset_cpu(unsigned long addr)while (1 ); } +BAREBOX_CMD_HELP_START(loadxc) +BAREBOX_CMD_HELP_USAGE("loadxc <xcnr>\n") +BAREBOX_CMD_HELP_SHORT("load xmac/xpec engine number 'xcnr' with ethernet firmware\n") +BAREBOX_CMD_HELP_END + +/** + * @page loadxc_command + * \note This command is available only on the Hilscher NetX-based platforms (CONFIG_ARCH_NETX). +*/ BAREBOX_CMD_START(loadxc) .cmd = do_loadxc, .usage = "load xmac/xpec engine with ethernet firmware", + BAREBOX_CMD_HELP(cmd_loadxc_help) BAREBOX_CMD_END
arch/blackfin/boards/ipe337/cmd_alternate.c +10 -0
@@ -44,6 +44,16 @@ static int do_alternate(struct command *cmdtp, int argc, char *argv[])return (bitcount &1 ) ?3 :2 ; } +BAREBOX_CMD_HELP_START(alternate) +BAREBOX_CMD_HELP_USAGE("alternate <file>\n") +BAREBOX_CMD_HELP_SHORT("Count zero bits in a file\n") +BAREBOX_CMD_HELP_END + +/** +* @page alternate_command +* \note This command is available only if enabled in menuconfig (CONFIG_MACH_IPE337). It is currently only available for the IPE337 architecture. +*/ + static const __maybe_unused char cmd_alternate_help[] ="Usage: alternate <file>" "\n" ;
arch/mips/lib/cpuinfo.c +10 -0
@@ -32,6 +32,16 @@ static int do_cpuinfo(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(cpuinfo_mips) +BAREBOX_CMD_HELP_USAGE("cpuinfo\n") +BAREBOX_CMD_HELP_SHORT("Show info about CPU\n") +BAREBOX_CMD_HELP_END + +/** + * @page cpuinfo_mips_command + * \note This command is only available for ARM and MIPS architectures. +*/ + BAREBOX_CMD_START(cpuinfo) .cmd = do_cpuinfo, .usage = "Show info about CPU",
commands/bmp.c +8 -10
@@ -195,23 +195,21 @@ failed_memmap: } BAREBOX_CMD_HELP_START(bmp) -BAREBOX_CMD_HELP_USAGE("bmp [OPTIONS] FILE\n") -BAREBOX_CMD_HELP_SHORT("Show the bitmap FILE on the framebuffer.\n") +BAREBOX_CMD_HELP_USAGE("bmp [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 ("-o", "render offscreen\n") +BAREBOX_CMD_HELP_TEXT("This command displays a graphics in the bitmap (.bmp) ") +BAREBOX_CMD_HELP_TEXT("format on the framebuffer. Currently the bmp command") +BAREBOX_CMD_HELP_TEXT("supports images with 8 and 24 bit color depth.\n")BAREBOX_CMD_HELP_END -/** * @page bmp_command - -This command displays a graphics in the bitmap (.bmp) format on the -framebuffer. Currently the bmp command supports images with 8 and 24 bit -color depth. - -\todo What does the -o (offscreen) option do? - +* \todo What does the -o (offscreen) option do? +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_BMP). */ BAREBOX_CMD_START (bmp )
commands/bootm.c +14 -11
@@ -328,23 +328,21 @@ err_out: } BAREBOX_CMD_HELP_START(bootm) -BAREBOX_CMD_HELP_USAGE("bootm [-n] image\n") -BAREBOX_CMD_HELP_SHORT("Boot an application image.\n") +BAREBOX_CMD_HELP_USAGE("bootm [-n] <uImage>\n") +BAREBOX_CMD_HELP_SHORT("Boot an application uImage.\n") BAREBOX_CMD_HELP_OPT ("-n", "Do not verify the image (speeds up boot process)\n") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(bootm) .cmd = do_bootm, - .usage = "boot an application image", + .usage = "boot an application uImage", BAREBOX_CMD_HELP(cmd_bootm_help) BAREBOX_CMD_END/** * @page bootm_command - -\todo What does bootm do, what kind of image does it boot? - - */ +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_BOOTM). +*/ #ifdef CONFIG_CMD_IMI static int do_iminfo (struct command *cmdtp,int argc,char *argv[])
@@ -405,10 +403,6 @@ static int image_info (ulong addr)return 0 ; } -BAREBOX_CMD_HELP_START(iminfo) -BAREBOX_CMD_HELP_USAGE("iminfo\n") -BAREBOX_CMD_HELP_SHORT("Print header information for an application image.\n") -BAREBOX_CMD_HELP_ENDBAREBOX_CMD_START (iminfo) .cmd = do_iminfo,
@@ -418,6 +412,15 @@ BAREBOX_CMD_END#endif /* CONFIG_CMD_IMI */ +BAREBOX_CMD_HELP_START(iminfo) +BAREBOX_CMD_HELP_USAGE("iminfo\n") +BAREBOX_CMD_HELP_SHORT("Print header information for an application image.\n") +BAREBOX_CMD_HELP_END +/** +* @page iminfo_command +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_IMI). +*/ +#ifdef CONFIG_BZLIB void bz_internal_error (int errcode) {
commands/cat.c +6 -2
@@ -88,10 +88,14 @@ 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 \\ n and \\ t are printed, but this should be optional.\n") BAREBOX_CMD_HELP_END +/** + * @page cat_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_CAT). +*/ + BAREBOX_CMD_START(cat) .cmd = do_cat, .usage = "concatenate file(s)",
commands/cd.c +4 -0
@@ -52,6 +52,10 @@ 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_END +/** + * @page cd_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_CD). +*/ BAREBOX_CMD_START(cd) .cmd = do_cd,
commands/clear.c +5 -0
@@ -36,6 +36,11 @@ BAREBOX_CMD_HELP_USAGE("clear\n") BAREBOX_CMD_HELP_SHORT("Clear the screen.\n") BAREBOX_CMD_HELP_END +/** + * @page clear_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_CLEAR). +*/ + BAREBOX_CMD_START(clear) .cmd = do_clear, .usage = "clear screen",
commands/cp.c +7 -6
@@ -80,16 +80,17 @@ out: BAREBOX_CMD_HELP_START(cp) BAREBOX_CMD_HELP_USAGE("cp <source> <destination>\n") -BAREBOX_CMD_HELP_SHORT("copy file from <source> to <destination>.\n") +BAREBOX_CMD_HELP_SHORT("copy file from 'source' to 'destination'.\n")BAREBOX_CMD_HELP_END /** * @page cp_command -This command operates on files. - -If you want to copy between memory blocks, use 'memcpy'. - -\todo What does this mean? Add examples. +* This command operates on files. +* +* If you want to copy between memory blocks, use \ref memcpy_command. +* +* \todo What does this mean? Add examples. +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_CP). */ BAREBOX_CMD_START (cp )
commands/crc.c +8 -3
@@ -144,8 +144,8 @@ static int do_crc(struct command *cmdtp, int argc, char *argv[]) } BAREBOX_CMD_HELP_START(crc32) -BAREBOX_CMD_HELP_USAGE("crc32 [OPTION] [AREA]\n") -BAREBOX_CMD_HELP_SHORT("Calculate a crc32 checksum of a memory area.\n") +BAREBOX_CMD_HELP_USAGE("crc32 [OPTION] [<area>]\n") +BAREBOX_CMD_HELP_SHORT("Calculate a crc32 checksum of memory area 'area'.\n") BAREBOX_CMD_HELP_OPT ("-f <file>", "Use file instead of memory.\n")#ifdef CONFIG_CMD_CRC_CMP BAREBOX_CMD_HELP_OPT ("-F <file>" ,"Use file to compare.\n" )
@@ -153,8 +153,13 @@ BAREBOX_CMD_HELP_OPT ("-F <file>", "Use file to compare.\n") BAREBOX_CMD_HELP_OPT ("-v <crc>", "Verify\n") BAREBOX_CMD_HELP_END +/** + * @page crc32_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_CRC). +*/ + BAREBOX_CMD_START(crc32) .cmd = do_crc, .usage = "crc32 checksum calculation", - BAREBOX_CMD_HELP(cmd_crc_help) + BAREBOX_CMD_HELP(cmd_crc32_help) BAREBOX_CMD_END
commands/dfu.c +10 -8
@@ -165,20 +165,22 @@ 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 (" CONFIG_BOARDINFO ")\n") +BAREBOX_CMD_HELP_OPT ("-m <str>", "Manufacturer string (default: barebox)\n") +BAREBOX_CMD_HELP_OPT ("-p <str>", "product string (default: " CONFIG_BOARDINFO ")\n") BAREBOX_CMD_HELP_OPT ("-V <id>", "vendor id\n") BAREBOX_CMD_HELP_OPT ("-P <id>", "product id\n")BAREBOX_CMD_HELP_END /** * @page dfu_command -\<description> has the following form: -device1(name1)[sr],device2(name2)[sr] -'s' means 'safe mode' (download the complete image before flashing) and -'r' that readback of the firmware is allowed. - -\todo Add example, how to use dfu from a Linux or Windows host. +* 'description' has the following form: +* device1(name1)[sr],device2(name2)[sr] +* 's' means 'safe mode' (download the complete image before flashing) and +* 'r' that readback of the firmware is allowed. +* +* \todo Add example, how to use dfu from a Linux or Windows host. +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_DFU). */ BAREBOX_CMD_START (dfu )
commands/echo.c +11 -8
@@ -112,19 +112,22 @@ no_optarg_out: } BAREBOX_CMD_HELP_START(echo) -BAREBOX_CMD_HELP_USAGE("echo [OPTIONS] [STRING]\n") +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", "FIXME\n") -BAREBOX_CMD_HELP_OPT ("-o", "FIXME\n") -BAREBOX_CMD_HELP_OPT ("-e", "FIXME\n") +BAREBOX_CMD_HELP_OPT ("-n", "do not output a trailing newline\n") +BAREBOX_CMD_HELP_OPT ("-o <file>", "Write output to 'file' instead of stdout.\n") +BAREBOX_CMD_HELP_OPT ("-a", "do not truncate but append to an existing file, only valid in combination with -o\n") +BAREBOX_CMD_HELP_OPT ("-e", "process escape sequences. FIXME\n")BAREBOX_CMD_HELP_END /** * @page echo_command - -\todo Add documentation for -a, -o and -e. - +* +* \todo Add documentation for option -e. +* +* \note +* @li This command is available only if enabled in menuconfig (CONFIG_CMD_ECHO). +* @li The -e option is only available if enabled in menuconfig (CONFIG_CMD_ECHO_E). */ BAREBOX_CMD_START (echo )
commands/edit.c +7 -6
@@ -555,12 +555,13 @@ BAREBOX_CMD_HELP_END/** * @page edit_command - -<p> Barebox contains a small text editor which can be used to edit -config files in /env. You can move the cursor around with the arrow keys -and type characters. </p> - -If called as sedit, the editor uses ansi codes to scroll the screen. +* +* <p> Barebox contains a small text editor which can be used to edit +* config files in /env. You can move the cursor around with the arrow keys +* and type characters. </p> +* +* If called as sedit, the editor uses ansi codes to scroll the screen. +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_ECHO). */ BAREBOX_CMD_START (edit)
commands/exec.c +10 -0
@@ -53,6 +53,16 @@ out:return 1 ; } +BAREBOX_CMD_HELP_START(exec) +BAREBOX_CMD_HELP_USAGE("exec <script file>\n") +BAREBOX_CMD_HELP_SHORT("Execute a script\n") +BAREBOX_CMD_HELP_END + +/** + * @page exec_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_EXEC). +*/ + BAREBOX_CMD_START(exec) .cmd = do_exec, .usage = "execute a script",
commands/export.c +5 -0
@@ -56,6 +56,11 @@ BAREBOX_CMD_HELP_USAGE("export <var>[=value]\n") BAREBOX_CMD_HELP_SHORT("export an environment variable to subsequently executed scripts\n") BAREBOX_CMD_HELP_END +/** + * @page export_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_EXPORT). +*/ + BAREBOX_CMD_START(export) .cmd = do_export, .usage = "export environment variables",
commands/false.c +17 -0
@@ -28,6 +28,23 @@ static int do_false(struct command *cmdtp, int argc, char *argv[]) {return 1 ; } +BAREBOX_CMD_HELP_START(false) +BAREBOX_CMD_HELP_USAGE("false\n") +BAREBOX_CMD_HELP_SHORT("Do nothing but exit with a status code indicating failure.\n") +BAREBOX_CMD_HELP_END +/** + * @page false_command + * If this is not what you want, you are probably looking for \ref true_command. + * + * Example: + * @verbatim +barebox:/ false +barebox:/ echo $? +1 +@endverbatim + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_FALSE). +*/ + BAREBOX_CMD_START(false) .cmd = do_false,
commands/flash.c +39 -36
98 lines not on this page · raw message
commands/go.c +11 -5
@@ -77,11 +77,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_USAGE("go <addr>|<file> [arg ...]\n") +BAREBOX_CMD_HELP_SHORT("Start application at address 'addr' or with filename 'file' passing 'arg' as arguments.\n") +BAREBOX_CMD_HELP_TEXT("If addr does not start with a digit it is interpreted as a filename\n") +BAREBOX_CMD_HELP_TEXT("in which case the file is memmapped and executed\n") +BAREBOX_CMD_HELP_END + +/** + * @page go_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_GO). +*/ BAREBOX_CMD_START(go) .cmd = do_go,
commands/gpio.c +19 -0
@@ -41,6 +41,11 @@ 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 +/** + * @page gpio_get_value_command + * \note this command is available only if enabled in menuconfig (CONFIG_CMD_GPIO). +*/ + BAREBOX_CMD_START(gpio_get_value) .cmd = do_gpio_get_value, .usage = "return value of a gpio pin",
@@ -67,6 +72,11 @@ 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 +/** + * @page gpio_set_value_command + * \note this command is available only if enabled in menuconfig (CONFIG_CMD_GPIO). +*/ + BAREBOX_CMD_START(gpio_set_value) .cmd = do_gpio_set_value, .usage = "set a gpio's output value",
@@ -94,6 +104,10 @@ 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 +/** + * @page gpio_direction_input_command + * \note this command is available only if enabled in menuconfig (CONFIG_CMD_GPIO). +*/ BAREBOX_CMD_START(gpio_direction_input) .cmd = do_gpio_direction_input, .usage = "set direction of a gpio pin to input",
@@ -122,6 +136,11 @@ 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 +/** + * @page gpio_direction_output_command + * \note this command is available only if enabled in menuconfig (CONFIG_CMD_GPIO). +*/ + BAREBOX_CMD_START(gpio_direction_output) .cmd = do_gpio_direction_output, .usage = "set direction of a gpio pin to output",
commands/help.c +12 -6
@@ -52,15 +52,21 @@ static int do_help(struct command * cmdtp, 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" -"To get detailed help information for specific commands you can type\n" -"'help' with one or more command names as arguments.\n" ; +BAREBOX_CMD_HELP_START(help) +BAREBOX_CMD_HELP_USAGE("help [command]\n") +BAREBOX_CMD_HELP_SHORT("Show help information (for 'command')\n") +BAREBOX_CMD_HELP_TEXT("Without arguments, it prints a short usage message for all commands.\n\n") +BAREBOX_CMD_HELP_TEXT("To get detailed help information for specific commands you can type\n") +BAREBOX_CMD_HELP_TEXT("'help' with one or more command names as arguments.\n") +BAREBOX_CMD_HELP_END static const char *help_aliases[] = { "?", NULL}; +/** +* @page help_command +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_HELP). +*/ +BAREBOX_CMD_START (help) .cmd = do_help, .aliases = help_aliases,
commands/i2c.c +36 -17
71 lines not on this page · raw message
commands/insmod.c +9 -3
@@ -32,9 +32,15 @@ static int do_insmod(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_insmod_help[] = -"Usage: insmod <module>\n" ; - +BAREBOX_CMD_HELP_START(insmod) +BAREBOX_CMD_HELP_USAGE("insmod <module>\n") +BAREBOX_CMD_HELP_SHORT("Insert a module\n") +BAREBOX_CMD_HELP_END + +/** + * @page insmod_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_INSMOD). +*/ BAREBOX_CMD_START(insmod) .cmd = do_insmod, .usage = "insert a module",
commands/led.c +1 -1
@@ -88,7 +88,7 @@ The exact meaning of <value> is unspecified. It can be a color in case ofLEDs or a brightness if this is controllable. In most cases only 1 for enabled is allowed. -\note This command is available only if enabled in menuconfig. +\note This command is available only if enabled in menuconfig(CONFIG_CMD_LED). */ BAREBOX_CMD_START (led)
commands/loadb.c +28 -7
@@ -796,13 +796,20 @@ static int do_load_serial_bin(struct command *cmdtp, 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_USAGE("loadb [OPTIONS]\n") +BAREBOX_CMD_HELP_SHORT("Load binary file over serial line (kermit mode)\n") +BAREBOX_CMD_HELP_OPT("-f <file>", "where to download to; defaults to " DEF_FILE "\n") +BAREBOX_CMD_HELP_OPT("-o <offset>", "what offset to download; defaults to 0\n") +BAREBOX_CMD_HELP_OPT("-b <baudrate>", "baudrate at which to download; defaults to console baudrate\n") +BAREBOX_CMD_HELP_OPT("-c", "Create file if it is not present; disabled by default\n") +BAREBOX_CMD_HELP_END + +/** +* @page loadb_command +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_LOADB). +*/ +#ifdef CONFIG_CMD_LOADB BAREBOX_CMD_START (loadb) .cmd = do_load_serial_bin,
@@ -810,6 +817,20 @@ BAREBOX_CMD_START(loadb)BAREBOX_CMD_HELP (cmd_loadb_help) BAREBOX_CMD_END#endif + +BAREBOX_CMD_HELP_START(loady) +BAREBOX_CMD_HELP_USAGE("loady [OPTIONS]\n") +BAREBOX_CMD_HELP_SHORT("Load binary file over serial line (ymodem mode)\n") +BAREBOX_CMD_HELP_OPT("-f <file>", "where to download to; defaults to " DEF_FILE "\n") +BAREBOX_CMD_HELP_OPT("-o <offset>", "what offset to download; defaults to 0\n") +BAREBOX_CMD_HELP_OPT("-b <baudrate>", "baudrate at which to download; defaults to console baudrate\n") +BAREBOX_CMD_HELP_OPT("-c", "Create file if it is not present; disabled by default\n") +BAREBOX_CMD_HELP_END + +/** +* @page loady_command +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_LOADY). +*/#ifdef CONFIG_CMD_LOADY BAREBOX_CMD_START (loady) .cmd = do_load_serial_bin,
commands/login.c +9 -5
@@ -70,12 +70,16 @@ static int do_login(struct command *cmdtp, 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_USAGE("login [-t <timeout> [<command>]]\n") +BAREBOX_CMD_HELP_SHORT("login\n") +BAREBOX_CMD_HELP_OPT("-t <timeout>", "If a timeout is specified, the command will be executed after the timeout expired. The default command is 'boot'\n") +BAREBOX_CMD_HELP_END +/** + * @page login_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_LOGIN). +*/ BAREBOX_CMD_START(login) .cmd = do_login, .usage = "login",
commands/ls.c +5 -0
@@ -202,6 +202,11 @@ BAREBOX_CMD_HELP_OPT ("-C", "list entries by columns\n") BAREBOX_CMD_HELP_OPT ("-1", "list one file per line\n") BAREBOX_CMD_HELP_END +/** + * @page ls_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_LS). +*/ + BAREBOX_CMD_START(ls) .cmd = do_ls, .usage = "list a file or directory",
commands/lsmod.c +10 -0
@@ -12,7 +12,17 @@ static int do_lsmod(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(lsmod) +BAREBOX_CMD_HELP_USAGE("lsmod\n") +BAREBOX_CMD_HELP_SHORT("List the currently inserted modules.\n") +BAREBOX_CMD_HELP_END + +/** + * @page lsmod_command + * \note This command is available only if enabled in menuconfig(CONFIG_CMD_LSMOD). +*/ BAREBOX_CMD_START(lsmod) .cmd = do_lsmod, .usage = "list modules", + BAREBOX_CMD_HELP(cmd_lsmod_help) BAREBOX_CMD_END
commands/mem.c +82 -55
167 lines not on this page · raw message
commands/meminfo.c +10 -0
@@ -30,7 +30,17 @@ static int do_meminfo(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(meminfo) +BAREBOX_CMD_HELP_USAGE("meminfo\n") +BAREBOX_CMD_HELP_SHORT("Print info about memory usage.\n") +BAREBOX_CMD_HELP_END + +/** + * @page meminfo_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_MEMINFO). +*/ BAREBOX_CMD_START(meminfo) .cmd = do_meminfo, .usage = "print info about memory usage", + BAREBOX_CMD_HELP(cmd_meminfo_help) BAREBOX_CMD_END
commands/memtest.c +15 -7
@@ -340,13 +340,21 @@ static int do_mem_mtest(struct command *cmdtp, int argc, char *argv[])return mem_test (start, end, pattern); } -static const __maybe_unused char cmd_mtest_help[] = -"Usage: <start> <end> " -#ifdef CONFIG_CMD_MTEST_ALTERNATIVE -"[pattern]" -#endif -"\nsimple RAM read/write test\n" ; - +BAREBOX_CMD_HELP_START(mtest) +BAREBOX_CMD_HELP_USAGE("mtest <startaddr> <endaddr> [pattern (*)]\n") +BAREBOX_CMD_HELP_SHORT("Simple memory read/write test.\n") +BAREBOX_CMD_HELP_TEXT("\n") +BAREBOX_CMD_HELP_TEXT("Perform a memory test. A more complete alternative test") +BAREBOX_CMD_HELP_TEXT("can be configured using CONFIG_CMD_MTEST_ALTERNATIVE. In") +BAREBOX_CMD_HELP_TEXT("this case, any 'pattern' argument is ignored. The complete test") +BAREBOX_CMD_HELP_TEXT("loops until interrupted by ctrl-c or by a failure of one of the") +BAREBOX_CMD_HELP_TEXT("sub-tests.") +BAREBOX_CMD_HELP_END + +/** + * @page mtest_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_MTEST). +*/ BAREBOX_CMD_START(mtest) .cmd = do_mem_mtest, .usage = "simple RAM test",
commands/menu.c +60 -63
129 lines not on this page · raw message
commands/mkdir.c +10 -4
@@ -59,12 +59,18 @@ static int do_mkdir(struct command *cmdtp, 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_USAGE("mkdir [OPTIONS] <directory> [directories]\n") +BAREBOX_CMD_HELP_SHORT("Create new directories.\n") +BAREBOX_CMD_HELP_OPT("-p", "Create parent directories if they do not exist.\n") +BAREBOX_CMD_HELP_END +/** + * @page mkdir_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_MKDIR). +*/ BAREBOX_CMD_START(mkdir) .cmd = do_mkdir, - .usage = "make directories", + .usage = "Create new directories.", BAREBOX_CMD_HELP(cmd_mkdir_help) BAREBOX_CMD_END
commands/mount.c +10 -11
@@ -66,17 +66,16 @@ BAREBOX_CMD_HELP_END/** * @page mount_command - -<ul> -<li>\<device> can be a device in /dev or some arbitrary string if no -device is needed for this driver, i.e. on ramfs. </li> -<li>\<fstype> is the filesystem driver. A list of available drivers can -be shown with the \ref devinfo_command command.</li> -<li>\<mountpoint> must be an empty directory, one level below the / -directory.</li> -</ul> - -*/ +* +* @li <device> can be a device in /dev or some arbitrary string if no +* device is needed for this driver, i.e. on ramfs. +* @li <fstype> is the filesystem driver. A list of available drivers can +* be shown with the \ref devinfo_command command. +* @li <mountpoint> must be an empty directory, one level below the / +* directory. +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_MOUNT). +*/ /** * @page how_mount_works How mount works in barebox
commands/nand.c +12 -6
@@ -100,12 +100,18 @@ static int do_nand(struct command *cmdtp, 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_USAGE("nand [OPTION]...\n") +BAREBOX_CMD_HELP_SHORT("NAND specific handling.\n") +BAREBOX_CMD_HELP_OPT("-a <dev>", "register a bad block aware device ontop of a normal nand device\n") +BAREBOX_CMD_HELP_OPT("-d <dev>", "deregister a bad block aware device\n") +BAREBOX_CMD_HELP_OPT("-b <ofs> <dev>", "mark block at offset 'ofs' as bad\n") +BAREBOX_CMD_HELP_END + +/** + * @page nand_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_NAND). +*/ BAREBOX_CMD_START(nand) .cmd = do_nand,
commands/net.c +19 -2
@@ -57,6 +57,7 @@ static int do_rarpb(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_START (rarpboot) .cmd = do_rarpb, .usage = "boot image via network using rarp/tftp protocol",
@@ -64,6 +65,15 @@ BAREBOX_CMD_START(rarpboot) BAREBOX_CMD_END #endif /* CONFIG_NET_RARP */ +BAREBOX_CMD_HELP_START(rarpboot) +BAREBOX_CMD_HELP_USAGE("rarpboot [loadAddress] [bootfilename]\n") +BAREBOX_CMD_HELP_SHORT("boot image via network using rarp/tftp protocol\n") +BAREBOX_CMD_HELP_END +/** +* @page rarpboot_command +* \note This command is available only if enabled in menuconfig(CONFIG_CMD_NET && CONFIG_NET_RARP). +*/ + static int do_ethact(struct command *cmdtp, int argc, char *argv[]) {struct eth_device *edev;
@@ -89,8 +99,15 @@ static int do_ethact(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_ethact_help[] = -"Usage: ethact [ethx]\n" ; +BAREBOX_CMD_HELP_START(ethact) +BAREBOX_CMD_HELP_USAGE("ethact [ethernet device]\n") +BAREBOX_CMD_HELP_SHORT("Set current ethernet device\n") +BAREBOX_CMD_HELP_END + +/** + * @page ethact_command + * \note This command is available only if enabled in menuconfig(CONFIG_CMD_NET). +*/ BAREBOX_CMD_START(ethact) .cmd = do_ethact,
commands/partition.c +18 -15
@@ -158,14 +158,15 @@ BAREBOX_CMD_HELP_END/** * @page addpart_command - -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. - -\todo This command has to be reworked and will probably change it's API. +* 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. +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_PARTITION). +* +* \todo This command has to be reworked and will probably change it's API. */ BAREBOX_CMD_START (addpart)
@@ -196,13 +197,15 @@ BAREBOX_CMD_HELP_END/** * @page delpart_command - -Partitions are created by adding their description with the addpart -command. If you want to get rid of a partition again, use delpart. The -argument list is taken as a list of partitions to be deleted. - -\todo Add an example - +* +* Partitions are created by adding their description with the \ref addpart_command +* command. If you want to get rid of a partition again, use delpart. The +* argument list is taken as a list of partitions to be deleted. +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_PARTITION). +* +* \todo Add an example +* */ BAREBOX_CMD_START (delpart)
commands/passwd.c +8 -5
@@ -85,11 +85,14 @@ disable:return ret; } -static const __maybe_unused char cmd_passwd_help[] = -"Usage: passwd\n" -"passwd allow you to specify a password\n" -"to disable it put an empty password\n" -; +BAREBOX_CMD_HELP_START(passwd) +BAREBOX_CMD_HELP_USAGE("passwd\n") +BAREBOX_CMD_HELP_SHORT("Allows you to specify a password. To disable, specify an empty password.\n") +BAREBOX_CMD_HELP_END +/** + * @page passwd_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_PASSWD). +*/ BAREBOX_CMD_START(passwd) .cmd = do_passwd,
commands/printenv.c +6 -5
@@ -72,11 +72,12 @@ BAREBOX_CMD_HELP_END/** * @page printenv_command - -<p>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.</p> - +* +* 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. +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_PRINTENV). */ BAREBOX_CMD_START (printenv)
commands/pwd.c +9 -0
@@ -29,7 +29,16 @@ static int do_pwd(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(pwd) +BAREBOX_CMD_HELP_USAGE("pwd\n") +BAREBOX_CMD_HELP_SHORT("Print the current working directory.\n") +BAREBOX_CMD_HELP_END +/** + * @page pwd_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_PWD). +*/ BAREBOX_CMD_START(pwd) .cmd = do_pwd, .usage = "print working directory", + BAREBOX_CMD_HELP(cmd_pwd_help) BAREBOX_CMD_END
commands/readline.c +8 -4
@@ -45,10 +45,14 @@ static int do_readline(struct command *cmdtp, 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_USAGE("readline <prompt> <var>\n") +BAREBOX_CMD_HELP_SHORT("readline prints 'prompt' on output and reads a line of user input into variable 'var'.\n") +BAREBOX_CMD_HELP_END +/** + * @page readline_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_READLINE). +*/ BAREBOX_CMD_START(readline) .cmd = do_readline, .usage = "prompt for user input",
commands/reginfo.c +9 -0
@@ -29,7 +29,16 @@ static int do_reginfo(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(reginfo) +BAREBOX_CMD_HELP_USAGE("reginfo\n") +BAREBOX_CMD_HELP_SHORT("Print register information.\n") +BAREBOX_CMD_HELP_END +/** + * @page reginfo_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_REGINFO). +*/ BAREBOX_CMD_START(reginfo) .cmd = do_reginfo, .usage = "print register information", + BAREBOX_CMD_HELP(cmd_reginfo_help) BAREBOX_CMD_END
commands/reset.c +11 -0
@@ -31,7 +31,18 @@ static int cmd_reset(struct command *cmdtp, int argc, char *argv[])return 1 ; } +BAREBOX_CMD_HELP_START(reset) +BAREBOX_CMD_HELP_USAGE("reset\n") +BAREBOX_CMD_HELP_SHORT("Perform RESET of the CPU") +BAREBOX_CMD_HELP_END + +/** + * @page reset_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_RESET). +*/ + BAREBOX_CMD_START(reset) .cmd = cmd_reset, .usage = "Perform RESET of the CPU", + BAREBOX_CMD_HELP(cmd_reset_help) BAREBOX_CMD_END
commands/rm.c +9 -4
@@ -42,12 +42,17 @@ static int do_rm(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_rm_help[] = -"Usage: rm [FILES]\n" -"Remove files\n" ; +BAREBOX_CMD_HELP_START(rm) +BAREBOX_CMD_HELP_USAGE("rm <files>\n") +BAREBOX_CMD_HELP_SHORT("Remove one or more files.\n") +BAREBOX_CMD_HELP_END +/** + * @page rm_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_RM). +*/ BAREBOX_CMD_START(rm) .cmd = do_rm, - .usage = "remove files", + .usage = "remove one or more files", BAREBOX_CMD_HELP(cmd_rm_help) BAREBOX_CMD_END
commands/rmdir.c +10 -4
@@ -21,12 +21,18 @@ static int do_rmdir(struct command *cmdtp, 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_USAGE("rmdir <directory> [directories]\n") +BAREBOX_CMD_HELP_SHORT("Remove one or more directories. The directories must be empty.\n") +BAREBOX_CMD_HELP_END + +/** + * @page rmdir_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_RMDIR). +*/ BAREBOX_CMD_START(rmdir) .cmd = do_rmdir, - .usage = "remove directorie(s)", + .usage = "remove one or more directories", BAREBOX_CMD_HELP(cmd_rmdir_help) BAREBOX_CMD_END
commands/sleep.c +14 -1
@@ -43,7 +43,20 @@ static int do_sleep(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(sleep) +BAREBOX_CMD_HELP_USAGE("sleep <n>\n") +BAREBOX_CMD_HELP_SHORT("Delay execution for 'n' seconds.\n") +BAREBOX_CMD_HELP_TEXT("\n") +BAREBOX_CMD_HELP_TEXT("This command can be aborted using ctrl-c.") +BAREBOX_CMD_HELP_END + +/** + * @page sleep_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_SLEEP). +*/ + BAREBOX_CMD_START(sleep) .cmd = do_sleep, - .usage ="delay execution for n seconds" , + .usage = "delay execution for 'n' seconds", + BAREBOX_CMD_HELP(cmd_sleep_help) BAREBOX_CMD_END
commands/test.c +10 -6
@@ -222,16 +222,20 @@ 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\n" -"see 'man test' on your PC for more information.\n" ; +BAREBOX_CMD_HELP_START(test) +BAREBOX_CMD_HELP_USAGE("test [OPTIONS]\n") +BAREBOX_CMD_HELP_SHORT("Minimal test implementation like in /bin/sh\n") +BAREBOX_CMD_HELP_SHORT("see 'man test' on your PC for more information.\n") +BAREBOX_CMD_HELP_END -static const __maybe_unused char cmd_test_usage[] ="minimal test like /bin/sh" ; +/** + * @page test_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_TEST). +*/ BAREBOX_CMD_START(test) .aliases = test_aliases, .cmd = do_test, - .usage = cmd_test_usage, + .usage = "minimal test like /bin/sh", BAREBOX_CMD_HELP(cmd_test_help) BAREBOX_CMD_END
commands/time.c +2 -2
@@ -52,8 +52,8 @@ BAREBOX_CMD_HELP_END/** * @page time_command -\note @li This command depends on <command> being interruptible, otherwise the timer may overrun resulting in incorrect results. -@li This command is available only if enabled in menuconfig. +\note @li This command depends on <command> being interruptible, otherwise the timer may overrun resulting in incorrect results. +@li This command is available only if enabled in menuconfig(CONFIG_CMD_TIME). */ BAREBOX_CMD_START (time)
commands/timeout.c +14 -8
@@ -93,15 +93,21 @@ 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_USAGE("timeout [OPTIONS] <timeout>\n") +BAREBOX_CMD_HELP_SHORT("Wait 'timeout' seconds for a timeout.\n") +BAREBOX_CMD_HELP_OPT("-a", "interrupt on any key\n") +BAREBOX_CMD_HELP_OPT("-c", "interrupt on ctrl-c\n") +BAREBOX_CMD_HELP_OPT("-r", "interrupt on return\n") +BAREBOX_CMD_HELP_OPT("-s", "silent mode\n") +BAREBOX_CMD_HELP_TEXT("Return 1 if the user intervented, or 0 otherwise (and ") +BAREBOX_CMD_HELP_TEXT("thus a timeout occured).\n") +BAREBOX_CMD_HELP_END +/** + * @page timeout_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_TIMEOUT). +*/ BAREBOX_CMD_START(timeout) .cmd = do_timeout, .usage = "wait for a specified timeout",
commands/trigger.c +5 -0
@@ -99,6 +99,11 @@ 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_END +/** + * @page trigger_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_TRIGGER). +*/ + BAREBOX_CMD_START(trigger) .cmd = do_trigger, .usage = "handle LED triggers",
commands/true.c +12 -0
@@ -29,8 +29,20 @@ static int do_true(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(true) +BAREBOX_CMD_HELP_USAGE("true\n") +BAREBOX_CMD_HELP_SHORT("Do nothing but exit with a status code indicating success.\n") +BAREBOX_CMD_HELP_END +/** + * @page true_command + * If this is not what you want, you are probably looking for \ref false_command. + * + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_TRUE). +*/ + BAREBOX_CMD_START(true) .cmd = do_true, .usage = "do nothing, successfully", + BAREBOX_CMD_HELP(cmd_true_help) BAREBOX_CMD_END
commands/ubi.c +28 -10
@@ -44,10 +44,16 @@ static int do_ubimkvol(struct command *cmdtp, 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 os zero all available space is used for the volume\n" ; +BAREBOX_CMD_HELP_START(ubimkvol) +BAREBOX_CMD_HELP_USAGE("ubimkvol <ubidev> <name> <size>\n") +BAREBOX_CMD_HELP_SHORT("Create an ubi volume on 'ubidev' with name 'name' and size 'size'.\n") +BAREBOX_CMD_HELP_TEXT("If 'size' is set to 0, all available space is used for the volume.\n") +BAREBOX_CMD_HELP_END + +/** + * @page ubimkvol_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_UBI). +*/ BAREBOX_CMD_START(ubimkvol) .cmd = do_ubimkvol,
@@ -82,9 +88,15 @@ static int do_ubiattach(struct command *cmdtp, int argc, char *argv[])return ret ?1 :0 ; } -static const __maybe_unused char cmd_ubiattach_help[] = -"Usage: ubiattach <mtddev>\n" -"Attach <mtddev> to ubi\n" ; +BAREBOX_CMD_HELP_START(ubiattach) +BAREBOX_CMD_HELP_USAGE("ubiattach <mtddev>\n") +BAREBOX_CMD_HELP_SHORT("Attach 'mtddev' to ubi.\n") +BAREBOX_CMD_HELP_END + +/** + * @page ubiattach_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_UBI). +*/ BAREBOX_CMD_START(ubiattach) .cmd = do_ubiattach,
@@ -117,9 +129,15 @@ static int do_ubirmvol(struct command *cmdtp, 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_USAGE("ubirmvol <ubidev> <name>\n") +BAREBOX_CMD_HELP_SHORT("Delete ubi volume 'name' from 'ubidev'\n") +BAREBOX_CMD_HELP_END + +/** + * @page ubirmvol_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_UBI). +*/ BAREBOX_CMD_START(ubirmvol) .cmd = do_ubirmvol,
commands/umount.c +9 -3
@@ -38,9 +38,15 @@ static int do_umount(struct command *cmdtp, int argc, char *argv[])return 0 ; } -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_USAGE("umount <mountpoint>\n") +BAREBOX_CMD_HELP_SHORT("Detach a filesystem mounted on a 'mountpoint'\n") +BAREBOX_CMD_HELP_END + +/** + * @page umount_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_UMOUNT). +*/ BAREBOX_CMD_START(umount) .cmd = do_umount,
commands/unlzo.c +9 -3
@@ -57,9 +57,15 @@ exit_close:return ret; } -static const __maybe_unused char cmd_unlzo_help[] = -"Usage: unlzo <infile> <outfile>\n" -"Uncompress a lzo compressed file\n" ; +BAREBOX_CMD_HELP_START(unlzo) +BAREBOX_CMD_HELP_USAGE("unlzo <infile> <outfile>\n") +BAREBOX_CMD_HELP_SHORT("Uncompress a lzo compressed file.\n") +BAREBOX_CMD_HELP_END + +/** + * @page unlzo_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_UNLZO). +*/ BAREBOX_CMD_START(unlzo) .cmd = do_unlzo,
commands/usb.c +9 -3
@@ -30,9 +30,15 @@ static int do_usb(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_usb_help[] = -"Usage: usb\n" -"(re-)detect USB devices\n" ; +BAREBOX_CMD_HELP_START(usb) +BAREBOX_CMD_HELP_USAGE("usb\n") +BAREBOX_CMD_HELP_SHORT("(Re-)detect USB devices\n") +BAREBOX_CMD_HELP_END + +/** + * @page usb_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_USB). +*/ BAREBOX_CMD_START(usb) .cmd = do_usb,
commands/version.c +9 -0
@@ -30,6 +30,15 @@ static int do_version(struct command *cmdtp, int argc, char *argv[])return 0 ; } +BAREBOX_CMD_HELP_START(version) +BAREBOX_CMD_HELP_USAGE("version\n") +BAREBOX_CMD_HELP_SHORT("Print monitor version\n") +BAREBOX_CMD_HELP_END + +/** + * @page version_command + * \note This command is available only if enabled in menuconfig (CONFIG_CMD_VERSION). +*/ BAREBOX_CMD_START(version) .cmd = do_version, .usage = "print monitor version",
common/command.c +10 -1
@@ -55,9 +55,18 @@ BAREBOX_CMD_START(exit) .cmd = do_exit, .usage = "exit script", BAREBOX_CMD_END -#endif +BAREBOX_CMD_HELP_START(exit) +BAREBOX_CMD_HELP_USAGE("exit\n") +BAREBOX_CMD_HELP_SHORT("Exit a script\n") +BAREBOX_CMD_HELP_END + +/** +* @page exit_command +* \note This command is only available in the Hush shell (CONFIG_SHELL_HUSH). +*/ + void barebox_cmd_usage(struct command *cmdtp) {#ifdef CONFIG_LONGHELP
common/hush.c +33 -36
103 lines not on this page · raw message
drivers/base/driver.c +16 -12
@@ -368,24 +368,25 @@ static int do_devinfo(struct command *cmdtp, int argc, char *argv[])return 0 ; } +#endif BAREBOX_CMD_HELP_START(devinfo) -BAREBOX_CMD_HELP_USAGE("devinfo [DEVICE]\n") -BAREBOX_CMD_HELP_SHORT("Output device information.\n") +BAREBOX_CMD_HELP_USAGE("devinfo [<device>]\n") +BAREBOX_CMD_HELP_SHORT("Output device information for 'device'.\n")BAREBOX_CMD_HELP_END /** * @page devinfo_command - -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. - -Example from an MPC5200 based system: - -@verbatim +* +* 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. +* +* Example from an MPC5200 based system: +* +* @verbatim barebox:/ devinfo /dev/eth0 base : 0x1002b000 size : 0x00000000
@@ -399,8 +400,11 @@ Example from an MPC5200 based system:netmask = 255.255.255.0 serverip = 192.168.23.2 @endverbatim +* +* \note This command is available only if enabled in menuconfig (CONFIG_CMD_DEVINFO). */ +#ifdef CONFIG_CMD_DEVINFO BAREBOX_CMD_START (devinfo) .cmd = do_devinfo, .usage = "Show information about devices and drivers.",
drivers/led/led-triggers.c +1 -1
@@ -81,7 +81,7 @@ static struct poller_struct trigger_poller = {/** * led_trigger - triggers a trigger * @param trigger The trigger to enable/disable -* @param enable true if enable +* @param type The trigger type (TRIGGER_ENABLE|TRIGGER_DISABLE|TRIGGER_FLASH) * * Enable/disable a LED for a given trigger. */
drivers/mtd/nand/nand_bbt.c +11 -3
@@ -680,8 +680,12 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, ops.ooblen = (len >> this->page_shift) * mtd->oobsize; ops.oobbuf = &buf[len]; res = mtd->read_oob (mtd, to + mtd->writesize, &ops); -if (res <0 || ops.oobretlen != ops.ooblen) +if (res <0 || ops.oobretlen != ops.ooblen){ +printk (KERN_DEBUG "Could not read OOB data " +"(res=%d, oobretlen=%d, ooblen=%d)\n" , + res, ops.oobretlen, ops.ooblen); goto outerr; + }/* Calc the byte offset in the buffer */ pageoffs = page - (int )(to >> this->page_shift);
@@ -726,12 +730,16 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, einfo.addr = (unsigned long )to; einfo.len =1 << this->bbt_erase_shift; res =nand_erase_nand (mtd, &einfo,1 ); -if (res <0 ) +if (res <0 ){ +printk (KERN_WARNING "Nand_erase_nand() failed! \n" ); goto outerr; + } res =scan_write_bbt (mtd, to, len, buf, &buf[len]); -if (res <0 ) +if (res <0 ){ +printk (KERN_WARNING "Scan_write_bbt() failed! \n" ); goto outerr; + }printk (KERN_DEBUG "Bad block table written to 0x%08x, version " "0x%02X\n" , (unsigned int )to, td->version[chip]);
net/dhcp.c +10 -0
@@ -477,6 +477,16 @@ out:return ret ?1 :0 ; } +BAREBOX_CMD_HELP_START(dhcp) +BAREBOX_CMD_HELP_USAGE("dhcp\n") +BAREBOX_CMD_HELP_SHORT("Invoke dhcp client to obtain ip/boot params\n") +BAREBOX_CMD_HELP_END +/** + * @page dhcp_command + * \note This command is available only if enabled in menuconfig (CONFIG_NET_DHCP). +*/ + + BAREBOX_CMD_START(dhcp) .cmd = do_dhcp, .usage = "invoke dhcp client to obtain ip/boot params",
net/dns.c +9 -2
@@ -253,8 +253,15 @@ static int do_host(struct command *cmdtp, int argc, char *argv[])return 0 ; } -static const __maybe_unused char cmd_host_help[] = -"Usage: host <hostname>\n" ; +BAREBOX_CMD_HELP_START(host) +BAREBOX_CMD_HELP_USAGE("host <hostname>\n") +BAREBOX_CMD_HELP_SHORT("Resolve a host name\n") +BAREBOX_CMD_HELP_END + +/** + * @page host_command + * \note This command is available only if enabled in meuconfig (CONFIG_NET_RESOLV). +*/ BAREBOX_CMD_START(host) .cmd = do_host,
net/nfs.c +9 -3
@@ -725,9 +725,15 @@ 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_HELP_START(nfs) +BAREBOX_CMD_HELP_USAGE("nfs <file> [localfile]\n") +BAREBOX_CMD_HELP_SHORT("Load a file via network using nfs protocol\n") +BAREBOX_CMD_HELP_END + +/** + * @page nfs_command + * \note This command is available only if enabled in menuconfig (CONFIG_NET_NFS). +*/ BAREBOX_CMD_START(nfs) .cmd = do_nfs,
net/ping.c +12 -0
@@ -107,7 +107,19 @@ out:return ping_state ==PING_STATE_SUCCESS ?0 :1 ; } +BAREBOX_CMD_HELP_START(ping) +BAREBOX_CMD_HELP_USAGE("ping <destination>\n") +BAREBOX_CMD_HELP_SHORT("send ICMP ECHO_REQUEST to network host.\n") +BAREBOX_CMD_HELP_TEXT("Ping allows you to test a network connection ") +BAREBOX_CMD_HELP_TEXT("to another host on the network or see if it is alive.") +BAREBOX_CMD_HELP_END +/** + * @page ping_command + * \note This command is available only if enabled in menuconfig (CONFIG_NET_PING). +*/ + BAREBOX_CMD_START(ping) .cmd = do_ping, .usage = "ping <destination>", + BAREBOX_CMD_HELP(cmd_ping_help) BAREBOX_CMD_END
net/tftp.c +12 -9
@@ -368,6 +368,7 @@ BAREBOX_CMD_HELP_START(tftp)#ifdef CONFIG_NET_TFTP_PUSH BAREBOX_CMD_HELP_USAGE("tftp <remotefile> [localfile], tftp -p <localfile> [remotefile]\n") BAREBOX_CMD_HELP_SHORT("Load a file from or upload to TFTP server.\n") +BAREBOX_CMD_HELP_OPT ("-p" ,"Upload (push) from local to remote system instead of downloading.\n" ); BAREBOX_CMD_HELP_END#else BAREBOX_CMD_HELP_USAGE ("tftp <remotefile> [localfile]\n" )
@@ -377,15 +378,17 @@ BAREBOX_CMD_HELP_END/** * @page tftp_command - -The second file argument can be skipped in which case the first filename -is used (without the directory part). - -\<localfile> can be the local filename or a device file under /dev. -This also works for flash memory. Refer to \ref erase_command and \ref -unprotect_command for flash preparation. - -\note This command is available only if enabled in menuconfig. +* +* The second file argument can be skipped in which case the first filename +* is used (without the directory part). +* +* <localfile> can be the local filename or a device file under /dev. +* This also works for flash memory. Refer to \ref erase_command and \ref +* unprotect_command for flash preparation. +* +* \note +* @li This command is available only if enabled in menuconfig(CONFIG_NET_TFTP). +* @li Uploading of data is available only if enabled in menuconfig(CONFIG_NET_TFTP_PUSH). */ BAREBOX_CMD_START (tftp)
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerHi Mark,
Quoted 40 lines · Mark Vels
I just started using BB and was a little anoyed by the fact that although there is plenty of documentation in the source code, it did not show up in the generated documentation. I think the availability of simple, clean and structured information is important for the success of BB and make it enjoyable for developers to get aquainted with BB. Therefore I put some effort in getting the doxygen output up to date.
This patch set tries to update the shell command documentation.
A short summary of the changes in this patch set:
- The first few patches deal with orphan pages; pages that were not linked to directly and hence showed up at top-level in the Doxygen output HTML.- In the command overview page, a separation between platform-independent and dependent code has been made. In some cases I found 3 versions/ implementations of the same command on different ARCHs, including 3 copies of the same documentation. I will try to come up with a solution for this and make sure we have consistent command implementations across different platforms and architectures which IMHO is important.
- In a few cases I found the command help information inside an #ifdef. I took the liberty to move the BAREBOX_CMD_HELP_* macros outside these conditional sections so that the documentation for that command always shows up in the Doxygen-generated output. Of course the availability of the commands and the help text in bb should not have been altered.
- An attempt is made to make consistent use of the BAREBOX_CMD_HELP_* macro's. Also some clean-up was done or small amendments to the documentation.
- I changed a number of syntax errors in the
drivers/mtd/nanddirectory. It was not my intention to touch source-generated documentation but decided to fix a number of syntax errors to make a first attempt to get rid of all Doxygen warnings and make the output usable again.- I also tried to make sure all shell command documentation now uses the same format for describing cli options (for example the use of [OPTIONS] for options and [<arg1>] for an optional argument. This style is what I saw for most commands already so I just tried to make it's use consistent.
Quoted 5 lines
I realise that the distribution of the number of changes is not optimal, this patch set grew considerably bigger as I progressed. In the end it is just a big collection of lots of small and trivial changes and I hope you can still find the motivation to review these patches and provide me with some feedback.
Thank you for your efforts, I really appreciate this. I hoped though that I can shift over the documentation to
http://wiki.barebox.org/doku.php as this is maintainable without patching the source code. So I wonder if you didn't know about this website at all (could be my bad, I should have communicated this more clearly) or are there other problems with the documentation in the wiki? Maybe in the end the doxygen documentation is more what people actually want?
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Sascha,
Quoted 4 lines · Sascha Hauer
Thank you for your efforts, I really appreciate this. I hoped though that I can shift over the documentation to
http://wiki.barebox.org/doku.php as this is maintainable without patching the source code.
Is this to decrease your work load as maintainer or do you have other concerns that drive this goal?
Quoted 3 lines
So I wonder if you didn't know about this
website at all (could be my bad, I should have communicated this more clearly) or are there other problems with the documentation in the wiki?
Well, of course I saw the wiki but looking at the command documentation I figured it was older and less complete that what I found in the generated documentation. Therefore I drew the conclusion that the doxygen documentation was the preferred option.
Quoted 2 lines
Maybe in the end the doxygen documentation is more what people actually want?
IMHO it makes sense to have command and supported board info generated from the source code because I see a number of advantages:
- Documentation is tied to the source code. If options for a command are changed, expect a patch for the documentation with it. With some discipline from contributors and reviewers this keeps the doc in sync with the code. Since I don't seem to have any possibility to edit the wiki myself yet, this looks like a good excuse to let the wiki bit rot and not update the documentation.
- When in future situations branching (for LTS versions?) becomes relevant (there are companies that are still using UBoot 1.1.6 for example), there will be different implementations or command sets implemented for different branches. Since the doxygen code is generated from the sources it is always relevant/ up-to-date for the version people are using. I think having multiple versions documented is very hard and messy to realise with a wiki.
- It saves work to use doxygen since most information needs to be in the source code for the builtin help anyway. Re-using it for the doxygen documentation (by using the BAREBOX_CMD_HELP_XXX() macros) is more efficient than having to update the wiki too.
- I know that in the ideal world all changes go through upstream. But having worked at a number of big companies, there will be all sorts of custom hacks to barebox that are not even relevant to be ever upstreamed (like commands to change settings in custom FPGA firmware for example). The doxygen documentation can be a great framework to extend with 'home-brew' changes and documentation and make it easier to use barebox in such environments.
For the other documentation (the stuff in section 'Developer' section on the wiki etc), I don' really have a strong opinion. Maybe the wiki is more convenient here because it has a more powerful and versatile syntax. I just wonder how contributors to any wiki documentation should progress? Should they post the wiki-formatted pages to the mailing list? Or are you planning on providing people with login credentials for the wiki on request?
In case we decide to stick with the wiki-only approach, I think it is time to do some clean-up in the source tree and remove obsolete doxygen pages/comments. Would it make sense to create a DOCUMENTATION file manifest to explain the documentation strategy?
Best regards,
Mark
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 9 lines · Mark Vels
Hi Sascha,
Quoted 4 lines · Sascha Hauer
Thank you for your efforts, I really appreciate this. I hoped though that I can shift over the documentation to
http://wiki.barebox.org/doku.php as this is maintainable without patching the source code.Is this to decrease your work load as maintainer or do you have other concerns that drive this goal?
The documentation does not have any influence on my workload as a maintainer as nearly nobody updates it ;)
Quoted 11 lines
Quoted 3 lines
So I wonder if you didn't know about this
website at all (could be my bad, I should have communicated this more clearly) or are there other problems with the documentation in the wiki?Well, of course I saw the wiki but looking at the command documentation I figured it was older and less complete that what I found in the generated documentation. Therefore I drew the conclusion that the doxygen documentation was the preferred option.
Quoted 3 lines
Maybe in the end the doxygen documentation is more what people actually
want?
Quoted 8 lines
IMHO it makes sense to have command and supported board info generated from the source code because I see a number of advantages:
- Documentation is tied to the source code. If options for a command are changed, expect a patch for the documentation with it. With some discipline from contributors and reviewers this keeps the doc in sync with the code. Since I don't seem to have any possibility to edit the wiki myself yet, this looks like a good excuse to let the wiki bit rot and not update the documentation.
This was one of the reasons to put it in doxygen.
Quoted 9 lines
- When in future situations branching (for LTS versions?) becomes relevant (there are companies that are still using UBoot 1.1.6 for example), there will be different implementations or command sets implemented for different branches.
Since the doxygen code is generated from the sources it is always relevant/ up-to-date for the version people are using. I think having multiple versions documented is very hard and messy to realise with a wiki.
This was another reason.
Quoted 23 lines
- It saves work to use doxygen since most information needs to be in the source code for the builtin help anyway. Re-using it for the doxygen documentation (by using the
BAREBOX_CMD_HELP_XXX()macros) is more efficient than having to
update the wiki too.- I know that in the ideal world all changes go through upstream. But having worked at a number of big companies, there will be all sorts of custom hacks to barebox that are not even relevant to be ever upstreamed (like commands to change settings in custom FPGA firmware for example). The doxygen documentation can be a great framework to extend with 'home-brew' changes and documentation and make it easier to use barebox in such environments.
For the other documentation (the stuff in section 'Developer' section on the wiki etc), I don' really have a strong opinion. Maybe the wiki is more convenient here because it has a more powerful and versatile syntax. I just wonder how contributors to any wiki documentation should progress? Should they post the wiki-formatted pages to the mailing list? Or are you planning on providing people with login credentials for the wiki on request?
Quoted 4 lines
In case we decide to stick with the wiki-only approach, I think it is time to do some clean-up in the source tree and remove obsolete doxygen pages/comments. Would it make sense to create a DOCUMENTATION file manifest to explain the documentation strategy?
I understand all the reasons why doxygen is a good tool, like documentation in the source code and (theoretically) in sync with the source code. Unfortunately it did not work very well. Ok, it would probably be my job to force people to update the docs when they update a command, but I am not very good at writing documentation myself. For the commands I agree that these are kept well in the inline doxygen style, but with the wiki I hoped to make it easier for people to write some board specific docs or some howtos what they can do with barebox.
I don't like the look of the doxygen output at all. Someone with some more web skills than me could probably fix this. I also don't like the workflow with doxygen when it comes to pages which are not specific to a particular command. I think the additional make step and also the IMO quite inconvenient linking between pages make doxygen quite hard to use for the occasional user.
The idea with the wiki is the following:
- Everyone gets a wiki account on request (so far nobody made a request), so everyone interested can write documentation. I hesitated to make the wiki world editable because of possible spam.
- The wiki is in a git repository here:
git.pengutronix.de/git/barebox-doc.git
- You can clone this repository, it contains a script to start a local lighttpd and then you can edit the wiki as you like. Every edit is automatically committed and I am willing to accept pull requests. This way everybody can update the documentation even when offline.
- dokuwiki contains a siteexport plugin which can be used to create local static html pages. This can be used for additional (in-house) documentation for things which are not mainline. Also we can generate a documentation specific to a particular barebox version.
We definitely have a communication problem, so adding this information to DOCUMENTATION is a good thing to do. Removing the doxygen stuff from the source code also is a good thing to not confuse the users. I wanted to do this once I have some feedback about the wiki approach, but unfortunately I did not receive any feedback until now.
I just created an account for you. Maybe you can give it a try and give some feedback (positive or negative).
Regards,
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox