summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2007-11-09 14:06:57 +0100
committerJuergen Beisert <j.beisert@pengutronix.de>2007-11-09 14:06:57 +0100
commit9b07bdbbdcd99ba75d24bddb2be7fe4141e10541 (patch)
tree8766a75a0a0af3de81da92503c379c0747fa4e52 /commands
parent4719b0bd55d14eca1b323f3dba5d70a0e8a02de0 (diff)
parent3ff14ef200fc6f69b6237fffabbad796aa463cfb (diff)
downloadbarebox-9b07bdbbdcd99ba75d24bddb2be7fe4141e10541.tar.gz
barebox-9b07bdbbdcd99ba75d24bddb2be7fe4141e10541.tar.xz
Merge branch 'docu'
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c17
-rw-r--r--commands/cat.c2
-rw-r--r--commands/cd.c5
-rw-r--r--commands/cp.c2
-rw-r--r--commands/edit.c23
-rw-r--r--commands/environment.c18
-rw-r--r--commands/flash.c40
-rw-r--r--commands/mount.c10
-rw-r--r--commands/net.c33
-rw-r--r--commands/partition.c31
10 files changed, 159 insertions, 22 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index e943934a45..755d3a962b 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -853,3 +853,20 @@ do_bootm_lynxkdi (cmd_tbl_t *cmdtp,
}
#endif /* CONFIG_LYNXKDI */
+
+/**
+ * @file
+ * @brief Boot support for Linux
+ */
+
+/**
+ * @page boot_preparation Preparing for Boot
+ *
+ * This chapter describes what's to be done to forward the control from
+ * U-Boot to Linux. This part describes the generic part, below you can find
+ * the architecture specific part.
+ *
+ * - @subpage arm_boot_preparation
+ * - @subpage ppc_boot_preparation
+ * - @subpage x86_boot_preparation
+ */ \ No newline at end of file
diff --git a/commands/cat.c b/commands/cat.c
index af33eca80c..6596612e95 100644
--- a/commands/cat.c
+++ b/commands/cat.c
@@ -97,7 +97,7 @@ U_BOOT_CMD_END
/**
* @page cat_command cat (concatenate)
*
- * Usage is: cat <file> [<file> ...]
+ * Usage is: cat \<file\> [\<file\> ...]
*
* Concatenate files to stdout. Currently only printable characters
* and \\n and \\t are printed, but this should be optional
diff --git a/commands/cd.c b/commands/cd.c
index 08c3a2d268..5d5cacbf87 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -61,7 +61,8 @@ U_BOOT_CMD_END
/**
* @page cd_command cd (change working directory)
*
- * Usage is: cd [<directory name>]
+ * Usage is: cd [\<directory name>]
*
- * Change to <directory name>. If called without argument, change to / (root)
+ * Change to \<directory name>. If called without argument, change to \b /
+ * (root)
*/
diff --git a/commands/cp.c b/commands/cp.c
index e26ff1fa00..a89bb97d76 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -151,7 +151,7 @@ U_BOOT_CMD_END
/**
* @page cp_command cp (copy)
*
- * Usage: cp <source> [<source>] <destination>
+ * Usage: cp \<source> [\<source>] \<destination>
*
* FIXME
*/
diff --git a/commands/edit.c b/commands/edit.c
index 0795d88abc..3a685ebeef 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -1,6 +1,4 @@
/*
- * edit.c - A tiny editor implementation
- *
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
* See file CREDITS for list of people who contributed to this
@@ -20,6 +18,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/**
+ * @file
+ * @brief A tiny editor implementation
+ */
+
#include <common.h>
#include <command.h>
#include <malloc.h>
@@ -398,6 +401,7 @@ static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[])
return 1;
}
+ /* check if we are called as "sedit" insted of "edit" */
if (*argv[0] == 's')
smartscroll = 1;
@@ -564,3 +568,18 @@ U_BOOT_CMD_START(edit)
.usage = "edit a file",
U_BOOT_CMD_HELP(cmd_edit_help)
U_BOOT_CMD_END
+
+
+/**
+ * @page edit_command edit (editor)
+ *
+ * Usage is: [s]edit \<file\>
+ *
+ * This is a very small editor. It's only features are moving the cursor with
+ * the usual keys and typing characters.
+ *
+ * \b \<ctrl-c\> quits the editor without saving,\n
+ * \b \<ctrl-d\> quits the editor with saving the current file.
+ *
+ * If called as \c sedit the editor uses ansi codes to scroll the screen.
+ */
diff --git a/commands/environment.c b/commands/environment.c
index b5517aa977..01e7cfed98 100644
--- a/commands/environment.c
+++ b/commands/environment.c
@@ -227,13 +227,13 @@ U_BOOT_CMD_END
/**
* @page saveenv_command saveenv
*
- * Usage: saveenv [<envfs>] [<directory>]
+ * Usage: saveenv [\<envfs>] [\<directory>]
*
- * Save the files in <directory> to the persistent storage device <envfs>.
- * <envfs> is normally a block in flash, but could be any other file.
+ * Save the files in \<directory> to the persistent storage device \<envfs>.
+ * \<envfs> is normally a block in flash, but could be any other file.
*
- * If ommitted <directory> defaults to /env and <envfs> defaults to
- * /dev/env0.
+ * If ommitted \<directory> defaults to \b /env and \<envfs> defaults to
+ * \b /dev/env0.
*
* @note envfs can only handle files. Directories are skipped silently.
*/
@@ -372,12 +372,12 @@ U_BOOT_CMD_END
/**
* @page loadenv_command loadenv
*
- * Usage: loadenv [<directory>] [<envfs>]
+ * Usage: loadenv [\<directory>] [\<envfs>]
*
- * Load the persistent storage contained in <envfs> to the directory <directory>.
+ * Load the persistent storage contained in \<envfs> to the directory \<directory>.
*
- * If ommitted <directory> defaults to /env and <envfs> defaults to
- * /dev/env0.
+ * If ommitted \<directory> defaults to /env and \<envfs> defaults to
+ * \b /dev/env0.
*
* @note envfs can only handle files. Directories are skipped silently.
*/
diff --git a/commands/flash.c b/commands/flash.c
index 835663c2b6..cfbf903087 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -23,6 +23,11 @@
* MA 02111-1307 USA
*/
+/**
+ * @file
+ * @brief Flash memory support: erase, protect, unprotect
+ */
+
#include <common.h>
#include <command.h>
#include <cfi_flash.h>
@@ -92,6 +97,18 @@ U_BOOT_CMD_START(erase)
U_BOOT_CMD_HELP(cmd_erase_help)
U_BOOT_CMD_END
+/** @page erase_command erase Erase flash memory
+ *
+ * Usage is: erase \<devicee>
+ *
+ * Erase the flash memory behind the device. It depends on the device given,
+ * what area will be erased. If the device represents the whole flash memory
+ * the whole memory will be erased. If the device represents a partition on
+ * a main flash memory, only this partition part will be erased.
+ *
+ * Refer \b addpart, \b delpart and \b devinfo for partition handling.
+ */
+
static int do_protect (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int fd;
@@ -163,3 +180,26 @@ U_BOOT_CMD_START(unprotect)
U_BOOT_CMD_HELP(cmd_protect_help)
U_BOOT_CMD_END
+/** @page protect_command protect Protect a flash memory
+ *
+ * Usage is: protect \<devicee>
+ *
+ * Protect the flash memory behind the device. It depends on the device given,
+ * what area will be protected. If the device represents the whole flash memory
+ * the whole memory will be protected. If the device represents a partition on
+ * a main flash memory, only this partition part will be protected.
+ *
+ * Refer \b addpart, \b delpart and \b devinfo for partition handling.
+ */
+
+/** @page unprotect_command unprotect Unprotect a flash memory
+ *
+ * Usage is: unprotect \<devicee>
+ *
+ * Unprotect the flash memory behind the device. It depends on the device given,
+ * what area will be unprotected. If the device represents the whole flash memory
+ * the whole memory will be unprotected. If the device represents a partition
+ * on a main flash memory, only this partition part will be unprotected.
+ *
+ * Refer \b addpart, \b delpart and \b devinfo for partition handling.
+ */
diff --git a/commands/mount.c b/commands/mount.c
index dd04bdeeb7..03b63f04d1 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -80,16 +80,16 @@ U_BOOT_CMD_START(mount)
U_BOOT_CMD_END
/** @page mount_command mount
- * Usage: mount [<device> <fstype> <mountpoint>]
+ * Usage: mount [\<device> \<fstype> \<mountpoint>]
*
- * Mounts a filesystem of a given <fstype> on a <device> to a <mountpoint>.
- * <device> can be one of /dev/ * or some arbitrary string if no
+ * Mounts a filesystem of a given \<fstype> on a \<device> to a \<mountpoint>.
+ * \<device> can be one of /dev/ * or some arbitrary string if no
* device is needed for this driver (for example ramfs).
*
- * <fstype> is the filesystem driver to use. Try the 'devinfo' command
+ * \<fstype> is the filesystem driver to use. Try the 'devinfo' command
* for a list of available drivers.
*
- * <mountpoint> must be an empty directory descending directly from the
+ * \<mountpoint> must be an empty directory descending directly from the
* root directory.
*/
diff --git a/commands/net.c b/commands/net.c
index 25115e4f42..faf87d6ec6 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -1,6 +1,4 @@
/*
- * tftp, rarpboot, dhcp, nfs, cdp - Boot support
- *
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
@@ -23,6 +21,11 @@
* MA 02111-1307 USA
*/
+/**
+ * @file
+ * @brief tftp, rarpboot, dhcp, nfs, cdp - Boot support
+ */
+
#include <common.h>
#include <command.h>
#include <environment.h>
@@ -102,6 +105,22 @@ U_BOOT_CMD_START(tftp)
U_BOOT_CMD_HELP(cmd_tftp_help)
U_BOOT_CMD_END
+/**
+ * @page tftp_command tftp
+ *
+ * Usage is: tftp \<filename\> [\<localfilename\>]
+ *
+ * Load a file via network using BootP/TFTP protocol. The loaded file you
+ * can find after download in you current ramdisk. Refer \b ls command.
+ *
+ * \<localfile> can be the local filename only, or also a device name. In the
+ * case of a device name, the will gets stored there. This works also for
+ * partitions of flash memory. Refer \b erase, \b unprotect for flash
+ * preparation.
+ *
+ * Note: This command is available only, if enabled in the menuconfig.
+ */
+
#ifdef CONFIG_NET_RARP
static int do_rarpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
@@ -116,6 +135,16 @@ U_BOOT_CMD_START(rarpboot)
U_BOOT_CMD_END
#endif /* CONFIG_NET_RARP */
+/**
+ * @page rarp_command rarp
+ *
+ * Usage is: FIXME
+ *
+ * Load a file via network using rarp/tftp protocol. FIXME: Where to find it
+ * after loading?
+ * @note This command is available only, if enabled in the menuconfig.
+ */
+
#ifdef CONFIG_NET_DHCP
static int do_dhcp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
diff --git a/commands/partition.c b/commands/partition.c
index f2b795bbae..886339c97a 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -21,6 +21,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/**
+ * @file
+ * @brief partition handling and addpart and delpart command
+ */
+
#ifdef CONFIG_ENABLE_PARTITION_NOISE
# define DEBUG
#endif
@@ -199,6 +204,26 @@ U_BOOT_CMD_START(addpart)
U_BOOT_CMD_HELP(cmd_addpart_help)
U_BOOT_CMD_END
+/** @page addpart_command addpart Add a partition to a device
+ *
+ * Usage is: addpart \<device> \<partition description>
+ *
+ * Adds a partition description to a device. The partition description has the
+ * form
+ *
+ * size1(name1)[ro],size2(name2)[ro],...
+ *
+ * \<device> is the device name under. Sizes can be given in decimal or - if
+ * prefixed with 0x - in hex. Sizes can have an optional suffix K,M,G. The
+ * size of the last partition can be specified as '-' for the remaining space
+ * of the device.
+ *
+ * @note The format is the same as used in the Linux kernel for cmdline mtd
+ * partitions.
+ *
+ * @note This command has to be reworked and will probably change it's API.
+ */
+
static int do_delpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
struct device_d *dev;
@@ -230,3 +255,9 @@ U_BOOT_CMD_START(delpart)
U_BOOT_CMD_HELP(cmd_delpart_help)
U_BOOT_CMD_END
+/** @page delpart_command delpart Delete a partition
+ *
+ * Usage is: delpart \<device>
+ *
+ * Delete a partition previously added to a device with addpart.
+ */