From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 82-148-208-25.fiber.unet.nl ([82.148.208.25] helo=berilia.team-embedded.nl) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RLBI2-000100-BM for barebox@lists.infradead.org; Tue, 01 Nov 2011 10:10:13 +0000 Received: from keppler ([192.168.0.13] helo=localhost.localdomain) by berilia.team-embedded.nl with esmtp (Exim 4.69) (envelope-from ) id 1RLBCq-0005eI-44 for barebox@lists.infradead.org; Tue, 01 Nov 2011 11:04:32 +0100 From: Mark Vels Date: Tue, 1 Nov 2011 11:09:45 +0100 Message-Id: <65bb7430eeddbe6aa30757f1841027df0f95c930.1320141619.git.mark.vels@team-embedded.nl> In-Reply-To: References: In-Reply-To: References: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 9/9] help: update of shell commands doxygen/online help documentation To: barebox@lists.infradead.org Signed-off-by: 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(-) diff --git a/Documentation/commands.dox b/Documentation/commands.dox index a8bc83d..af59820 100644 --- a/Documentation/commands.dox +++ b/Documentation/commands.dox @@ -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 */ diff --git a/Documentation/developers_manual.dox b/Documentation/developers_manual.dox index 2f7d360..7a17fb3 100644 --- a/Documentation/developers_manual.dox +++ b/Documentation/developers_manual.dox @@ -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" */ diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c index 5f654d4..99eb8c6 100644 --- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c +++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c @@ -359,6 +359,17 @@ static const __maybe_unused char cmd_cpufreq_help[] = "\n" "Set CPU frequency to 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", diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c index 158adfc..e31e795 100644 --- a/arch/arm/boards/guf-cupid/board.c +++ b/arch/arm/boards/guf-cupid/board.c @@ -361,6 +361,17 @@ static const __maybe_unused char cmd_cpufreq_help[] = "\n" "Set CPU frequency to 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", diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c index 23580c9..de9d484 100644 --- a/arch/arm/boards/pcm043/pcm043.c +++ b/arch/arm/boards/pcm043/pcm043.c @@ -330,6 +330,17 @@ static const __maybe_unused char cmd_cpufreq_help[] = "\n" "Set CPU frequency to 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", diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index d4a3b14..992c0ad 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -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", diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c index e19b8de..1341fde 100644 --- a/arch/arm/cpu/cpuinfo.c +++ b/arch/arm/cpu/cpuinfo.c @@ -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", diff --git a/arch/arm/lib/bootu.c b/arch/arm/lib/bootu.c index e97ded0..e2cd1bd 100644 --- a/arch/arm/lib/bootu.c +++ b/arch/arm/lib/bootu.c @@ -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
\n"; +BAREBOX_CMD_HELP_START(bootu) +BAREBOX_CMD_HELP_USAGE("bootu
\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, diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c index 956ea82..7d3a412 100644 --- a/arch/arm/lib/bootz.c +++ b/arch/arm/lib/bootz.c @@ -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 \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, diff --git a/arch/arm/mach-imx/clko.c b/arch/arm/mach-imx/clko.c index 37e17fe..3f64f11 100644 --- a/arch/arm/mach-imx/clko.c +++ b/arch/arm/mach-imx/clko.c @@ -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
Divider\n" -" -s 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
", "Divider\n") +BAREBOX_CMD_HELP_OPT("-s ", "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, diff --git a/arch/arm/mach-imx/internal-nand-boot.c b/arch/arm/mach-imx/internal-nand-boot.c index c55a0e7..5302e2f 100644 --- a/arch/arm/mach-imx/internal-nand-boot.c +++ b/arch/arm/mach-imx/internal-nand-boot.c @@ -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 \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 \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, diff --git a/arch/arm/mach-imx/speed.c b/arch/arm/mach-imx/speed.c index 750ace0..31c1c73 100644 --- a/arch/arm/mach-imx/speed.c +++ b/arch/arm/mach-imx/speed.c @@ -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 diff --git a/arch/arm/mach-mxs/imx.c b/arch/arm/mach-mxs/imx.c index 14a4249..e65e558 100644 --- a/arch/arm/mach-mxs/imx.c +++ b/arch/arm/mach-mxs/imx.c @@ -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", diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index 6966def..a66f82b 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c @@ -145,9 +145,19 @@ void __noreturn reset_cpu(unsigned long addr) while (1); } +BAREBOX_CMD_HELP_START(loadxc) +BAREBOX_CMD_HELP_USAGE("loadxc \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 diff --git a/arch/blackfin/boards/ipe337/cmd_alternate.c b/arch/blackfin/boards/ipe337/cmd_alternate.c index 116f910..38fa137 100644 --- a/arch/blackfin/boards/ipe337/cmd_alternate.c +++ b/arch/blackfin/boards/ipe337/cmd_alternate.c @@ -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 \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 " "\n"; diff --git a/arch/mips/lib/cpuinfo.c b/arch/mips/lib/cpuinfo.c index 7bdb02b..db4325c 100644 --- a/arch/mips/lib/cpuinfo.c +++ b/arch/mips/lib/cpuinfo.c @@ -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", diff --git a/commands/bmp.c b/commands/bmp.c index 644a977..54a3701 100644 --- a/commands/bmp.c +++ b/commands/bmp.c @@ -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] \n") +BAREBOX_CMD_HELP_SHORT("Show the bitmap 'file' on the framebuffer.\n") BAREBOX_CMD_HELP_OPT ("-f ", "framebuffer device (/dev/fb0)\n") BAREBOX_CMD_HELP_OPT ("-x ", "x offset (default center)\n") BAREBOX_CMD_HELP_OPT ("-y ", "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) diff --git a/commands/bootm.c b/commands/bootm.c index 755932b..205518e 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -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] \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_END BAREBOX_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) { diff --git a/commands/cat.c b/commands/cat.c index 37e6505..025f2b7 100644 --- a/commands/cat.c +++ b/commands/cat.c @@ -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)", diff --git a/commands/cd.c b/commands/cd.c index d73be32..66ca797 100644 --- a/commands/cd.c +++ b/commands/cd.c @@ -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, diff --git a/commands/clear.c b/commands/clear.c index 6a6b6c5..c277d67 100644 --- a/commands/clear.c +++ b/commands/clear.c @@ -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", diff --git a/commands/cp.c b/commands/cp.c index 3428105..ca62f4b 100644 --- a/commands/cp.c +++ b/commands/cp.c @@ -80,16 +80,17 @@ out: BAREBOX_CMD_HELP_START(cp) BAREBOX_CMD_HELP_USAGE("cp \n") -BAREBOX_CMD_HELP_SHORT("copy file from to .\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) diff --git a/commands/crc.c b/commands/crc.c index 2c05967..3478ba4 100644 --- a/commands/crc.c +++ b/commands/crc.c @@ -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] []\n") +BAREBOX_CMD_HELP_SHORT("Calculate a crc32 checksum of memory area 'area'.\n") BAREBOX_CMD_HELP_OPT ("-f ", "Use file instead of memory.\n") #ifdef CONFIG_CMD_CRC_CMP BAREBOX_CMD_HELP_OPT ("-F ", "Use file to compare.\n") @@ -153,8 +153,13 @@ BAREBOX_CMD_HELP_OPT ("-F ", "Use file to compare.\n") BAREBOX_CMD_HELP_OPT ("-v ", "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 diff --git a/commands/dfu.c b/commands/dfu.c index 385fd89..29cf2a5 100644 --- a/commands/dfu.c +++ b/commands/dfu.c @@ -165,20 +165,22 @@ out: BAREBOX_CMD_HELP_START(dfu) BAREBOX_CMD_HELP_USAGE("dfu [OPTIONS] \n") BAREBOX_CMD_HELP_SHORT("Start firmware update with the Device Firmware Update (DFU) protocol.\n") -BAREBOX_CMD_HELP_OPT ("-m ", "Manufacturer string (barebox)\n") -BAREBOX_CMD_HELP_OPT ("-p ", "product string (" CONFIG_BOARDINFO ")\n") +BAREBOX_CMD_HELP_OPT ("-m ", "Manufacturer string (default: barebox)\n") +BAREBOX_CMD_HELP_OPT ("-p ", "product string (default: " CONFIG_BOARDINFO ")\n") BAREBOX_CMD_HELP_OPT ("-V ", "vendor id\n") BAREBOX_CMD_HELP_OPT ("-P ", "product id\n") BAREBOX_CMD_HELP_END /** * @page dfu_command -\ 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) diff --git a/commands/echo.c b/commands/echo.c index 3e098df..a8fd34b 100644 --- a/commands/echo.c +++ b/commands/echo.c @@ -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] []\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 ", "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) diff --git a/commands/edit.c b/commands/edit.c index 3519b09..b136f75 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -555,12 +555,13 @@ BAREBOX_CMD_HELP_END /** * @page edit_command - -

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.

- -If called as sedit, the editor uses ansi codes to scroll the screen. + * + *

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.

+ * + * 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) diff --git a/commands/exec.c b/commands/exec.c index 5f093b7..16f9126 100644 --- a/commands/exec.c +++ b/commands/exec.c @@ -53,6 +53,16 @@ out: return 1; } +BAREBOX_CMD_HELP_START(exec) +BAREBOX_CMD_HELP_USAGE("exec