diff options
author | Juergen Beisert <j.beisert@pengutronix.de> | 2007-11-09 14:05:23 +0100 |
---|---|---|
committer | Juergen Beisert <j.beisert@pengutronix.de> | 2007-11-09 14:05:23 +0100 |
commit | 3ff14ef200fc6f69b6237fffabbad796aa463cfb (patch) | |
tree | e6e749f27cbd14641eac77e46e8e52736cb0cc92 /commands | |
parent | 8fe25ecf1270ab08e0b3baf5e8bae91e8f55eaa9 (diff) | |
download | barebox-3ff14ef200fc6f69b6237fffabbad796aa463cfb.tar.gz barebox-3ff14ef200fc6f69b6237fffabbad796aa463cfb.tar.xz |
various doc added
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/flash.c | 40 | ||||
-rw-r--r-- | commands/net.c | 12 | ||||
-rw-r--r-- | commands/partition.c | 31 |
3 files changed, 80 insertions, 3 deletions
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/net.c b/commands/net.c index b9c372a712..b858e67fe7 100644 --- a/commands/net.c +++ b/commands/net.c @@ -110,9 +110,15 @@ U_BOOT_CMD_END * * Usage is: tftp \<filename\> [\<localfilename\>] * - * Load a file via network using BootP/TFTP protocol. FIXME: Where to find it - * after loading? - * @note This command is available only, if enabled in the menuconfig. + * 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 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. + */ |